X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPActionContributor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPActionContributor.java index 9cbd2c9..5fa5d64 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPActionContributor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPActionContributor.java @@ -50,8 +50,8 @@ public class PHPActionContributor extends BasicTextEditorActionContributor { private RetargetTextEditorAction fGotoMatchingBracket; private List fRetargetToolbarActions = new ArrayList(); - protected PHPParserAction parserAction; - protected ShowExternalPreviewAction showExternalPreviewAction; + protected PHPParserAction fParserAction; + protected ShowExternalPreviewAction fShowExternalPreviewAction; /** * Default constructor. @@ -77,9 +77,10 @@ public class PHPActionContributor extends BasicTextEditorActionContributor { // fContentAssistTip = new RetargetTextEditorAction(PHPEditorMessages.getResourceBundle(), "ContentAssistTip."); //$NON-NLS-1$ // fTogglePresentation = new PresentationAction(); - parserAction = PHPParserAction.getInstance(); + fParserAction = PHPParserAction.getInstance(); + if (SWT.getPlatform().equals("win32")) { - showExternalPreviewAction = ShowExternalPreviewAction.getInstance(); + fShowExternalPreviewAction = ShowExternalPreviewAction.getInstance(); } } @@ -178,12 +179,13 @@ public class PHPActionContributor extends BasicTextEditorActionContributor { // fTogglePresentation.setEditor(editor); // fTogglePresentation.update(); - parserAction.setEditor(textEditor); - parserAction.update(); + PHPeclipsePlugin.getDefault().setTextEditor(textEditor); + fParserAction.setEditor(textEditor); + fParserAction.update(); if (SWT.getPlatform().equals("win32") && textEditor instanceof AbstractTextEditor) { - showExternalPreviewAction.setEditor(textEditor); - showExternalPreviewAction.update(); + fShowExternalPreviewAction.setEditor(textEditor); + fShowExternalPreviewAction.update(); IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore(); if (store.getBoolean(PHPeclipsePlugin.SHOW_EXTERNAL_PREVIEW_PREF)) { IAction a = ShowExternalPreviewAction.getInstance();