Package org.eclipse.epsilon.emf.dt
Class NewEmfModelWizard
- java.lang.Object
-
- org.eclipse.jface.wizard.Wizard
-
- org.eclipse.epsilon.emf.dt.NewEmfModelWizard
-
- All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider,org.eclipse.jface.wizard.IWizard,org.eclipse.ui.INewWizard,org.eclipse.ui.IWorkbenchWizard
public class NewEmfModelWizard extends org.eclipse.jface.wizard.Wizard implements org.eclipse.ui.INewWizardThis is a sample new wizard. Its role is to create a new file resource in the provided container. If the container resource (a folder or a project) is selected in the workspace when the wizard is opened, it will accept it as the target container. The wizard creates one file with the extension "ecore". If a sample multi-page editor (also available as a template) is registered for the same extension, it will be able to open it.
-
-
Field Summary
Fields Modifier and Type Field Description protected NewEmfModelWizardPagepageprotected org.eclipse.jface.viewers.ISelectionselection
-
Constructor Summary
Constructors Constructor Description NewEmfModelWizard()Constructor for NewEmfModelWizard.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPages()Adding the page to the wizard.voidinit(org.eclipse.ui.IWorkbench workbench, org.eclipse.jface.viewers.IStructuredSelection selection)We will accept the selection in the workbench to see if we can initialize from it.protected java.io.InputStreamopenContentStream()We will initialize file contents with a sample text.booleanperformFinish()This method is called when 'Finish' button is pressed in the wizard.protected voidthrowCoreException(java.lang.String message)-
Methods inherited from class org.eclipse.jface.wizard.Wizard
addPage, canFinish, createPageControls, dispose, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.jface.wizard.IWizard
canFinish, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer
-
-
-
-
Field Detail
-
page
protected NewEmfModelWizardPage page
-
selection
protected org.eclipse.jface.viewers.ISelection selection
-
-
Method Detail
-
addPages
public void addPages()
Adding the page to the wizard.- Specified by:
addPagesin interfaceorg.eclipse.jface.wizard.IWizard- Overrides:
addPagesin classorg.eclipse.jface.wizard.Wizard
-
performFinish
public boolean performFinish()
This method is called when 'Finish' button is pressed in the wizard. We will create an operation and run it using wizard as execution context.- Specified by:
performFinishin interfaceorg.eclipse.jface.wizard.IWizard- Specified by:
performFinishin classorg.eclipse.jface.wizard.Wizard
-
openContentStream
protected java.io.InputStream openContentStream()
We will initialize file contents with a sample text.
-
throwCoreException
protected void throwCoreException(java.lang.String message) throws org.eclipse.core.runtime.CoreException- Throws:
org.eclipse.core.runtime.CoreException
-
init
public void init(org.eclipse.ui.IWorkbench workbench, org.eclipse.jface.viewers.IStructuredSelection selection)We will accept the selection in the workbench to see if we can initialize from it.- Specified by:
initin interfaceorg.eclipse.ui.IWorkbenchWizard- See Also:
IWorkbenchWizard.init(IWorkbench, IStructuredSelection)
-
-