@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$ */ }
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$ */ }
setAction(ITextEditorActionConstants.COPY, copyAction); copyAction.setEnabled(fNoSourceTextWidget.getSelectionText().length() > 0); fNoSourceTextWidget.addSelectionListener(new SelectionListener() { setAction(ITextEditorActionConstants.SELECT_ALL, selectAllAction); copyAction.setEnabled(fNoSourceTextWidget.getSelectionText().length() > 0); copyQualifiedName.setEnabled(false); setAction(ITextEditorActionConstants.COPY, fSourceCopyAction); setAction(ITextEditorActionConstants.SELECT_ALL, fSelectAllAction); copyQualifiedName.setEnabled(true); IdMapEntry entry= ACTION_MAP[i]; actionBars.setGlobalActionHandler(entry.getActionId(), null); setAction(entry.getActionId(), null);
setAction(ITextEditorActionConstants.COPY, copyAction); copyAction.setEnabled(fNoSourceTextWidget.getSelectionText().length() > 0); fNoSourceTextWidget.addSelectionListener(new SelectionListener() { setAction(ITextEditorActionConstants.SELECT_ALL, selectAllAction); copyAction.setEnabled(fNoSourceTextWidget.getSelectionText().length() > 0); copyQualifiedName.setEnabled(false); setAction(ITextEditorActionConstants.COPY, fSourceCopyAction); setAction(ITextEditorActionConstants.SELECT_ALL, fSelectAllAction); copyQualifiedName.setEnabled(true); IdMapEntry entry= ACTION_MAP[i]; actionBars.setGlobalActionHandler(entry.getActionId(), null); setAction(entry.getActionId(), null);
setAction(ITextEditorActionConstants.COPY, copyAction); copyAction.setEnabled(fNoSourceTextWidget.getSelectionText().length() > 0); fNoSourceTextWidget.addSelectionListener(new SelectionListener() { setAction(ITextEditorActionConstants.SELECT_ALL, selectAllAction); copyAction.setEnabled(fNoSourceTextWidget.getSelectionText().length() > 0); copyQualifiedName.setEnabled(false); setAction(ITextEditorActionConstants.COPY, fSourceCopyAction); setAction(ITextEditorActionConstants.SELECT_ALL, fSelectAllAction); copyQualifiedName.setEnabled(true); IdMapEntry entry= ACTION_MAP[i]; actionBars.setGlobalActionHandler(entry.getActionId(), null); setAction(entry.getActionId(), null);