public class UndoAction extends StackAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
Constructor and Description |
---|
UndoAction(IEditorPart editor)
Creates an
UndoAction and associates it with the given
editor. |
UndoAction(IWorkbenchPart part)
Creates an
UndoAction and associates it with the given
editor. |
Modifier and Type | Method and Description |
---|---|
protected boolean |
calculateEnabled()
Calculates and returns the enabled state of this action.
|
protected void |
init()
Initializes this action's text and images.
|
protected void |
refresh()
Refreshes this action's text to use the last executed command's label.
|
void |
run()
Undoes the last command.
|
getLabelForCommand
dispose, execute, getCommandStack, getWorkbenchPart, isEnabled, setLazyEnablementCalculation, setWorkbenchPart, update
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
public UndoAction(IEditorPart editor)
UndoAction
and associates it with the given
editor.editor
- The editor this action is associated with.public UndoAction(IWorkbenchPart part)
UndoAction
and associates it with the given
editor.part
- The workbench part this action is associated with.protected boolean calculateEnabled()
WorkbenchPartAction
calculateEnabled
in class WorkbenchPartAction
true
if the action is enabledWorkbenchPartAction.calculateEnabled()
protected void init()
init
in class WorkbenchPartAction
protected void refresh()
refresh
in class WorkbenchPartAction
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.