Package org.eclipse.ui.internal
Class ViewPluginAction
- All Implemented Interfaces:
- EventListener,- IAction,- ISelectionChangedListener,- INullSelectionListener,- IPluginContribution,- ISelectionListener
This class extends regular plugin action with the additional requirement that
 the delegate has to implement interface IViewActionDeelgate. This interface
 has one additional method (init) whose purpose is to initialize the delegate
 with the view part in which the action is intended to run.
- 
Field SummaryFields inherited from interface org.eclipse.jface.action.IActionAS_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 SummaryConstructorsConstructorDescriptionViewPluginAction(IConfigurationElement actionElement, IViewPart viewPart, String id, int style) This class adds the requirement that action delegates loaded on demand implement IViewActionDelegate
- 
Method SummaryModifier and TypeMethodDescriptionvoiddispose()Disposes this plugin action.protected voidInitialize the action delegate by calling its lifecycle method.booleanReturns true if the view has been set The view may be null after the constructor is called and before the view is stored.protected IActionDelegatevalidateDelegate(Object obj) Validates the object is a delegate of the expected type.Methods inherited from class org.eclipse.ui.internal.PartPluginActionregisterSelectionListener, unregisterSelectionListenerMethods inherited from class org.eclipse.ui.internal.PluginActioncreateDelegate, disposeDelegate, getConfigElement, getDelegate, getLocalId, getMenuCreator, getOverrideActionId, getPluginId, getSelection, refreshEnablement, run, runWithEvent, selectionChanged, selectionChanged, selectionChangedMethods inherited from class org.eclipse.jface.action.ActionconvertAccelerator, 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.AbstractActionaddPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListenerMethods inherited from class org.eclipse.core.commands.common.EventManageraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
- 
Constructor Details- 
ViewPluginActionpublic ViewPluginAction(IConfigurationElement actionElement, IViewPart viewPart, String id, int style) This class adds the requirement that action delegates loaded on demand implement IViewActionDelegate
 
- 
- 
Method Details- 
validateDelegateDescription 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 class- PluginAction
- Parameters:
- obj- a possible action delegate implementation
- Returns:
- the IActionDelegateimplementation for the object
- Throws:
- WorkbenchException- if not of the expected delegate type
 
- 
initDelegateprotected 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 class- PluginAction
 
- 
isOkToCreateDelegatepublic boolean isOkToCreateDelegate()Returns true if the view has been set The view may be null after the constructor is called and before the view is stored. We cannot create the delegate at that time.- Overrides:
- isOkToCreateDelegatein class- PluginAction
 
- 
disposepublic void dispose()Description copied from class:PluginActionDisposes this plugin action.- Overrides:
- disposein class- PluginAction
 
 
-