Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2010-01-15 13:07:57 +0000
committerAnton Leherbauer2010-01-15 13:07:57 +0000
commit552d2afaeb805b96b1d27bfc7416808ac9d9845c (patch)
tree35291b95d571de222349842e262edb7763abfdf3
parent30815580cde9fd26554f4c90111e288a8992bebd (diff)
downloadorg.eclipse.cdt-552d2afaeb805b96b1d27bfc7416808ac9d9845c.tar.gz
org.eclipse.cdt-552d2afaeb805b96b1d27bfc7416808ac9d9845c.tar.xz
org.eclipse.cdt-552d2afaeb805b96b1d27bfc7416808ac9d9845c.zip
Bug 293634 - [breakpoints] ToggleBreakpointAdapter blocks UI thread waiting on the index
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java
index f3b588da3e1..476834b9f4e 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 QNX Software Systems and others.
+ * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -421,8 +421,17 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
}
@Override
- public synchronized CElementInfo getElementInfo(IProgressMonitor monitor) throws CModelException {
- return super.getElementInfo(monitor);
+ public CElementInfo getElementInfo(IProgressMonitor monitor) throws CModelException {
+ CModelManager manager = CModelManager.getDefault();
+ CElementInfo info = (CElementInfo)manager.getInfo(this);
+ if (info != null) {
+ return info;
+ }
+ synchronized (this) {
+ info = createElementInfo();
+ openWhenClosed(info, monitor);
+ }
+ return info;
}
@Override

Back to the top