public class ViewModelWizard
extends org.eclipse.jface.wizard.Wizard
implements org.eclipse.ui.INewWizard
Modifier and Type | Field and Description |
---|---|
static List<String> |
FILE_EXTENSIONS
The supported extensions for created files.
|
static String |
FORMATTED_FILE_EXTENSIONS
A formatted list of supported file extensions, suitable for display.
|
protected List<String> |
initialObjectNames
Caches the names of the types that can be created as the root object.
|
protected org.eclipse.jface.viewers.IStructuredSelection |
selection
Remember the selection during initialization for populating the default
container.
|
protected VViewFactory |
viewFactory
This caches an instance of the model factory.
|
protected VViewPackage |
viewPackage
This caches an instance of the model package.
|
protected org.eclipse.ui.IWorkbench |
workbench
Remember the workbench during initialization.
|
Constructor and Description |
---|
ViewModelWizard() |
Modifier and Type | Method and Description |
---|---|
protected void |
addContribution(org.eclipse.core.resources.IFile modelFile)
Contributes the view model via the "..provider.xmi" extension point.
|
void |
addPages()
The framework calls this to create the contents of the wizard.
|
protected void |
addToBuildProperties(org.eclipse.core.resources.IFile modelFile)
Adds the folder where the view model is created to the project's build.properties file.
|
boolean |
canFinish() |
void |
clearSelectedContainer() |
protected Collection<String> |
getInitialObjectNames()
Returns the names of the types that can be created as the root object.
|
org.eclipse.jface.wizard.IWizardPage |
getNextPage(org.eclipse.jface.wizard.IWizardPage page) |
org.eclipse.jface.wizard.IWizardPage |
getPreviousPage(org.eclipse.jface.wizard.IWizardPage page) |
protected org.eclipse.core.resources.IFile |
getSelectedEcore() |
org.eclipse.jface.wizard.IWizardPage |
getStartingPage() |
static IDEViewModelRegistry |
getViewModelRegistry()
Return the
IDEViewModelRegistry . |
void |
init(org.eclipse.ui.IWorkbench workbench,
org.eclipse.jface.viewers.IStructuredSelection selection)
This just records the information.
|
boolean |
performFinish()
Do the work after everything is specified.
|
void |
setSelectedContainer(Object selectedContainer) |
void |
setSelection(org.eclipse.jface.viewers.IStructuredSelection selection) |
void |
setWorkbench(org.eclipse.ui.IWorkbench workbench) |
addPage, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getPage, getPageCount, getPages, getShell, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getPage, getPageCount, getPages, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer
public static final List<String> FILE_EXTENSIONS
public static final String FORMATTED_FILE_EXTENSIONS
protected VViewPackage viewPackage
protected VViewFactory viewFactory
protected org.eclipse.jface.viewers.IStructuredSelection selection
protected org.eclipse.ui.IWorkbench workbench
public void setSelectedContainer(Object selectedContainer)
selectedContainer
- the selectedContainer to setpublic void clearSelectedContainer()
public void setSelection(org.eclipse.jface.viewers.IStructuredSelection selection)
selection
- the selection to setpublic void init(org.eclipse.ui.IWorkbench workbench, org.eclipse.jface.viewers.IStructuredSelection selection)
init
in interface org.eclipse.ui.IWorkbenchWizard
protected Collection<String> getInitialObjectNames()
public void addPages()
addPages
in interface org.eclipse.jface.wizard.IWizard
addPages
in class org.eclipse.jface.wizard.Wizard
public org.eclipse.jface.wizard.IWizardPage getStartingPage()
getStartingPage
in interface org.eclipse.jface.wizard.IWizard
getStartingPage
in class org.eclipse.jface.wizard.Wizard
public 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 org.eclipse.jface.wizard.IWizardPage getPreviousPage(org.eclipse.jface.wizard.IWizardPage page)
getPreviousPage
in interface org.eclipse.jface.wizard.IWizard
getPreviousPage
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
public boolean performFinish()
performFinish
in interface org.eclipse.jface.wizard.IWizard
performFinish
in class org.eclipse.jface.wizard.Wizard
protected org.eclipse.core.resources.IFile getSelectedEcore()
protected void addToBuildProperties(org.eclipse.core.resources.IFile modelFile)
modelFile
- the view model IFileprotected void addContribution(org.eclipse.core.resources.IFile modelFile)
modelFile
- the view model IFilepublic static IDEViewModelRegistry getViewModelRegistry()
IDEViewModelRegistry
.IDEViewModelRegistry
public void setWorkbench(org.eclipse.ui.IWorkbench workbench)
workbench
- the workbench to setCopyright © 2019. All rights reserved.