Class SelectFeaturePathWizardPage
- java.lang.Object
-
- org.eclipse.jface.dialogs.DialogPage
-
- org.eclipse.jface.wizard.WizardPage
-
- org.eclipse.emf.ecp.view.internal.editor.handler.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
-
-
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 rootEClass
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
-
-
-
-
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
-
getDomainModelReference
public VDomainModelReference getDomainModelReference()
- Returns:
- The
VDomainModelReference
which is configured in this page
-
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 theTreeViewer
.Note: This method should only create the viewer but not configure anymore stuff like the label provider.
- Parameters:
composite
- TheComposite
which will contain the tree viewer- Returns:
- The created
TreeViewer
-
setRootEClass
public void setRootEClass(org.eclipse.emf.ecore.EClass rootEClass)
(Re-)sets the rootEClass
of this wizard page. This clears the current selection.- Parameters:
rootEClass
- The new rootEClass
-
createSelectionChangedListener
protected org.eclipse.jface.viewers.ISelectionChangedListener createSelectionChangedListener()
- Returns:
- The
ISelectionChangedListener
for this page'sTreeViewer
.
-
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 interfaceorg.eclipse.jface.dialogs.IDialogPage
- Overrides:
dispose
in classorg.eclipse.jface.dialogs.DialogPage
-
-