Class TextViewerAction

All Implemented Interfaces:
IAction, IUpdate
Direct Known Subclasses:
TextViewerGotoLineAction

public class TextViewerAction extends Action implements IUpdate
Common function for actions that operate on a text viewer.

Clients may subclass this class.

Since:
3.0
  • Constructor Details

    • TextViewerAction

      public TextViewerAction(ITextViewer viewer, int operationCode)
      Constructs a new action in the given text viewer with the specified operation code.
      Parameters:
      viewer - The viewer containing the action.
      operationCode - The operation code of the action.
  • Method Details

    • update

      public void update()
      Description copied from interface: IUpdate
      Requests that this object update itself.
      Specified by:
      update in interface IUpdate
    • run

      public void run()
      Description copied from class: Action
      The default implementation of this IAction method does nothing. Subclasses should override this method if they do not need information from the triggering event, or override runWithEvent(Event) if they do.
      Specified by:
      run in interface IAction
      Overrides:
      run in class Action
      See Also:
    • configureAction

      public void configureAction(String text, String toolTipText, String description)
      Configures this action with a label, tool tip, and description.
      Parameters:
      text - action label
      toolTipText - action tool tip
      description - action description