public class SaveAction extends EditorPartAction
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 |
---|
SaveAction(IEditorPart editor)
Constructs a
SaveAction 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.
|
void |
run()
Saves the state of the associated editor.
|
getEditorPart, setEditorPart
dispose, execute, getCommandStack, getWorkbenchPart, isEnabled, refresh, 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 SaveAction(IEditorPart editor)
SaveAction
and associates it with the given
editor.editor
- the IEditorPartprotected boolean calculateEnabled()
WorkbenchPartAction
calculateEnabled
in class WorkbenchPartAction
true
if the action is enabledWorkbenchPartAction.calculateEnabled()
protected void init()
init
in class WorkbenchPartAction
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.