1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Bug 293634 - [breakpoints] ToggleBreakpointAdapter blocks UI thread waiting on the index

This commit is contained in:
Anton Leherbauer 2010-01-15 13:07:50 +00:00
parent a75cc9c45a
commit 64c58d1776

View file

@ -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
@ -404,8 +404,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