Package org.eclipse.ui.internal
Class EditorPluginAction
- All Implemented Interfaces:
EventListener,IAction,ISelectionChangedListener,INullSelectionListener,IPluginContribution,ISelectionListener
Extends PartPluginAction for usage in editor parts. Objects of this class are
created by reading the registry (extension point "editorActions").
-
Field Summary
Fields inherited from interface org.eclipse.jface.action.IAction
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 Summary
ConstructorsConstructorDescriptionEditorPluginAction(IConfigurationElement actionElement, IEditorPart part, String id, int style) This class adds the requirement that action delegates loaded on demand implement IViewActionDelegate -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Disposes this plugin action.voideditorChanged(IEditorPart part) Handles editor change by re-registering for selection changes and updating IEditorActionDelegate.protected voidInitialize the action delegate by calling its lifecycle method.protected IActionDelegatevalidateDelegate(Object obj) Validates the object is a delegate of the expected type.Methods inherited from class org.eclipse.ui.internal.PartPluginAction
registerSelectionListener, unregisterSelectionListenerMethods inherited from class org.eclipse.ui.internal.PluginAction
createDelegate, disposeDelegate, getConfigElement, getDelegate, getLocalId, getMenuCreator, getOverrideActionId, getPluginId, getSelection, isOkToCreateDelegate, refreshEnablement, run, runWithEvent, selectionChanged, selectionChanged, selectionChangedMethods inherited from class org.eclipse.jface.action.Action
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipTextMethods inherited from class org.eclipse.jface.action.AbstractAction
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListenerMethods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
Constructor Details
-
EditorPluginAction
public EditorPluginAction(IConfigurationElement actionElement, IEditorPart part, String id, int style) This class adds the requirement that action delegates loaded on demand implement IViewActionDelegate
-
-
Method Details
-
validateDelegate
Description copied from class:PluginActionValidates the object is a delegate of the expected type. Subclasses can override to check for specific delegate types.Note: Calls to the object are not allowed during this method.
- Overrides:
validateDelegatein classPluginAction- Parameters:
obj- a possible action delegate implementation- Returns:
- the
IActionDelegateimplementation for the object - Throws:
WorkbenchException- if not of the expected delegate type
-
initDelegate
protected void initDelegate()Description copied from class:PluginActionInitialize the action delegate by calling its lifecycle method. Subclasses may override but must call this implementation first.- Overrides:
initDelegatein classPluginAction
-
editorChanged
Handles editor change by re-registering for selection changes and updating IEditorActionDelegate. -
dispose
public void dispose()Description copied from class:PluginActionDisposes this plugin action.- Overrides:
disposein classPluginAction
-