public final class ContributedAction
extends org.eclipse.ui.internal.actions.CommandAction
This is a legacy bridge class, and should not be used outside of the Eclipse SDK. Please use menu contributions to display a command in a menu or toolbar.
Note: Clients may instantiate.
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 |
|---|
ContributedAction(IServiceLocator locator,
IConfigurationElement element)
Create an action that can call a command.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isEnabled()
Returns whether this action is enabled.
|
void |
runWithEvent(Event event)
The default implementation of this
IAction method ignores
the event argument, and simply calls run(). |
dispose, getActionDefinitionId, getCommandListener, getParameterizedCommand, init, runconvertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipTextaddPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListeneraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectpublic ContributedAction(IServiceLocator locator, IConfigurationElement element) throws CommandNotMappedException
locator - The appropriate service locator to use. If you use a part site
as your locator, this action will be tied to your part.element - the contributed action elementCommandNotMappedExceptionpublic void runWithEvent(Event event)
ActionIAction method ignores
the event argument, and simply calls run(). Subclasses
should override this method if they need information from the triggering
event, or override run() if not.runWithEvent in interface IActionrunWithEvent in class org.eclipse.ui.internal.actions.CommandActionevent - the SWT event which triggered this action being runHow radio buttons are handled,
How check boxes are handledpublic boolean isEnabled()
IAction
This method is associated with the ENABLED property;
property change events are reported when its value changes.
isEnabled in interface IActionisEnabled in class Actiontrue if enabled, and
false if disabledIAction.ENABLED
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.