Class SelectFeaturePathWizardPage

  • All Implemented Interfaces:
    org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage

    public class SelectFeaturePathWizardPage
    extends org.eclipse.jface.wizard.WizardPage
    A wizard page that allows to create a segment based domain model reference by selecting the DMR's target feature in a tree view. The page automatically generates the segment path to the target feature.
    Author:
    Lucas Koehler
    • Field Summary

      • Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider

        ERROR, INFORMATION, NONE, WARNING
    • Constructor Summary

      Constructors 
      Constructor Description
      SelectFeaturePathWizardPage​(java.lang.String pageName, java.lang.String pageTitle, java.lang.String pageDescription, org.eclipse.emf.ecore.EClass rootEClass, org.eclipse.jface.viewers.ISelection firstSelection, SegmentGenerator segmentGenerator, EStructuralFeatureSelectionValidator selectionValidator, boolean allowMultiReferencesInPath)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void configureSegments​(java.util.List<org.eclipse.emf.ecore.EStructuralFeature> bottomUpPath)
      Generates segments from the given path and set them in this page's domain model reference.
      void createControl​(org.eclipse.swt.widgets.Composite parent)  
      protected org.eclipse.jface.viewers.ISelectionChangedListener createSelectionChangedListener()  
      protected org.eclipse.jface.viewers.TreeViewer createTreeViewer​(org.eclipse.swt.widgets.Composite composite)
      Creates the tree viewer of this wizard page.
      void dispose()  
      VDomainModelReference getDomainModelReference()  
      void setRootEClass​(org.eclipse.emf.ecore.EClass rootEClass)
      (Re-)sets the root EClass of this wizard page.
      • Methods inherited from class org.eclipse.jface.wizard.WizardPage

        canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
      • Methods inherited from class org.eclipse.jface.dialogs.DialogPage

        convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage

        getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible
    • Constructor Detail

      • SelectFeaturePathWizardPage

        public SelectFeaturePathWizardPage​(java.lang.String pageName,
                                           java.lang.String pageTitle,
                                           java.lang.String pageDescription,
                                           org.eclipse.emf.ecore.EClass rootEClass,
                                           org.eclipse.jface.viewers.ISelection firstSelection,
                                           SegmentGenerator segmentGenerator,
                                           EStructuralFeatureSelectionValidator selectionValidator,
                                           boolean allowMultiReferencesInPath)
        Parameters:
        pageName -
        pageTitle -
        pageDescription -
        rootEClass -
        firstSelection -
        segmentGenerator -
        selectionValidator -
        allowMultiReferencesInPath - true: Multi references are allowed in the middle of a reference path; false: they are only allowed as the last path segment
    • Method Detail

      • createControl

        public void createControl​(org.eclipse.swt.widgets.Composite parent)
      • createTreeViewer

        protected org.eclipse.jface.viewers.TreeViewer createTreeViewer​(org.eclipse.swt.widgets.Composite composite)
        Creates the tree viewer of this wizard page. Overwrite this if you want to use custom style flags for the TreeViewer.

        Note: This method should only create the viewer but not configure anymore stuff like the label provider.

        Parameters:
        composite - The Composite which will contain the tree viewer
        Returns:
        The created TreeViewer
      • setRootEClass

        public void setRootEClass​(org.eclipse.emf.ecore.EClass rootEClass)
        (Re-)sets the root EClass of this wizard page. This clears the current selection.
        Parameters:
        rootEClass - The new root EClass
      • createSelectionChangedListener

        protected org.eclipse.jface.viewers.ISelectionChangedListener createSelectionChangedListener()
        Returns:
        The ISelectionChangedListener for this page's TreeViewer.
      • configureSegments

        protected void configureSegments​(java.util.List<org.eclipse.emf.ecore.EStructuralFeature> bottomUpPath)
        Generates segments from the given path and set them in this page's domain model reference.
        Parameters:
        bottomUpPath - Path to the selected feature (including it). The selected feature is the last element in the list.
      • dispose

        public void dispose()
        Specified by:
        dispose in interface org.eclipse.jface.dialogs.IDialogPage
        Overrides:
        dispose in class org.eclipse.jface.dialogs.DialogPage