Class AbstractFilteredReferenceCommand<T extends org.eclipse.emf.ecore.EStructuralFeature>

  • Type Parameters:
    T - type of the EStructuralFeature 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 an EStructuralFeature using a dialog.
    Since:
    1.5
    Author:
    Eugen Neufeld
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand

        org.eclipse.emf.common.command.AbstractCommand.NonDirtying
    • Field Summary

      • Fields inherited from class org.eclipse.emf.edit.command.ChangeCommand

        changeDescription, changeRecorder, notifier, notifiers
      • Fields inherited from class org.eclipse.emf.common.command.AbstractCommand

        description, isExecutable, isPrepared, label
    • 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
      • Methods inherited from class org.eclipse.emf.common.command.AbstractCommand

        canExecute, canUndo, chain, getAffectedObjects, getDescription, getLabel, getResult, setDescription, setLabel, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 the ChangeCommand
        composedAdapterFactory - the ComposedAdapterFactory for the LabelProvider
        shell - the Shell to use in the dialog
        rootClass - the EClass which is the root of the view
        validator - the ECPSelectionStatusValidator to use when a selection was done
        allowMultiReferences - whether multi references are allowed during the selection
    • Method Detail

      • doExecute

        protected void doExecute()
        Specified by:
        doExecute in class org.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 - the EStructuralFeature to set
        bottomUpPath - the path to the feature