/** * Creates a new action for the given text editor. * * @param editor the text editor * @see TextEditorAction#TextEditorAction(ResourceBundle, String, ITextEditor) * @since 3.5 */ public ChangeEncodingAction(ITextEditor editor) { this(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ChangeEncodingAction.", editor); //$NON-NLS-1$ }
@Override protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) { return new SelectMarkerRulerAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.SelectMarker.", editor, rulerInfo); //$NON-NLS-1$ } }
@Override protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) { return new TaskMarkerRulerAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ManageTasks.", editor, rulerInfo); //$NON-NLS-1$ } }
protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) { return new TaskMarkerRulerAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ManageTasks.", editor, rulerInfo); //$NON-NLS-1$ } }
@Override protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) { return new MarkerRulerAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ManageBookmarks.", editor, rulerInfo, IMarker.BOOKMARK, true); //$NON-NLS-1$ } }
protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) { return new SelectMarkerRulerAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.SelectMarker.", editor, rulerInfo); //$NON-NLS-1$ } }
protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) { return new MarkerRulerAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ManageBookmarks.", editor, rulerInfo, IMarker.BOOKMARK, true); //$NON-NLS-1$ } }
ResourceAction action= new ResourceAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.Print.") { //$NON-NLS-1$
ResourceAction action= new AddMarkerAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.AddBookmark.", this, IMarker.BOOKMARK, true); //$NON-NLS-1$ action.setHelpContextId(ITextEditorHelpContextIds.BOOKMARK_ACTION); action.setActionDefinitionId(IWorkbenchActionDefinitionIds.ADD_BOOKMARK); setAction(IDEActionFactory.BOOKMARK.getId(), action); action= new AddTaskAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.AddTask.", this); //$NON-NLS-1$ action.setHelpContextId(ITextEditorHelpContextIds.ADD_TASK_ACTION); action.setActionDefinitionId(IWorkbenchActionDefinitionIds.ADD_TASK); setAction(IDEActionFactory.ADD_TASK.getId(), action); action= new ChangeEncodingAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ChangeEncodingAction.", this); //$NON-NLS-1$ action.setHelpContextId(ITextEditorHelpContextIds.CHANGE_ENCODING); action.setActionDefinitionId(ITextEditorActionDefinitionIds.CHANGE_ENCODING); action= new ResourceAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ToggleLineNumbersAction.", IAction.AS_CHECK_BOX) { //$NON-NLS-1$ public void run() { toggleLineNumberRuler(); action= new ResourceAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ToggleQuickDiffAction.", IAction.AS_CHECK_BOX) { //$NON-NLS-1$ public void run() { toggleQuickDiffRuler(); action= new ResourceAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.HideRevisionInformationAction.") { //$NON-NLS-1$ public void run() { if (fLineColumn != null) action= new ResourceAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.CycleRevisionRenderingAction.") { //$NON-NLS-1$ public void run() { final RenderingMode[] modes= { IRevisionRulerColumnExtension.AGE, IRevisionRulerColumnExtension.AUTHOR, IRevisionRulerColumnExtension.AUTHOR_SHADED_BY_AGE};
/** * Sets up the overview ruler context menu before it is made visible. * <p> * Subclasses may extend to add other actions. * </p> * * @param menu the menu * @since 3.4 */ protected void overviewRulerContextMenuAboutToShow(IMenuManager menu) { final String preferenceLabel= findSelectedOverviewRulerAnnotationLabel(); final Shell shell= getSite().getShell(); IAction action= new ResourceAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.RulerPreferencesAction.") { //$NON-NLS-1$ @Override public void run() { String[] preferencePages= collectOverviewRulerMenuPreferencePages(); if (preferencePages.length > 0 && (shell == null || !shell.isDisposed())) { PreferencesUtil.createPreferenceDialogOn(shell, preferencePages[0], preferencePages, preferenceLabel).open(); } } }; menu.add(new Separator(ITextEditorActionConstants.GROUP_REST)); menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); menu.add(action); }
ResourceAction action= new AddMarkerAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.AddBookmark.", this, IMarker.BOOKMARK, true); //$NON-NLS-1$ action.setHelpContextId(ITextEditorHelpContextIds.BOOKMARK_ACTION); action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_ADD_BOOKMARK); setAction(IDEActionFactory.BOOKMARK.getId(), action); action= new AddTaskAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.AddTask.", this); //$NON-NLS-1$ action.setHelpContextId(ITextEditorHelpContextIds.ADD_TASK_ACTION); action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_ADD_TASK); setAction(IDEActionFactory.ADD_TASK.getId(), action); action= new ChangeEncodingAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ChangeEncodingAction.", this); //$NON-NLS-1$ action.setHelpContextId(ITextEditorHelpContextIds.CHANGE_ENCODING); action.setActionDefinitionId(ITextEditorActionDefinitionIds.CHANGE_ENCODING); action= new ResourceAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ToggleLineNumbersAction.", IAction.AS_CHECK_BOX) { //$NON-NLS-1$ @Override public void run() { action= new ResourceAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ToggleQuickDiffAction.", IAction.AS_CHECK_BOX) { //$NON-NLS-1$ @Override public void run() { action= new ResourceAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.HideRevisionInformationAction.") { //$NON-NLS-1$ @Override public void run() { action= new ResourceAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.CycleRevisionRenderingAction.") { //$NON-NLS-1$ @Override public void run() {