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,AbstractMergeViewerAction,AddAction,AddCommandAction,AddObjectRightsAction,AddRlsAction,AddRoleAction,AddSectionAction,AddTemplateAction,AllTemplatesAddAction,AllTemplatesCopyAction,AllTemplatesDeleteAction,AllTemplatesDisableFilterAction,AllTemplatesEditAction,AllTemplatesGroupingAction,AllTemplatesOpenRoleAction,AllTemplatesSubsystemFilterAction,ChangeRightsDefaultPreferencesAction,ChangeRightsDenotationAction,ChangeRightsDenotationPictureAction,ChangeRightsDenotationPictureAndTextAction,ChangeRightsDenotationTextAction,CheckAllRightsAction,CleanUpAction,CollapseAllAction,CopyAction,DeleteAction,DeleteCommandAction,DeleteFilterAction,DeleteObjectAction,DeleteObjectRightsAction,DeleteRlsAction,DeleteRoleAction,DeleteSectionAction,DeleteTemplateAction,DisableFilterAction,DisableFilterByRigthsAction,EditObjectRightsAction,EditRlsAction,EditSectionAction,EditTemplateAction,ExpandAllAction,FilterByCurrentValueAction,GoToEditorAction,GoToObjectEditorAction,GoToObjectEditorAction,GoToRoleEditorAction,HideInvisibleByDefaultAction,LayersSetupAction,LegendElementsSetupAction,MoveCommandAction,MoveDownAction,MoveDownAction,MoveSubsystemAction,MoveUpAction,MoveUpAction,ObjectPropertyAction,RestoreAutomaticOrderAction,SelectInNavigatorAction,SelectInNavigatorAction,SetAllRightsAsProvidedAction,SetDefaultPropertiesAction,SetFilterAction,SetFilterByRightsAction,SetRoleColumnsFilterAction,UncheckAllRightsAction
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.
-
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
ConstructorsConstructorDescriptionCommandAction(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
Modifier and TypeMethodDescriptionvoiddispose()voidrun()voidrunWithEvent(org.eclipse.swt.widgets.Event event) voidvoidupdate(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, setToolTipTextMethods inherited from class org.eclipse.jface.action.AbstractAction
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListenerMethods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 Details
-
CommandAction
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 Details
-
dispose
public void dispose()- Specified by:
disposein interfaceorg.eclipse.ui.actions.ActionFactory.IWorkbenchAction
-
run
public void run()- Specified by:
runin interfaceorg.eclipse.jface.action.IAction- Overrides:
runin classorg.eclipse.jface.action.Action
-
runWithEvent
public void runWithEvent(org.eclipse.swt.widgets.Event event) - Specified by:
runWithEventin interfaceorg.eclipse.jface.action.IAction- Overrides:
runWithEventin classorg.eclipse.jface.action.Action
-
selectionChanged
- Specified by:
selectionChangedin interfaceISelectionChangedListener
-
update
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
-