Class CommandAction
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.jface.action.AbstractAction
-
- org.eclipse.jface.action.Action
-
- com._1c.g5.v8.dt.common.ui.actions.CommandAction
-
- All Implemented Interfaces:
org.eclipse.jface.action.IAction
,ISelectionChangedListener
,org.eclipse.ui.actions.ActionFactory.IWorkbenchAction
- Direct Known Subclasses:
AbstractEventHandlersAction
,DeleteFilterAction
public class CommandAction extends org.eclipse.jface.action.Action implements org.eclipse.ui.actions.ActionFactory.IWorkbenchAction, ISelectionChangedListener
Instantiate an action that will execute the command.
-
-
Constructor Summary
Constructors Constructor Description CommandAction(org.eclipse.ui.services.IServiceLocator serviceLocator, String commandIdIn)
Creates the action backed by a command.CommandAction(org.eclipse.ui.services.IServiceLocator serviceLocator, String commandIdIn, int style, String menuIdIn)
Creates the action backed by a command.CommandAction(org.eclipse.ui.services.IServiceLocator serviceLocator, String commandIdIn, String menuIdIn)
Creates the action backed by a command.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
void
run()
void
runWithEvent(org.eclipse.swt.widgets.Event event)
void
selectionChanged(SelectionChangedEvent event)
void
update(ISelection selection)
Updates the action's enablement state according to the given selection.-
Methods inherited from class org.eclipse.jface.action.Action
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
-
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, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, removePropertyChangeListener, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
-
-
-
-
Constructor Detail
-
CommandAction
public CommandAction(org.eclipse.ui.services.IServiceLocator serviceLocator, String commandIdIn)
Creates the action backed by a command. For commands that don't take parameters.- Parameters:
serviceLocator
- The service locator that is closest in lifecycle to this action.commandIdIn
- the command id. Must not benull
.
-
CommandAction
public CommandAction(org.eclipse.ui.services.IServiceLocator serviceLocator, String commandIdIn, String menuIdIn)
Creates the action backed by a command. For commands that don't take parameters.- Parameters:
serviceLocator
- The service locator that is closest in lifecycle to this action.commandIdIn
- the command id. Must not benull
.
-
CommandAction
public CommandAction(org.eclipse.ui.services.IServiceLocator serviceLocator, String commandIdIn, int style, String menuIdIn)
Creates the action backed by a command. For commands that don't take parameters.- Parameters:
serviceLocator
- The service locator that is closest in lifecycle to this action.commandIdIn
- the command id. Must not benull
.style
- the stylemenuIdIn
-
-
-
Method Detail
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceorg.eclipse.ui.actions.ActionFactory.IWorkbenchAction
-
run
public void run()
- Specified by:
run
in interfaceorg.eclipse.jface.action.IAction
- Overrides:
run
in classorg.eclipse.jface.action.Action
-
runWithEvent
public void runWithEvent(org.eclipse.swt.widgets.Event event)
- Specified by:
runWithEvent
in interfaceorg.eclipse.jface.action.IAction
- Overrides:
runWithEvent
in classorg.eclipse.jface.action.Action
-
selectionChanged
public void selectionChanged(SelectionChangedEvent event)
- Specified by:
selectionChanged
in interfaceISelectionChangedListener
-
update
public void update(ISelection selection)
Updates the action's enablement state according to the given selection. This default implementation changes handler enablement state.- Parameters:
selection
- the selection this action is working on
-
-