Package org.eclipse.ui.actions
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 ofIActionDelegate
andIActionDelegate2
for a client delegate action.Subclasses should reimplement
runWithEvent
orrun
methods to do the action's work, and may reimplementselectionChanged
to react to selection changes in the workbench.
-
-
Constructor Summary
Constructors Constructor Description ActionDelegate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
TheActionDelegate
implementation of thisIActionDelegate2
method does nothing.void
init(IAction action)
TheActionDelegate
implementation of thisIActionDelegate2
method does nothing.void
run(IAction action)
TheActionDelegate
implementation of thisIActionDelegate
method does nothing.void
runWithEvent(IAction action, Event event)
TheActionDelegate
implementation of thisIActionDelegate2
method redirects to therun
method.void
selectionChanged(IAction action, ISelection selection)
TheActionDelegate
implementation of thisIActionDelegate
method does nothing.
-
-
-
Method Detail
-
run
public void run(IAction action)
TheActionDelegate
implementation of thisIActionDelegate
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 interfaceIActionDelegate
- Parameters:
action
- the action proxy that handles the presentation portion of the action
-
selectionChanged
public void selectionChanged(IAction action, ISelection selection)
TheActionDelegate
implementation of thisIActionDelegate
method does nothing. Subclasses may reimplement.- Specified by:
selectionChanged
in interfaceIActionDelegate
- Parameters:
action
- the action proxy that handles presentation portion of the actionselection
- the current selection, ornull
if there is no selection.
-
init
public void init(IAction action)
TheActionDelegate
implementation of thisIActionDelegate2
method does nothing. Subclasses may reimplement.- Specified by:
init
in interfaceIActionDelegate2
- Parameters:
action
- the proxy action that handles the presentation portion of the action.
-
dispose
public void dispose()
TheActionDelegate
implementation of thisIActionDelegate2
method does nothing. Subclasses may reimplement.- Specified by:
dispose
in interfaceIActionDelegate2
-
runWithEvent
public void runWithEvent(IAction action, Event event)
TheActionDelegate
implementation of thisIActionDelegate2
method redirects to therun
method. Subclasses may reimplement.- Specified by:
runWithEvent
in interfaceIActionDelegate2
- Parameters:
action
- the action proxy that handles the presentation portion of the actionevent
- the SWT event which triggered this action being run
-
-