org.eclipse.emf.ecp.spi.common.ui
Class SelectModelElementWizard

java.lang.Object
  extended by org.eclipse.jface.wizard.Wizard
      extended by org.eclipse.emf.ecp.spi.common.ui.ECPWizard<SelectionComposite<? extends org.eclipse.jface.viewers.ColumnViewer>>
          extended by org.eclipse.emf.ecp.spi.common.ui.SelectModelElementWizard
All Implemented Interfaces:
org.eclipse.jface.wizard.IWizard
Direct Known Subclasses:
CreateDomainModelReferenceWizard

public class SelectModelElementWizard
extends ECPWizard<SelectionComposite<? extends org.eclipse.jface.viewers.ColumnViewer>>

This is implementation of New Model Element wizard. This wizard is show through "Add new model element..." command in context menu of Navigator (only on right click on LeafSection). The wizard shows a tree of model packages and their classes. The user can select a Model Element type in this tree and on finish the model element is created, added to Leaf- or CompositeSection and opend for editing.

Author:
Eugen Neufeld

Nested Class Summary
 class SelectModelElementWizard.WizardPageExtension
           
 
Field Summary
 
Fields inherited from class org.eclipse.jface.wizard.Wizard
DEFAULT_IMAGE
 
Constructor Summary
SelectModelElementWizard(String windowTitle, String pageName, String pageTitle, String description)
          Constructor to select an EClass.
SelectModelElementWizard(String windowTitle, String pageName, String pageTitle, String description, Class<?> classtoSelect)
          Constructor to select an class to be specified.
 
Method Summary
 void addPages()
          
 void dispose()
           
 String getDescription()
           
 String getPageName()
           
 String getPageTitle()
           
 boolean performFinish()
          .
 
Methods inherited from class org.eclipse.emf.ecp.spi.common.ui.ECPWizard
setCompositeProvider
 
Methods inherited from class org.eclipse.jface.wizard.Wizard
addPage, canFinish, createPageControls, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectModelElementWizard

public SelectModelElementWizard(String windowTitle,
                                String pageName,
                                String pageTitle,
                                String description)
Constructor to select an EClass.

Parameters:
windowTitle - The window title
pageName - the name of the page
pageTitle - the title of the page
description - the description

SelectModelElementWizard

public SelectModelElementWizard(String windowTitle,
                                String pageName,
                                String pageTitle,
                                String description,
                                Class<?> classtoSelect)
Constructor to select an class to be specified.

Parameters:
windowTitle - The window title
pageName - the name of the page
pageTitle - the title of the page
description - the description
classtoSelect - the class which can be selected
Method Detail

addPages

public void addPages()

Specified by:
addPages in interface org.eclipse.jface.wizard.IWizard
Overrides:
addPages in class org.eclipse.jface.wizard.Wizard

performFinish

public boolean performFinish()
. () This method creates a model element instance from selected type, adds it to Leaf- or CompositeSection, and opens it.

Specified by:
performFinish in interface org.eclipse.jface.wizard.IWizard
Specified by:
performFinish in class org.eclipse.jface.wizard.Wizard

dispose

public void dispose()
Specified by:
dispose in interface org.eclipse.jface.wizard.IWizard
Overrides:
dispose in class org.eclipse.jface.wizard.Wizard

getPageName

public String getPageName()
Returns:
the pageName
Since:
1.5

getDescription

public String getDescription()
Returns:
the description
Since:
1.5

getPageTitle

public String getPageTitle()
Returns:
the pageTitle
Since:
1.5


Copyright © 2015. All Rights Reserved.