| org.eclipse.ui.texteditor.ResourceAction org.eclipse.ui.texteditor.TextEditorAction
All known Subclasses: org.eclipse.ui.texteditor.InsertLineAction, org.eclipse.ui.internal.texteditor.quickdiff.QuickDiffRestoreAction, org.eclipse.ui.texteditor.RecenterAction, org.eclipse.ui.texteditor.SelectAnnotationRulerAction, org.eclipse.ui.texteditor.JoinLinesAction, org.eclipse.ui.texteditor.DeleteLineAction, org.eclipse.ui.texteditor.ShowWhitespaceCharactersAction, org.eclipse.ui.texteditor.TextOperationAction, org.eclipse.ui.texteditor.RevertToSavedAction, org.eclipse.ui.texteditor.SaveAction, org.eclipse.ui.texteditor.MoveLinesAction, org.eclipse.ui.texteditor.MarkAction, org.eclipse.ui.texteditor.ConvertLineDelimitersAction, org.eclipse.ui.texteditor.HippieCompleteAction, org.eclipse.ui.texteditor.ContentAssistAction, org.eclipse.ui.texteditor.CaseAction, org.eclipse.ui.texteditor.ShiftAction, org.eclipse.ui.texteditor.GotoAnnotationAction, org.eclipse.ui.texteditor.GotoLineAction,
TextEditorAction | abstract public class TextEditorAction extends ResourceAction implements IUpdate(Code) | | Skeleton of a standard text editor action. The action is
initially associated with a text editor via the constructor,
but can subsequently be changed using setEditor .
Subclasses must implement the run method and if
required override the update method.
Subclasses that may modify the editor content should use
TextEditorAction.canModifyEditor() in their update code to check whether updating the editor is most
likely possible (even if it is read-only - this may change for editor contents
that are under version control) and
TextEditorAction.validateEditorInputState() before
actually modifying the editor contents.
|
TextEditorAction | protected TextEditorAction(ResourceBundle bundle, String prefix, ITextEditor editor)(Code) | | Creates and initializes the action for the given text editor. The action
configures its visual representation from the given resource bundle.
Parameters: bundle - the resource bundle Parameters: prefix - a prefix to be prepended to the various resource keys(described in ResourceAction constructor), ornull if none Parameters: editor - the text editor See Also: ResourceAction.ResourceAction(ResourceBundleString) |
TextEditorAction | protected TextEditorAction(ResourceBundle bundle, String prefix, ITextEditor editor, int style)(Code) | | Creates and initializes the action for the given text editor. The action
configures its visual representation from the given resource bundle.
Parameters: bundle - the resource bundle Parameters: prefix - a prefix to be prepended to the various resource keys(described in ResourceAction constructor), ornull if none Parameters: editor - the text editor Parameters: style - the style of this action See Also: ResourceAction.ResourceAction(ResourceBundleStringint) since: 3.0 |
getTextEditor | protected ITextEditor getTextEditor()(Code) | | Returns the action's text editor.
the action's text editor |
setEditor | public void setEditor(ITextEditor editor)(Code) | | Retargets this action to the given editor.
Parameters: editor - the new editor, or null if none |
update | public void update()(Code) | | Always enables this action if it is connected to a text editor.
If the associated editor is null , the action is disabled.
Subclasses may override.
|
|
|