mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46:02 +02:00
Bug 242335 - Eclipse Ganymede hangs on startup
This commit is contained in:
parent
c4f2d97cf1
commit
1d8d0320a9
2 changed files with 5 additions and 3 deletions
|
@ -324,9 +324,11 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent
|
||||||
|
|
||||||
int offset = editorSelection.getOffset();
|
int offset = editorSelection.getOffset();
|
||||||
|
|
||||||
ICElement editorElement;
|
ICElement editorElement= null;
|
||||||
try {
|
try {
|
||||||
editorElement = fInput.getElementAtOffset(offset);
|
if (fInput.isStructureKnown() && fInput.isConsistent()) {
|
||||||
|
editorElement = fInput.getElementAtOffset(offset);
|
||||||
|
}
|
||||||
} catch (CModelException e) {
|
} catch (CModelException e) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1716,7 +1716,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
|
||||||
((IWorkingCopy) unit).reconcile();
|
((IWorkingCopy) unit).reconcile();
|
||||||
}
|
}
|
||||||
return unit.getElementAtOffset(offset);
|
return unit.getElementAtOffset(offset);
|
||||||
} else if (unit.isConsistent()) {
|
} else if (unit.isStructureKnown() && unit.isConsistent()) {
|
||||||
return unit.getElementAtOffset(offset);
|
return unit.getElementAtOffset(offset);
|
||||||
}
|
}
|
||||||
} catch (CModelException x) {
|
} catch (CModelException x) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue