public class InitialModelCreationPage<T extends IMetaModelDescriptor>
extends org.eclipse.jface.wizard.WizardPage
This page lists available metamodel descriptors, EPackages and EClassifiers for creating a model file. It allows clients to select the metamodel descriptor, EPackage and EClassifier that they would like to use for creating their model file. The selected results of metamodel descriptor, EPackage and EClassifier are passed to the post pages, e.g., NewModelFileCreationPage, using model file properties. This page may be used by clients as it is; it may also be subclassed to suit.
Modifier and Type | Class and Description |
---|---|
protected class |
InitialModelCreationPage.EClassifierButtonAdapter
Button adapter for the choice of EClassifier.
|
protected class |
InitialModelCreationPage.EPackageButtonAdapter
Button adapter for the choice of EPackage.
|
class |
InitialModelCreationPage.fieldListener
Field listener to deal with change events of dialog fields.
|
protected class |
InitialModelCreationPage.MetaModelDescriptorButtonAdapter
Button adapter for the choice of metamodel.
|
Modifier and Type | Field and Description |
---|---|
protected T |
baseMetaModelDescriptor |
protected ComboButtonField |
eClassifierCombo |
protected ComboButtonField |
ePackageCombo |
protected InitialModelProperties<T> |
initialModelProperties |
protected ComboButtonField |
metaModelDescriptorCombo |
protected org.eclipse.jface.viewers.ISelection |
selection |
protected java.util.List<org.eclipse.emf.ecore.EClassifier> |
supportedEClassifiers |
protected java.util.List<org.eclipse.emf.ecore.EPackage> |
supportedEPackages |
protected java.util.List<T> |
supportedMetaModelDescriptors |
Constructor and Description |
---|
InitialModelCreationPage(java.lang.String pageName,
org.eclipse.jface.viewers.ISelection selection,
InitialModelProperties<T> initialModelProperties,
T baseMetaModelDescriptor)
Creates a new instance of model creation wizard page.
|
Modifier and Type | Method and Description |
---|---|
void |
createControl(org.eclipse.swt.widgets.Composite parent)
Creates and adds the ComboButtonFields for metamodel descriptor, EPackage and EClassifier under the given parent
composite.
|
protected void |
createEClassifierComboButtonField(org.eclipse.swt.widgets.Composite container)
Creates a ComboButtonField for the choice of EClassifier.
|
protected void |
createEPackageComboButtonField(org.eclipse.swt.widgets.Composite container)
Creates a ComboButtonField for the choice of EPackage.
|
protected void |
createMetaModelDescriptorComboButtonField(org.eclipse.swt.widgets.Composite container)
Creates a ComboButtonField for the choice of the metamodel descriptor.
|
protected void |
fillEClassifierCombo()
Set the supported EClassifiers as the resource items in the EClassifier combo field.
|
protected void |
fillEPackageCombo()
Sets the supported EPackages as the resource items in the EPackage combo field.
|
protected void |
fillMetaModelDescriptorCombo()
Sets the supported metamodel descriptors as the resource items in the metamodel descriptor combo field.
|
protected java.util.List<T> |
getSupportedMetaModelDescriptors()
Gets the supported metamodel descriptors, all the metamodel descriptors that are registed by default.
|
protected void |
initSupportedEClassifiers()
Sets supported EClassifiers depending on the selected EPackage value
|
protected void |
initSupportedEPackages()
Sets supported EPackages depending on the selected metamodel descriptor
|
protected boolean |
validatePage()
The framework calls this to validate if all the field are selected.
|
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible
protected ComboButtonField metaModelDescriptorCombo
protected ComboButtonField ePackageCombo
protected ComboButtonField eClassifierCombo
protected java.util.List<T extends IMetaModelDescriptor> supportedMetaModelDescriptors
protected java.util.List<org.eclipse.emf.ecore.EPackage> supportedEPackages
protected java.util.List<org.eclipse.emf.ecore.EClassifier> supportedEClassifiers
protected InitialModelProperties<T extends IMetaModelDescriptor> initialModelProperties
protected T extends IMetaModelDescriptor baseMetaModelDescriptor
protected org.eclipse.jface.viewers.ISelection selection
public InitialModelCreationPage(java.lang.String pageName, org.eclipse.jface.viewers.ISelection selection, InitialModelProperties<T> initialModelProperties, T baseMetaModelDescriptor)
pageName
- the name of the pageselection
- the current resource selectioninitialModelProperties
- the chosen initial model properties (metamodel descriptor,
EPackage and EClassifier) to be used as basis for creating the initial model of the new model file,
must not be null
baseMetaModelDescriptor
- the base meta model descriptor to be used for the creation of model fileprotected java.util.List<T> getSupportedMetaModelDescriptors()
public void createControl(org.eclipse.swt.widgets.Composite parent)
IDialogPage.createControl(org.eclipse.swt.widgets.Composite)
protected void createMetaModelDescriptorComboButtonField(org.eclipse.swt.widgets.Composite container)
protected void createEPackageComboButtonField(org.eclipse.swt.widgets.Composite container)
protected void createEClassifierComboButtonField(org.eclipse.swt.widgets.Composite container)
protected void fillMetaModelDescriptorCombo()
protected void fillEPackageCombo()
protected void fillEClassifierCombo()
protected void initSupportedEPackages()
protected void initSupportedEClassifiers()
protected boolean validatePage()