ActionGroup group = cuEditor.getActionGroup();
if (group != null)
group.fillActionBars(bars);
- }
+ }
// fTogglePresentation.setEditor(editor);
// fTogglePresentation.update();
- IFile file = null;
- IEditorInput editorInput = textEditor.getEditorInput();
+ if (textEditor != null) {
- if (editorInput instanceof IFileEditorInput) {
- file = ((IFileEditorInput) editorInput).getFile();
- }
+ IFile file = null;
+ IEditorInput editorInput = textEditor.getEditorInput();
+
+ if (editorInput instanceof IFileEditorInput) {
+ file = ((IFileEditorInput) editorInput).getFile();
+ }
- PHPeclipsePlugin.getDefault().setLastEditorFile(file);
- fParserAction.setEditor(textEditor);
- fParserAction.update();
- if (SWT.getPlatform().equals("win32") && textEditor instanceof AbstractTextEditor) {
- fShowExternalPreviewAction.setEditor(textEditor);
- fShowExternalPreviewAction.update();
- IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
- if (store.getBoolean(PHPeclipsePlugin.SHOW_EXTERNAL_PREVIEW_PREF)) {
- IAction a = ShowExternalPreviewAction.getInstance();
- if (a != null)
- a.run();
+ PHPeclipsePlugin.getDefault().setLastEditorFile(file);
+ fParserAction.setEditor(textEditor);
+ fParserAction.update();
+ if (SWT.getPlatform().equals("win32") && textEditor instanceof AbstractTextEditor) {
+ fShowExternalPreviewAction.setEditor(textEditor);
+ fShowExternalPreviewAction.update();
+ IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
+ if (store.getBoolean(PHPeclipsePlugin.SHOW_EXTERNAL_PREVIEW_PREF)) {
+ IAction a = ShowExternalPreviewAction.getInstance();
+ if (a != null)
+ a.run();
+ }
}
}
+
}
/*