Package com._1c.g5.v8.dt.ui.aef.actions
Class AbstractDtModelEditingSupportAwareAction
- java.lang.Object
-
- com._1c.g5.v8.dt.ui.aef.actions.DtCommandActionBase
-
- com._1c.g5.v8.dt.ui.aef.actions.AbstractDtModelEditingSupportAwareAction
-
- All Implemented Interfaces:
IDtAction
- Direct Known Subclasses:
DtDeleteAction
,DtEditAction
,DtMoveDownAction
,DtMoveUpAction
,DtSortAction
,LoadIntegrationServiceChannelsAction
public abstract class AbstractDtModelEditingSupportAwareAction extends DtCommandActionBase
The abstractIDtAction
command based implementation for actions that requires the check for editing capability.
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.ui.aef.actions.DtCommandActionBase
FEATURE_VARIABLE, MODEL_VARIABLE
-
-
Constructor Summary
Constructors Constructor Description AbstractDtModelEditingSupportAwareAction(IModelEditingSupport modelEditingSupport)
Initializes the instance with the given arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IModelEditingSupport
getModelEditingSupport()
Returns theIModelEditingSupport
instance.boolean
isEnabledFor(org.eclipse.emf.ecore.EObject model, org.eclipse.emf.ecore.EStructuralFeature feature, ISelection selection)
Checks whether the action is enabled for a givenmodel
, modelfeature
andselection
.-
Methods inherited from class com._1c.g5.v8.dt.ui.aef.actions.DtCommandActionBase
execute, executeWith, getCommandId, preExecute, setContextIds
-
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
-
-
-
-
Constructor Detail
-
AbstractDtModelEditingSupportAwareAction
public AbstractDtModelEditingSupportAwareAction(IModelEditingSupport modelEditingSupport)
Initializes the instance with the given arguments.- Parameters:
modelEditingSupport
- theIModelEditingSupport
instance, cannot benull
.
-
-
Method Detail
-
isEnabledFor
public boolean isEnabledFor(org.eclipse.emf.ecore.EObject model, org.eclipse.emf.ecore.EStructuralFeature feature, ISelection selection)
Checks whether the action is enabled for a givenmodel
, modelfeature
andselection
..
Returnstrue
if the specifiedselection
incapsulates theEObject
instance that can be edited.- Parameters:
model
- model to check.feature
- feature to check.selection
- selection to check.- Returns:
true
if action is enabled,false
otherwise.
-
getModelEditingSupport
protected final IModelEditingSupport getModelEditingSupport()
Returns theIModelEditingSupport
instance.- Returns:
- the
IModelEditingSupport
instance, nevernull
.
-
-