mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-16 04:35:45 +02:00
Merge in fix submitted by Alex Chapiro for NPE in CView
This commit is contained in:
parent
43f276c433
commit
b6d69ba0e1
1 changed files with 14 additions and 12 deletions
|
@ -998,10 +998,11 @@ public class CView extends ViewPart implements IMenuListener, ISetSelectionTarge
|
|||
IEditorReference[] editorReferences = page.getEditorReferences();
|
||||
for (int i = 0; i < editorReferences.length; ++i) {
|
||||
IEditorPart editor = editorReferences[i].getEditor(false);
|
||||
if(null != editor) {
|
||||
IEditorInput input = editor.getEditorInput();
|
||||
if (input instanceof IFileEditorInput
|
||||
&& file.equals(((IFileEditorInput)input).getFile())) {
|
||||
if (input instanceof IFileEditorInput && file.equals(((IFileEditorInput)input).getFile())) {
|
||||
page.bringToTop(editor);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1014,9 +1015,9 @@ public class CView extends ViewPart implements IMenuListener, ISetSelectionTarge
|
|||
IEditorReference editorReferences[] = page.getEditorReferences();
|
||||
for (int i = 0; i < editorReferences.length; ++i) {
|
||||
IEditorPart editor = editorReferences[i].getEditor(false);
|
||||
if(null != editor) {
|
||||
IEditorInput input = editor.getEditorInput();
|
||||
if (input instanceof IFileEditorInput
|
||||
&& res.equals(((IFileEditorInput)input).getFile())) {
|
||||
if (input instanceof IFileEditorInput && res.equals(((IFileEditorInput)input).getFile())) {
|
||||
page.bringToTop(editor);
|
||||
if (editor instanceof CEditor) {
|
||||
CEditor e = (CEditor)editor;
|
||||
|
@ -1025,6 +1026,7 @@ public class CView extends ViewPart implements IMenuListener, ISetSelectionTarge
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue