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

    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

    Modifier and Type
    Method
    Description
    void
    void
    run()
    void
    runWithEvent(org.eclipse.swt.widgets.Event event)
    void
     
    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 Details

    • 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 be null.
    • 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 be null.
    • 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 be null.
      style - the style
      menuIdIn -
  • Method Details

    • dispose

      public void dispose()
      Specified by:
      dispose in interface org.eclipse.ui.actions.ActionFactory.IWorkbenchAction
    • run

      public void run()
      Specified by:
      run in interface org.eclipse.jface.action.IAction
      Overrides:
      run in class org.eclipse.jface.action.Action
    • runWithEvent

      public void runWithEvent(org.eclipse.swt.widgets.Event event)
      Specified by:
      runWithEvent in interface org.eclipse.jface.action.IAction
      Overrides:
      runWithEvent in class org.eclipse.jface.action.Action
    • selectionChanged

      public void selectionChanged(SelectionChangedEvent event)
      Specified by:
      selectionChanged in interface ISelectionChangedListener
    • 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