Class AbstractSelectionComponent<M extends IEmfSelectionModel<? extends org.eclipse.emf.ecore.EObject>,P extends ISelectionParameterization>

All Implemented Interfaces:
IComponent<M>, IEventChannel
Direct Known Subclasses:
AbstractSelectionFromListDialogComponent, AbstractSelectionFromTreeDialogComponent

public abstract class AbstractSelectionComponent<M extends IEmfSelectionModel<? extends org.eclipse.emf.ecore.EObject>,P extends ISelectionParameterization> extends AbstractSelectionActionBarComponent<M,P>
The AbstractDtActionBarComponent implementation that allows to select values from dialog.
See Also:
  • Constructor Details

    • AbstractSelectionComponent

      protected AbstractSelectionComponent(P parameterization)
      Creates a new component.
      Parameters:
      parameterization - the parameterization, cannot be null
  • Method Details

    • attachToModel

      protected void attachToModel()
      Description copied from class: Component
      Attaches this component to the model. Override it to add some listeners to the model.
      Overrides:
      attachToModel in class Component<M extends IEmfSelectionModel<? extends org.eclipse.emf.ecore.EObject>,P extends ISelectionParameterization>
    • detachFromModel

      protected void detachFromModel()
      Description copied from class: Component
      Detaches this component from the model. Override it to remove listeners from the model.
      Overrides:
      detachFromModel in class Component<M extends IEmfSelectionModel<? extends org.eclipse.emf.ecore.EObject>,P extends ISelectionParameterization>
    • onSelectAction

      protected void onSelectAction()
      Description copied from class: AbstractSelectionActionBarComponent
      Invoked on the select button action.
      Specified by:
      onSelectAction in class AbstractSelectionActionBarComponent<M extends IEmfSelectionModel<? extends org.eclipse.emf.ecore.EObject>,P extends ISelectionParameterization>
    • getPresentationValue

      protected String getPresentationValue(M model, Object fromObject)
      Returns value presentation from selection model label provider.
      Parameters:
      model - the value model, cannot be null
      fromObject - the model object, cannot be null
      Returns:
      the presentation value, can be null
    • createSelectionDialog

      protected abstract ISwtSelectionDialog createSelectionDialog(org.eclipse.swt.widgets.Shell shell)
      Creates an ISwtSelectionDialog and returns it.
      Parameters:
      shell - the shell.
      Returns:
      a newly created ISwtSelectionDialog or null
    • getSelectedObjects

      protected abstract Object[] getSelectedObjects(M model)
      Returns the selected objects for dialog init.
      Parameters:
      model - the model.
      Returns:
      the selected objects.
    • setValueOnDialogResult

      protected abstract void setValueOnDialogResult(List<Object> result)
      Sets the result objects obtained from dialog to component model.
      Parameters:
      result - the dialog result.