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 forIHandler
based actions.
-
-
Field Summary
Fields Modifier and Type Field Description static String
FEATURE_VARIABLE
FeatureIEvaluationContext
variable name.static String
MODEL_VARIABLE
ModelIEvaluationContext
variable 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 void
execute(String commandId, org.eclipse.core.commands.ExecutionEvent event)
Extecute command with the given id and the given execution event.void
executeWith(org.eclipse.emf.ecore.EObject model, org.eclipse.emf.ecore.EStructuralFeature feature, ISelection selection)
Executes the action for a givenmodel
, modelfeature
andselection
.protected abstract String
getCommandId()
Returns the command id to execute.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.void
setContextIds(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
ModelIEvaluationContext
variable name.- See Also:
- Constant Field Values
-
FEATURE_VARIABLE
public static final String FEATURE_VARIABLE
FeatureIEvaluationContext
variable 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:IDtAction
Executes the action for a givenmodel
, modelfeature
andselection
.- Specified by:
executeWith
in 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 benull
event
- 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 benull
feature
- feature to execute with, can be {@code nullselection
- selection to execute with, cannot be {@code nullparameters
- parameters to execute with, cannot be {@code null
-
-