1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 14:15:23 +02:00

Patch for Devin Steffler.

Fixed Bug 104498 - DOM AST View becomes broken when left open on a system header file and eclipse is restarted
This commit is contained in:
John Camelon 2005-07-20 19:27:23 +00:00
parent faa699368b
commit 4650694d81

View file

@ -644,8 +644,6 @@ public class DOMAST extends ViewPart {
if (part == null) {
part = getActiveEditor();
if (!(part instanceof CEditor)) return;
}
viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
@ -952,7 +950,8 @@ public class DOMAST extends ViewPart {
IEditorPart editor = null;
if (getSite().getPage().isEditorAreaVisible() &&
getSite().getPage().getActiveEditor() != null) {
getSite().getPage().getActiveEditor() != null &&
getSite().getPage().getActiveEditor() instanceof CEditor) {
editor = getSite().getPage().getActiveEditor();
part = editor;
lang = getLanguageFromFile(((CEditor)editor).getInputFile());