Class ObjectPluginAction
- All Implemented Interfaces:
EventListener,IAction,ISelectionChangedListener,INullSelectionListener,IPartListener2,IPluginContribution,ISelectionListener
For backward compatibility, the delegate object can implement either
IActionDelegate or IObjectActionDelegate.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe configuration element attribute for the identifier of the action which this action is intended to override (i.e., replace).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
ConstructorsConstructorDescriptionObjectPluginAction(IConfigurationElement actionElement, String id, int style) Constructs a new ObjectPluginAction. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Disposes this plugin action.Returns the action identifier this action overrides.protected voidInitialize the action delegate by calling its lifecycle method.voidpartActivated(IWorkbenchPartReference partRef) Notifies this listener that the given part has been activated.voidpartBroughtToTop(IWorkbenchPartReference partRef) Notifies this listener that the given part has been brought to the top.voidpartClosed(IWorkbenchPartReference partRef) Notifies this listener that the given part has been closed.voidpartDeactivated(IWorkbenchPartReference partRef) Notifies this listener that the given part has been deactivated.voidpartHidden(IWorkbenchPartReference partRef) Notifies this listener that the given part is hidden or obscured by another part.voidpartInputChanged(IWorkbenchPartReference partRef) Notifies this listener that the given part's input was changed.voidpartOpened(IWorkbenchPartReference partRef) Notifies this listener that the given part has been opened.voidpartVisible(IWorkbenchPartReference partRef) Notifies this listener that the given part is visible.voidsetActivePart(IWorkbenchPart targetPart) Sets the active part for the delegate.Methods inherited from class org.eclipse.ui.internal.PluginAction
createDelegate, disposeDelegate, getConfigElement, getDelegate, getLocalId, getMenuCreator, getPluginId, getSelection, isOkToCreateDelegate, refreshEnablement, run, runWithEvent, selectionChanged, selectionChanged, selectionChanged, validateDelegateMethods 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
-
Field Details
-
ATT_OVERRIDE_ACTION_ID
The configuration element attribute for the identifier of the action which this action is intended to override (i.e., replace).- See Also:
-
-
Constructor Details
-
ObjectPluginAction
Constructs a new ObjectPluginAction.- Parameters:
actionElement- The configuration element used to construct this action; must not benull.id- The identifier for this action; must not benull.style- The style bits
-
-
Method Details
-
partActivated
Description copied from interface:IPartListener2Notifies this listener that the given part has been activated.- Specified by:
partActivatedin interfaceIPartListener2- Parameters:
partRef- the part that was activated- See Also:
-
partBroughtToTop
Description copied from interface:IPartListener2Notifies this listener that the given part has been brought to the top.These events occur when an editor is brought to the top in the editor area, or when a view is brought to the top in a page book with multiple views. They are normally only sent when a part is brought to the top programmatically (via
IPerspective.bringToTop). When a part is activated by the user clicking on it, onlypartActivatedis sent.- Specified by:
partBroughtToTopin interfaceIPartListener2- Parameters:
partRef- the part that was surfaced- See Also:
-
partClosed
Description copied from interface:IPartListener2Notifies this listener that the given part has been closed.Note that if other perspectives in the same page share the view, this notification is not sent. It is only sent when the view is being removed from the page entirely (it is being disposed).
- Specified by:
partClosedin interfaceIPartListener2- Parameters:
partRef- the part that was closed- See Also:
-
partDeactivated
Description copied from interface:IPartListener2Notifies this listener that the given part has been deactivated.- Specified by:
partDeactivatedin interfaceIPartListener2- Parameters:
partRef- the part that was deactivated- See Also:
-
partHidden
Description copied from interface:IPartListener2Notifies this listener that the given part is hidden or obscured by another part.- Specified by:
partHiddenin interfaceIPartListener2- Parameters:
partRef- the part that is hidden or obscured by another part
-
partInputChanged
Description copied from interface:IPartListener2Notifies this listener that the given part's input was changed.- Specified by:
partInputChangedin interfaceIPartListener2- Parameters:
partRef- the part whose input was changed
-
partOpened
Description copied from interface:IPartListener2Notifies this listener that the given part has been opened.Note that if other perspectives in the same page share the view, this notification is not sent. It is only sent when the view is being newly opened in the page (it is being created).
- Specified by:
partOpenedin interfaceIPartListener2- Parameters:
partRef- the part that was opened- See Also:
-
partVisible
Description copied from interface:IPartListener2Notifies this listener that the given part is visible.- Specified by:
partVisiblein interfaceIPartListener2- Parameters:
partRef- the part that is visible
-
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
-
setActivePart
Sets the active part for the delegate.This method will be called every time the action appears in a popup menu. The targetPart may change with each invocation.
- Parameters:
targetPart- the new part target
-
getOverrideActionId
Returns the action identifier this action overrides.- Overrides:
getOverrideActionIdin classPluginAction- Returns:
- the action identifier to override or
null
-
dispose
public void dispose()Description copied from class:PluginActionDisposes this plugin action.- Overrides:
disposein classPluginAction
-