Class DtCommandActionBase

    • Constructor Detail

      • DtCommandActionBase

        public DtCommandActionBase()
    • Method Detail

      • 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
        model - model to execute with.
        feature - feature to execute with.
        selection - selection to execute with.
      • 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.
        commandId - the command id, cannot be null
        event - the execution event, cannot be null
        org.eclipse.core.commands.common.CommandException - if comman execution fails
      • getCommandId

        protected abstract String getCommandId()
        Returns the command id to execute.
        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.
        model - model to execute with, can be null
        feature - feature to execute with, can be {@code null
        selection - selection to execute with, cannot be {@code null
        parameters - parameters to execute with, cannot be {@code null