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
public abstract class DtCommandActionBase extends Object implements IDtAction
Base class forIHandlerbased actions.
-
-
Field Summary
Fields Modifier and Type Field Description static StringFEATURE_VARIABLEFeatureIEvaluationContextvariable name.static StringMODEL_VARIABLEModelIEvaluationContextvariable name.
-
Constructor Summary
Constructors Constructor Description DtCommandActionBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidexecute(String commandId, org.eclipse.core.commands.ExecutionEvent event)Extecute command with the given id and the given execution event.voidexecuteWith(org.eclipse.emf.ecore.EObject model, org.eclipse.emf.ecore.EStructuralFeature feature, ISelection selection)Executes the action for a givenmodel, modelfeatureandselection.protected abstract StringgetCommandId()Returns 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.Put action to section with active contextDtGranularEditorPageSingleColumnBuilder.section(java.lang.String)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.ui.aef.actions.IDtAction
getIcon, getToolTip, isEnabledFor
-
-
-
-
Field Detail
-
MODEL_VARIABLE
public static final String MODEL_VARIABLE
ModelIEvaluationContextvariable name.- See Also:
- Constant Field Values
-
FEATURE_VARIABLE
public static final String FEATURE_VARIABLE
FeatureIEvaluationContextvariable name.- See Also:
- Constant Field Values
-
-
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: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 public void setContextIds(String... contextIds)
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
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 benullfeature- feature to execute with, can be {@code nullselection- selection to execute with, cannot be {@code nullparameters- parameters to execute with, cannot be {@code null
-
-