Package org.eclipse.ui.internal
Class WWinPluginAction
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
org.eclipse.ui.internal.PluginAction
org.eclipse.ui.internal.WWinPluginAction
- All Implemented Interfaces:
- EventListener,- IAction,- ISelectionChangedListener,- IActionSetContributionItem,- INullSelectionListener,- IPluginContribution,- ISelectionListener
- Direct Known Subclasses:
- WWinPluginPulldown
This class extends regular plugin action with the additional requirement that
 the delegate has to implement interface
 
IWorkbenchWindowActionDelegate. This interface has one
 additional method (init) whose purpose is to initialize the delegate with the
 window 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 SummaryConstructorsConstructorDescriptionWWinPluginAction(IConfigurationElement actionElement, IWorkbenchWindow window, String id, int style) Constructs a newWWinPluginActionobject.
- 
Method SummaryModifier and TypeMethodDescriptionvoiddispose()Disposes of the action and any resources held.Returns the action set id.protected voidInitialize the action delegate by calling its lifecycle method.booleanReturns true if the window has been set.static voidCreates any actions which belong to an activated plugin.protected voidRefresh the selection for the action.voidrunWithEvent(Event event) The default implementation of thisIActionmethod ignores the event argument, and simply callsrun().voidsetActionSetId(String newActionSetId) Sets the action set id.voidsetChecked(boolean checked) Sets the checked status of this action.voidsetHelpListener(HelpListener listener) TheWWinPluginActionimplementation of this method declared onIActionstores the help listener in a local field.toString()protected IActionDelegatevalidateDelegate(Object obj) Validates the object is a delegate of the expected type.Methods inherited from class org.eclipse.ui.internal.PluginActioncreateDelegate, disposeDelegate, getConfigElement, getDelegate, getLocalId, getMenuCreator, getOverrideActionId, getPluginId, getSelection, refreshEnablement, run, 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, setDescription, setDisabledImageDescriptor, setEnabled, 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- 
WWinPluginActionpublic WWinPluginAction(IConfigurationElement actionElement, IWorkbenchWindow window, String id, int style) Constructs a newWWinPluginActionobject.- Parameters:
- actionElement- the configuration element
- window- the window to contribute to
- id- the identifier
- style- the style
 
 
- 
- 
Method Details- 
refreshActionListpublic static void refreshActionList()Creates any actions which belong to an activated plugin.
- 
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
 
- 
disposepublic void dispose()Disposes of the action and any resources held.- Overrides:
- disposein class- PluginAction
 
- 
getActionSetIdReturns the action set id.- Specified by:
- getActionSetIdin interface- IActionSetContributionItem
 
- 
isOkToCreateDelegatepublic boolean isOkToCreateDelegate()Returns true if the window has been set. The window may be null after the constructor is called and before the window is stored. We cannot create the delegate at that time.- Overrides:
- isOkToCreateDelegatein class- PluginAction
 
- 
runWithEventDescription copied from class:ActionThe default implementation of thisIActionmethod ignores the event argument, and simply callsrun(). Subclasses should override this method if they need information from the triggering event, or overriderun()if not.- Specified by:
- runWithEventin interface- IAction
- Overrides:
- runWithEventin class- PluginAction
- Parameters:
- event- the SWT event which triggered this action being run
- See Also:
 
- 
setActionSetIdSets the action set id.- Specified by:
- setActionSetIdin interface- IActionSetContributionItem
 
- 
setHelpListenerTheWWinPluginActionimplementation of this method declared onIActionstores the help listener in a local field. The supplied listener is only used if there is no retarget action.- Specified by:
- setHelpListenerin interface- IAction
- Overrides:
- setHelpListenerin class- Action
- Parameters:
- listener- a help listener for this action
 
- 
setCheckedpublic void setChecked(boolean checked) Description copied from interface:IActionSets the checked status of this action. Applicable for the stylesAS_CHECK_BOXorAS_RADIO_BUTTON.Fires a property change event for the CHECKEDproperty if the checked status actually changes as a consequence.- Specified by:
- setCheckedin interface- IAction
- Overrides:
- setCheckedin class- Action
- Parameters:
- checked- the new checked status
- See Also:
 
- 
refreshSelectionprotected void refreshSelection()Refresh the selection for the action.
- 
toString
 
-