public abstract class DisposableAction
extends org.eclipse.jface.action.Action
Action
with additionally having a dispose method,
which handles clean-up when the action is being removed from the menu.Modifier and Type | Class and Description |
---|---|
static interface |
DisposableAction.RunActionListener
Listener to be notified when an action's
Action.run() method is executed. |
Constructor and Description |
---|
DisposableAction() |
Modifier and Type | Method and Description |
---|---|
static void |
addRunActionListener(DisposableAction.RunActionListener listener)
Adds a listener to be notified whenever an action is being executed.
|
void |
dispose()
Disposes this action, i.e.
|
static void |
removeRunActionListener(DisposableAction.RunActionListener listener)
Removes a listener to be notified whenever an action is being executed.
|
void |
run() |
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
protected Language language
public static void addRunActionListener(DisposableAction.RunActionListener listener)
listener
- The listener to be notified.public static void removeRunActionListener(DisposableAction.RunActionListener listener)
listener
- The listener to be removed.public void run()
run
in interface org.eclipse.jface.action.IAction
run
in class org.eclipse.jface.action.Action
public void dispose()