Class AbstractFilteredReferenceCommand<T extends org.eclipse.emf.ecore.EStructuralFeature>
- java.lang.Object
-
- org.eclipse.emf.common.command.AbstractCommand
-
- org.eclipse.emf.edit.command.ChangeCommand
-
- org.eclipse.emf.ecp.view.spi.editor.controls.AbstractFilteredReferenceCommand<T>
-
- Type Parameters:
T
- type of theEStructuralFeature
which can be selected
- All Implemented Interfaces:
org.eclipse.emf.common.command.Command
public abstract class AbstractFilteredReferenceCommand<T extends org.eclipse.emf.ecore.EStructuralFeature> extends org.eclipse.emf.edit.command.ChangeCommand
A ReferenceCommand allowing to select anEStructuralFeature
using a dialog.- Since:
- 1.5
- Author:
- Eugen Neufeld
-
-
Constructor Summary
Constructors Constructor Description AbstractFilteredReferenceCommand(org.eclipse.emf.common.notify.Notifier notifier, org.eclipse.emf.edit.provider.ComposedAdapterFactory composedAdapterFactory, org.eclipse.swt.widgets.Shell shell, org.eclipse.emf.ecore.EClass rootClass, ECPSelectionStatusValidator validator, boolean allowMultiReferences)
Constructor for the AbstractFilteredReferenceCommand.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
doExecute()
protected abstract void
setSelectedValues(T selectedFeature, java.util.List<org.eclipse.emf.ecore.EReference> bottomUpPath)
Template method which is called so that the selected element can be saved.-
Methods inherited from class org.eclipse.emf.edit.command.ChangeCommand
createChangeRecorder, dispose, disposeChangeRecorder, execute, getChangeDescription, getChangeRecorder, prepare, redo, setChangeDescription, undo
-
-
-
-
Constructor Detail
-
AbstractFilteredReferenceCommand
public AbstractFilteredReferenceCommand(org.eclipse.emf.common.notify.Notifier notifier, org.eclipse.emf.edit.provider.ComposedAdapterFactory composedAdapterFactory, org.eclipse.swt.widgets.Shell shell, org.eclipse.emf.ecore.EClass rootClass, ECPSelectionStatusValidator validator, boolean allowMultiReferences)
Constructor for the AbstractFilteredReferenceCommand.- Parameters:
notifier
- the Notifier for theChangeCommand
composedAdapterFactory
- theComposedAdapterFactory
for the LabelProvidershell
- theShell
to use in the dialogrootClass
- theEClass
which is the root of the viewvalidator
- theECPSelectionStatusValidator
to use when a selection was doneallowMultiReferences
- whether multi references are allowed during the selection
-
-
Method Detail
-
doExecute
protected void doExecute()
- Specified by:
doExecute
in classorg.eclipse.emf.edit.command.ChangeCommand
-
setSelectedValues
protected abstract void setSelectedValues(T selectedFeature, java.util.List<org.eclipse.emf.ecore.EReference> bottomUpPath)
Template method which is called so that the selected element can be saved.- Parameters:
selectedFeature
- theEStructuralFeature
to setbottomUpPath
- the path to the feature
-
-