|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
org.eclipse.ui.internal.actions.CommandAction
org.eclipse.ui.actions.ContributedAction
public final class ContributedAction
For a declarative editor action, see if we can link it to a command.
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.
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 | |
---|---|
ContributedAction(IServiceLocator locator,
IConfigurationElement element)
Create an action that can call a command. |
Method Summary | |
---|---|
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() . |
Methods inherited from class org.eclipse.ui.internal.actions.CommandAction |
---|
dispose, getActionDefinitionId, getCommandListener, getParameterizedCommand, init, run |
Methods inherited from class org.eclipse.jface.action.AbstractAction |
---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener |
Methods inherited from class org.eclipse.core.commands.common.EventManager |
---|
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.action.IAction |
---|
addPropertyChangeListener, removePropertyChangeListener |
Constructor Detail |
---|
public 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 element
CommandNotMappedException
Method Detail |
---|
public void runWithEvent(Event event)
Action
IAction
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 IAction
runWithEvent
in class org.eclipse.ui.internal.actions.CommandAction
event
- the SWT event which triggered this action being runpublic boolean isEnabled()
IAction
This method is associated with the ENABLED
property;
property change events are reported when its value changes.
isEnabled
in interface IAction
isEnabled
in class Action
true
if enabled, and
false
if disabledIAction.ENABLED
|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.