protected void createActions() { super.createActions(); setAction(ITextEditorActionConstants.SAVE, null); setAction(ITextEditorActionConstants.REVERT_TO_SAVED, null); fSourceCopyAction= getAction(ITextEditorActionConstants.COPY); fSelectAllAction= getAction(ITextEditorActionConstants.SELECT_ALL); final ActionGroup group= new RefactorActionGroup(this, ITextEditorActionConstants.GROUP_EDIT, true); fActionGroups.addGroup(group); fContextMenuGroup= new CompositeActionGroup(new ActionGroup[] {group}); /* * 1GF82PL: ITPJUI:ALL - Need to be able to add bookmark to class file * * // replace default action with class file specific ones * * setAction(ITextEditorActionConstants.BOOKMARK, new AddClassFileMarkerAction("AddBookmark.", this, IMarker.BOOKMARK, true)); //$NON-NLS-1$ * setAction(ITextEditorActionConstants.ADD_TASK, new AddClassFileMarkerAction("AddTask.", this, IMarker.TASK, false)); //$NON-NLS-1$ * setAction(ITextEditorActionConstants.RULER_MANAGE_BOOKMARKS, new ClassFileMarkerRulerAction("ManageBookmarks.", getVerticalRuler(), this, IMarker.BOOKMARK, true)); //$NON-NLS-1$ * setAction(ITextEditorActionConstants.RULER_MANAGE_TASKS, new ClassFileMarkerRulerAction("ManageTasks.", getVerticalRuler(), this, IMarker.TASK, true)); //$NON-NLS-1$ */ }
@Override protected void createActions() { super.createActions(); setAction(ITextEditorActionConstants.SAVE, null); setAction(ITextEditorActionConstants.REVERT_TO_SAVED, null); fSourceCopyAction= getAction(ITextEditorActionConstants.COPY); fSelectAllAction= getAction(ITextEditorActionConstants.SELECT_ALL); final ActionGroup group= new RefactorActionGroup(this, ITextEditorActionConstants.GROUP_EDIT, true); fActionGroups.addGroup(group); fContextMenuGroup= new CompositeActionGroup(new ActionGroup[] {group}); Action action= new AnnotateClassFileAction(this); action.setActionDefinitionId(IJavaEditorActionDefinitionIds.ANNOTATE_CLASS_FILE); setAction(IJavaEditorActionDefinitionIds.ANNOTATE_CLASS_FILE, action); /* * 1GF82PL: ITPJUI:ALL - Need to be able to add bookmark to class file * * // replace default action with class file specific ones * * setAction(ITextEditorActionConstants.BOOKMARK, new AddClassFileMarkerAction("AddBookmark.", this, IMarker.BOOKMARK, true)); //$NON-NLS-1$ * setAction(ITextEditorActionConstants.ADD_TASK, new AddClassFileMarkerAction("AddTask.", this, IMarker.TASK, false)); //$NON-NLS-1$ * setAction(ITextEditorActionConstants.RULER_MANAGE_BOOKMARKS, new ClassFileMarkerRulerAction("ManageBookmarks.", getVerticalRuler(), this, IMarker.BOOKMARK, true)); //$NON-NLS-1$ * setAction(ITextEditorActionConstants.RULER_MANAGE_TASKS, new ClassFileMarkerRulerAction("ManageTasks.", getVerticalRuler(), this, IMarker.TASK, true)); //$NON-NLS-1$ */ }
@Override protected void createActions() { super.createActions(); setAction(ITextEditorActionConstants.SAVE, null); setAction(ITextEditorActionConstants.REVERT_TO_SAVED, null); fSourceCopyAction= getAction(ITextEditorActionConstants.COPY); fSelectAllAction= getAction(ITextEditorActionConstants.SELECT_ALL); final ActionGroup group= new RefactorActionGroup(this, ITextEditorActionConstants.GROUP_EDIT, true); fActionGroups.addGroup(group); fContextMenuGroup= new CompositeActionGroup(new ActionGroup[] {group}); Action action= new AnnotateClassFileAction(this); action.setActionDefinitionId(IJavaEditorActionDefinitionIds.ANNOTATE_CLASS_FILE); setAction(IJavaEditorActionDefinitionIds.ANNOTATE_CLASS_FILE, action); /* * 1GF82PL: ITPJUI:ALL - Need to be able to add bookmark to class file * * // replace default action with class file specific ones * * setAction(ITextEditorActionConstants.BOOKMARK, new AddClassFileMarkerAction("AddBookmark.", this, IMarker.BOOKMARK, true)); //$NON-NLS-1$ * setAction(ITextEditorActionConstants.ADD_TASK, new AddClassFileMarkerAction("AddTask.", this, IMarker.TASK, false)); //$NON-NLS-1$ * setAction(ITextEditorActionConstants.RULER_MANAGE_BOOKMARKS, new ClassFileMarkerRulerAction("ManageBookmarks.", getVerticalRuler(), this, IMarker.BOOKMARK, true)); //$NON-NLS-1$ * setAction(ITextEditorActionConstants.RULER_MANAGE_TASKS, new ClassFileMarkerRulerAction("ManageTasks.", getVerticalRuler(), this, IMarker.TASK, true)); //$NON-NLS-1$ */ }
@Override public void editorContextMenuAboutToShow(IMenuManager menu) { super.editorContextMenuAboutToShow(menu); IAction action = getAction(IJavaEditorActionDefinitionIds.ANNOTATE_CLASS_FILE); if (action.isEnabled()) { menu.appendToGroup(ICommonMenuConstants.GROUP_EDIT, action); } ActionContext context= new ActionContext(getSelectionProvider().getSelection()); fContextMenuGroup.setContext(context); fContextMenuGroup.fillContextMenu(menu); fContextMenuGroup.setContext(null); }
@Override public void editorContextMenuAboutToShow(IMenuManager menu) { super.editorContextMenuAboutToShow(menu); IAction action = getAction(IJavaEditorActionDefinitionIds.ANNOTATE_CLASS_FILE); if (action.isEnabled()) { menu.appendToGroup(ICommonMenuConstants.GROUP_EDIT, action); } ActionContext context= new ActionContext(getSelectionProvider().getSelection()); fContextMenuGroup.setContext(context); fContextMenuGroup.fillContextMenu(menu); fContextMenuGroup.setContext(null); }
IClassFile file= classFileEditorInput.getClassFile(); IAction copyQualifiedName= getAction(IJavaEditorActionConstants.COPY_QUALIFIED_NAME); boolean wasUsingSourceCopyAction= fSourceCopyAction == getAction(ITextEditorActionConstants.COPY); IAction currentCopyAction= getAction(ITextEditorActionConstants.COPY); boolean isUsingSourceCopyAction= fSourceCopyAction == currentCopyAction; if (wasUsingSourceCopyAction != isUsingSourceCopyAction) { actionBars.setGlobalActionHandler(ITextEditorActionConstants.SELECT_ALL, getAction(ITextEditorActionConstants.SELECT_ALL)); actionBars.updateActionBars();
IClassFile file= classFileEditorInput.getClassFile(); IAction copyQualifiedName= getAction(IJavaEditorActionConstants.COPY_QUALIFIED_NAME); IAction annotateAction= getAction(IJavaEditorActionDefinitionIds.ANNOTATE_CLASS_FILE); boolean wasUsingSourceCopyAction= fSourceCopyAction == getAction(ITextEditorActionConstants.COPY); IAction currentCopyAction= getAction(ITextEditorActionConstants.COPY); boolean isUsingSourceCopyAction= fSourceCopyAction == currentCopyAction; if (wasUsingSourceCopyAction != isUsingSourceCopyAction) { actionBars.setGlobalActionHandler(ITextEditorActionConstants.SELECT_ALL, getAction(ITextEditorActionConstants.SELECT_ALL)); actionBars.updateActionBars();
IClassFile file= classFileEditorInput.getClassFile(); IAction copyQualifiedName= getAction(IJavaEditorActionConstants.COPY_QUALIFIED_NAME); IAction annotateAction= getAction(IJavaEditorActionDefinitionIds.ANNOTATE_CLASS_FILE); boolean wasUsingSourceCopyAction= fSourceCopyAction == getAction(ITextEditorActionConstants.COPY); IAction currentCopyAction= getAction(ITextEditorActionConstants.COPY); boolean isUsingSourceCopyAction= fSourceCopyAction == currentCopyAction; if (wasUsingSourceCopyAction != isUsingSourceCopyAction) { actionBars.setGlobalActionHandler(ITextEditorActionConstants.SELECT_ALL, getAction(ITextEditorActionConstants.SELECT_ALL)); actionBars.updateActionBars();