Class DtCommandActionBase

java.lang.Object
com._1c.g5.v8.dt.ui.aef.actions.DtCommandActionBase
All Implemented Interfaces:
IDtAction
Direct Known Subclasses:
AbstractDtModelEditingSupportAwareAction, DtCollapseAllAction, DtExpandAllAction, DtPredefinedFolderAddAction, DtPredefinedItemAddAction, DtPredefinedItemMoveAction, XdtoToXsdAction

public abstract class DtCommandActionBase extends Object implements IDtAction
Base class for IHandler based actions.
  • Field Details

  • Constructor Details

    • DtCommandActionBase

      public DtCommandActionBase()
  • Method Details

    • executeWith

      public final void executeWith(org.eclipse.emf.ecore.EObject model, org.eclipse.emf.ecore.EStructuralFeature feature, ISelection selection)
      Description copied from interface: IDtAction
      Executes the action for a given model, model feature and selection.
      Specified by:
      executeWith in interface IDtAction
      Parameters:
      model - model to execute with.
      feature - feature to execute with.
      selection - selection to execute with.
    • setContextIds

      @Deprecated public void setContextIds(String... contextIds)
      Deprecated.
      Sets context ids to activate on execute.
      Parameters:
      contextIds - the context id.
    • execute

      protected void execute(String commandId, org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.common.CommandException
      Extecute command with the given id and the given execution event.
      Parameters:
      commandId - the command id, cannot be null
      event - the execution event, cannot be null
      Throws:
      org.eclipse.core.commands.common.CommandException - if comman execution fails
    • getCommandId

      protected abstract String getCommandId()
      Returns the command id to execute.
      Returns:
      the command id to execute, never null
    • preExecute

      protected void preExecute(org.eclipse.emf.ecore.EObject model, org.eclipse.emf.ecore.EStructuralFeature feature, ISelection selection, org.eclipse.core.expressions.IEvaluationContext context, Map<String,String> parameters)
      Subclasses may override this method to specify custom pre-execution logic.
      Parameters:
      model - model to execute with, can be null
      feature - feature to execute with, can be {@code null @param selection selection to execute with, cannot be {@code null @param parameters parameters to execute with, cannot be {@code null