Class ActionDelegate

java.lang.Object
org.eclipse.ui.actions.ActionDelegate
All Implemented Interfaces:
IActionDelegate, IActionDelegate2
Direct Known Subclasses:
AbstractRulerActionDelegate

public abstract class ActionDelegate extends Object implements IActionDelegate2
Abstract base implementation of IActionDelegate and IActionDelegate2 for a client delegate action.

Subclasses should reimplement runWithEvent or run methods to do the action's work, and may reimplement selectionChanged to react to selection changes in the workbench.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    The ActionDelegate implementation of this IActionDelegate2 method does nothing.
    void
    init(IAction action)
    The ActionDelegate implementation of this IActionDelegate2 method does nothing.
    void
    run(IAction action)
    The ActionDelegate implementation of this IActionDelegate method does nothing.
    void
    runWithEvent(IAction action, Event event)
    The ActionDelegate implementation of this IActionDelegate2 method redirects to the run method.
    void
    selectionChanged(IAction action, ISelection selection)
    The ActionDelegate implementation of this IActionDelegate method does nothing.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ActionDelegate

      public ActionDelegate()
  • Method Details

    • run

      public void run(IAction action)
      The ActionDelegate implementation of this IActionDelegate method does nothing. Subclasses may reimplement.

      Note: This method is not called directly by the proxy action. Only by the default implementation of runWithEvent of this abstract class.

      Specified by:
      run in interface IActionDelegate
      Parameters:
      action - the action proxy that handles the presentation portion of the action
    • selectionChanged

      public void selectionChanged(IAction action, ISelection selection)
      The ActionDelegate implementation of this IActionDelegate method does nothing. Subclasses may reimplement.
      Specified by:
      selectionChanged in interface IActionDelegate
      Parameters:
      action - the action proxy that handles presentation portion of the action
      selection - the current selection, or null if there is no selection.
    • init

      public void init(IAction action)
      The ActionDelegate implementation of this IActionDelegate2 method does nothing. Subclasses may reimplement.
      Specified by:
      init in interface IActionDelegate2
      Parameters:
      action - the proxy action that handles the presentation portion of the action.
    • dispose

      public void dispose()
      The ActionDelegate implementation of this IActionDelegate2 method does nothing. Subclasses may reimplement.
      Specified by:
      dispose in interface IActionDelegate2
    • runWithEvent

      public void runWithEvent(IAction action, Event event)
      The ActionDelegate implementation of this IActionDelegate2 method redirects to the run method. Subclasses may reimplement.
      Specified by:
      runWithEvent in interface IActionDelegate2
      Parameters:
      action - the action proxy that handles the presentation portion of the action
      event - the SWT event which triggered this action being run