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 void
Extecute command with the given id and the given execution event.final 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
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.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 Details
-
MODEL_VARIABLE
ModelIEvaluationContext
variable name.- See Also:
-
FEATURE_VARIABLE
FeatureIEvaluationContext
variable 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: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.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
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 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)