mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 20:05:35 +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:
parent
faa699368b
commit
4650694d81
1 changed files with 2 additions and 3 deletions
|
@ -644,8 +644,6 @@ public class DOMAST extends ViewPart {
|
||||||
|
|
||||||
if (part == null) {
|
if (part == null) {
|
||||||
part = getActiveEditor();
|
part = getActiveEditor();
|
||||||
|
|
||||||
if (!(part instanceof CEditor)) return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
|
viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
|
||||||
|
@ -952,7 +950,8 @@ public class DOMAST extends ViewPart {
|
||||||
IEditorPart editor = null;
|
IEditorPart editor = null;
|
||||||
|
|
||||||
if (getSite().getPage().isEditorAreaVisible() &&
|
if (getSite().getPage().isEditorAreaVisible() &&
|
||||||
getSite().getPage().getActiveEditor() != null) {
|
getSite().getPage().getActiveEditor() != null &&
|
||||||
|
getSite().getPage().getActiveEditor() instanceof CEditor) {
|
||||||
editor = getSite().getPage().getActiveEditor();
|
editor = getSite().getPage().getActiveEditor();
|
||||||
part = editor;
|
part = editor;
|
||||||
lang = getLanguageFromFile(((CEditor)editor).getInputFile());
|
lang = getLanguageFromFile(((CEditor)editor).getInputFile());
|
||||||
|
|
Loading…
Add table
Reference in a new issue