public class CreateSegmentDmrWizard
extends org.eclipse.jface.wizard.Wizard
Constructor and Description |
---|
CreateSegmentDmrWizard(org.eclipse.emf.ecore.EClass rootEClass,
String windowTitle,
VDomainModelReference existingDMR,
EStructuralFeatureSelectionValidator selectionValidator)
Creates a new dmr creation with default values for segment generation (= a simple feature segment path), segment
types (all none restricted types), and the required last segment type (all are allowed) in advanced mode.
|
CreateSegmentDmrWizard(org.eclipse.emf.ecore.EClass rootEClass,
String windowTitle,
VDomainModelReference existingDMR,
EStructuralFeatureSelectionValidator selectionValidator,
SegmentGenerator segmentGenerator,
org.eclipse.emf.ecore.EClass lastSegmentType,
boolean ignoreSegmentIdeRestriction)
A wizard used for creating and configuring a DomainModelReference.
|
CreateSegmentDmrWizard(String windowTitle,
EStructuralFeatureSelectionValidator selectionValidator,
SegmentGenerator segmentGenerator,
org.eclipse.emf.ecore.EClass lastSegmentType,
boolean ignoreSegmentIdeRestriction)
A wizard used for creating a new DomainModelReference.
|
Modifier and Type | Method and Description |
---|---|
void |
addPages() |
boolean |
canFinish() |
protected Collection<SegmentIdeDescriptor> |
collectSegmentIdeDescriptors(boolean ignoreSegmentIdeRestriction)
Collect all
SegmentIdeDescriptors for the advanced mode. |
void |
dispose() |
Optional<VDomainModelReference> |
getDomainModelReference()
Returns the configured
VDomainModelReference . |
org.eclipse.jface.wizard.IWizardPage |
getNextPage(org.eclipse.jface.wizard.IWizardPage page) |
Optional<org.eclipse.emf.ecore.EClass> |
getRootEClass()
Returns the root
EClass of the domain model reference. |
Optional<org.eclipse.core.resources.IFile> |
getSelectedEcore() |
boolean |
performFinish() |
addPage, createPageControls, getContainer, getDefaultPageImage, getDialogSettings, getPage, getPageCount, getPages, getPreviousPage, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle
public CreateSegmentDmrWizard(org.eclipse.emf.ecore.EClass rootEClass, String windowTitle, VDomainModelReference existingDMR, EStructuralFeatureSelectionValidator selectionValidator, SegmentGenerator segmentGenerator, org.eclipse.emf.ecore.EClass lastSegmentType, boolean ignoreSegmentIdeRestriction)
rootEClass
- The root EClass
of the DMR to create. IF this is null
, the
wizard offers to chose a root EClass. To make this clear, you might want to use the constructor
CreateSegmentDmrWizard(String, EStructuralFeatureSelectionValidator, SegmentGenerator, EClass, boolean)
.windowTitle
- The title for the wizard windowexistingDMR
- The domain model reference to configure. May be null. If this is given the initial selection
of the wizard is based on this but the given DMR will not be changed. A new one is returned.selectionValidator
- Validates whether a selected structural feature is a valid selection (e.g. the
selection could be required to be a multi reference)segmentGenerator
- The SegmentGenerator
used in the simple dmr creation modelastSegmentType
- The type that the last segment in advanced creation mode must have, or
null if there is no restrictionignoreSegmentIdeRestriction
- If true
, all types of segments are available independently of the
configuration in their SegmentIdeDescriptor
.public CreateSegmentDmrWizard(String windowTitle, EStructuralFeatureSelectionValidator selectionValidator, SegmentGenerator segmentGenerator, org.eclipse.emf.ecore.EClass lastSegmentType, boolean ignoreSegmentIdeRestriction)
windowTitle
- The title for the wizard windowselectionValidator
- Validates whether a selected structural feature is a valid selection (e.g. the
selection could be required to be a multi reference)segmentGenerator
- The SegmentGenerator
used in the simple dmr creation modelastSegmentType
- The type that the last segment in advanced creation mode must have, or
null if there is no restrictionignoreSegmentIdeRestriction
- If true
, all types of segments are available independently of the
configuration in their SegmentIdeDescriptor
.public CreateSegmentDmrWizard(org.eclipse.emf.ecore.EClass rootEClass, String windowTitle, VDomainModelReference existingDMR, EStructuralFeatureSelectionValidator selectionValidator)
rootEClass
- The root EClass
of the DMR to create. IF this is null
, the
wizard offers to chose a root EClass. To make this clear, you might want to use the constructor
CreateSegmentDmrWizard(String, EStructuralFeatureSelectionValidator, SegmentGenerator, EClass, boolean)
.windowTitle
- The title for the wizard windowexistingDMR
- The domain model reference to configure. May be null. If this is given the initial selection
of the wizard is based on this but the given DMR will not be changed. A new one is returned.selectionValidator
- Validates whether a selected structural feature is a valid selection (e.g. the
selection could be required to be a multi reference)protected Collection<SegmentIdeDescriptor> collectSegmentIdeDescriptors(boolean ignoreSegmentIdeRestriction)
SegmentIdeDescriptors
for the advanced mode.ignoreSegmentIdeRestriction
- Whether the descriptors' availability flag must be considered when collecting
the descriptorsSegmentIdeDescriptors
; might be empty but never
null
SegmentIdeDescriptor.isAvailableInIde()
public Optional<VDomainModelReference> getDomainModelReference()
VDomainModelReference
. This is either a new DMR or the edited input DMR.
The return value is empty if the dialog was cancelled or the dialog is still open.VDomainModelReference
or an empty value if the dialog was cancelledpublic org.eclipse.jface.wizard.IWizardPage getNextPage(org.eclipse.jface.wizard.IWizardPage page)
getNextPage
in interface org.eclipse.jface.wizard.IWizard
getNextPage
in class org.eclipse.jface.wizard.Wizard
public void dispose()
dispose
in interface org.eclipse.jface.wizard.IWizard
dispose
in class org.eclipse.jface.wizard.Wizard
public void addPages()
addPages
in interface org.eclipse.jface.wizard.IWizard
addPages
in class org.eclipse.jface.wizard.Wizard
public Optional<org.eclipse.core.resources.IFile> getSelectedEcore()
public Optional<org.eclipse.emf.ecore.EClass> getRootEClass()
EClass
of the domain model reference. IF a root EClass was given when this wizard was
created, it is returned. Otherwise, the EClass selected by the user is returned. If no EClass was given and the
dialog was cancelled before an EClass was selected, nothing is returned.EClass
of the created/configured domain model reference or nothing if no EClass was
given and selected.public boolean performFinish()
performFinish
in interface org.eclipse.jface.wizard.IWizard
performFinish
in class org.eclipse.jface.wizard.Wizard
public boolean canFinish()
canFinish
in interface org.eclipse.jface.wizard.IWizard
canFinish
in class org.eclipse.jface.wizard.Wizard
Copyright © 2019. All rights reserved.