Package com._1c.g5.v8.dt.ui.aef.actions
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
Base class for
IHandler based actions.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidExtecute command with the given id and the given execution event.final voidexecuteWith(org.eclipse.emf.ecore.EObject model, org.eclipse.emf.ecore.EStructuralFeature feature, ISelection selection) Executes the action for a givenmodel, modelfeatureandselection.protected abstract StringReturns the command id to execute.protected voidpreExecute(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.voidsetContextIds(String... contextIds) Deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com._1c.g5.v8.dt.ui.aef.actions.IDtAction
getIcon, getToolTip, isEnabledFor
-
Field Details
-
MODEL_VARIABLE
ModelIEvaluationContextvariable name.- See Also:
-
FEATURE_VARIABLE
FeatureIEvaluationContextvariable name.- See Also:
-
-
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:IDtActionExecutes the action for a givenmodel, modelfeatureandselection.- Specified by:
executeWithin interfaceIDtAction- Parameters:
model- model to execute with.feature- feature to execute with.selection- selection to execute with.
-
setContextIds
Deprecated.Put action to section with active contextDtGranularEditorPageSingleColumnBuilder.section(java.lang.String)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 benullevent- the execution event, cannot benull- Throws:
org.eclipse.core.commands.common.CommandException- if comman execution fails
-
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 benullfeature- 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
-
DtGranularEditorPageSingleColumnBuilder.section(java.lang.String)