/* (non-Javadoc) * @see org.eclipse.ui.part.MultiPageEditorActionBarContributor#setActivePage(org.eclipse.ui.IEditorPart) */ public void setActivePage(IEditorPart activeEditor) { IActionBars bars = getActionBars(); if (activeEditor instanceof ITextEditor) { if (bars != null) { contributor.setActiveEditor(activeEditor); } } }
/* (non-Javadoc) * @see org.eclipse.ui.IEditorActionBarContributor#setActiveEditor(org.eclipse.ui.IEditorPart) */ public void setActiveEditor(IEditorPart part) { // TODO Auto-generated method stub super.setActiveEditor(part); ITextEditor textEditor = (part instanceof ITextEditor ? (ITextEditor) part : null); // Source menu. IActionBars bars = getActionBars(); // bars.setGlobalActionHandler(JdtActionConstants.COMMENT, getAction(textEditor, "Comment")); // bars.setGlobalActionHandler(JdtActionConstants.UNCOMMENT, getAction(textEditor, // "Uncomment")); // bars.setGlobalActionHandler(JdtActionConstants.TOGGLE_COMMENT, getAction(textEditor, // "ToggleComment")); // bars.setGlobalActionHandler(JdtActionConstants.FORMAT, getAction(textEditor, "Format")); // bars.setGlobalActionHandler(JdtActionConstants.FORMAT_ELEMENT, getAction(textEditor, // "QuickFormat")); // bars.setGlobalActionHandler(JdtActionConstants.ADD_BLOCK_COMMENT, getAction(textEditor, // "AddBlockComment")); // bars.setGlobalActionHandler(JdtActionConstants.REMOVE_BLOCK_COMMENT, getAction(textEditor, // "RemoveBlockComment")); bars.setGlobalActionHandler( IAtlActionConstants.INDENT, getAction(textEditor, "org.atl.eclipse.adt.ui.actions.indentAction")); }
/* * @see org.eclipse.ui.editors.text.TextEditorActionContributor#dispose() */ @Override public void dispose() { internalSetActiveEditor(null); super.dispose(); }
/* * @see org.eclipse.ui.editors.text.TextEditorActionContributor#setActiveEditor(org.eclipse.ui.IEditorPart) */ @Override public void setActiveEditor(IEditorPart part) { super.setActiveEditor(part); internalSetActiveEditor(part); }
/* * @see org.eclipse.ui.editors.text.TextEditorActionContributor#init(org.eclipse.ui.IActionBars) */ @Override public void init(IActionBars bars) { super.init(bars); bars.setGlobalActionHandler( ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY, fTogglePresentation); }
/* (non-Javadoc) * @see org.eclipse.ui.part.EditorActionBarContributor#init(org.eclipse.ui.IActionBars, org.eclipse.ui.IWorkbenchPage) */ public void init(IActionBars bars, IWorkbenchPage page) { contributor.init(bars); super.init(bars, page); }