X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/CompilationUnitEditorActionContributor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/CompilationUnitEditorActionContributor.java index e6708e6..524e966 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/CompilationUnitEditorActionContributor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/CompilationUnitEditorActionContributor.java @@ -12,8 +12,6 @@ import net.sourceforge.phpeclipse.PHPeclipsePlugin; import net.sourceforge.phpeclipse.ui.editor.ShowExternalPreviewAction; import org.eclipse.core.resources.IFile; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.ui.IActionBars; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; @@ -41,10 +39,8 @@ public class CompilationUnitEditorActionContributor extends BasicEditorActionCon bars.setGlobalActionHandler(PHPdtActionConstants.UNCOMMENT, getAction(textEditor, "Uncomment")); //$NON-NLS-1$ bars.setGlobalActionHandler(PHPdtActionConstants.TOGGLE_COMMENT, getAction(textEditor, "ToggleComment")); //$NON-NLS-1$ bars.setGlobalActionHandler(PHPdtActionConstants.FORMAT, getAction(textEditor, "Format")); //$NON-NLS-1$ - // bars.setGlobalActionHandler(PHPdtActionConstants.ADD_BLOCK_COMMENT, - // getAction(textEditor, "AddBlockComment")); //$NON-NLS-1$ - // bars.setGlobalActionHandler(PHPdtActionConstants.REMOVE_BLOCK_COMMENT, - // getAction(textEditor, "RemoveBlockComment")); //$NON-NLS-1$ + bars.setGlobalActionHandler(PHPdtActionConstants.ADD_BLOCK_COMMENT, getAction(textEditor, "AddBlockComment")); //$NON-NLS-1$ + bars.setGlobalActionHandler(PHPdtActionConstants.REMOVE_BLOCK_COMMENT, getAction(textEditor, "RemoveBlockComment")); //$NON-NLS-1$ // bars.setGlobalActionHandler(PHPdtActionConstants.INDENT, getAction( // textEditor, "Indent")); //$NON-NLS-1$ //$NON-NLS-2$ @@ -57,12 +53,13 @@ public class CompilationUnitEditorActionContributor extends BasicEditorActionCon } PHPeclipsePlugin.getDefault().setLastEditorFile(file); - + ShowExternalPreviewAction fShowExternalPreviewAction = ShowExternalPreviewAction.getInstance(); fShowExternalPreviewAction.setEditor(textEditor); fShowExternalPreviewAction.update(); - if (fShowExternalPreviewAction != null) + if (fShowExternalPreviewAction != null) { fShowExternalPreviewAction.doRun(ShowExternalPreviewAction.PHP_TYPE); + } } } } \ No newline at end of file