org.eclipse.emf.common.ui.wizard
Class AbstractExampleInstallerWizard
java.lang.Object
org.eclipse.jface.wizard.Wizard
org.eclipse.emf.common.ui.wizard.AbstractExampleInstallerWizard
- All Implemented Interfaces:
- INewWizard, IWizard, IWorkbenchWizard
- Direct Known Subclasses:
- ExampleInstallerWizard
- public abstract class AbstractExampleInstallerWizard
- extends Wizard
- implements INewWizard
This abstract example installer wizard simply copies or unzips a number of files and
directories into the workspace, creating the projects to hold them. This wizard can be
added as a new wizard to the new wizards dialog through the
org.eclipse.ui.newWizards extension point.
Clients should subclass this class and override the getProjectDescriptors()
method to provide the location and name of the project content that should be added to the
workspace. Note that any projects that are already in the workspace will not be
overwritten because the user could have made changes to them that would be lost.
It is highly recommended when registering subclasses to the new wizards extension point
that the wizard declaration should have canFinishEarly = true. Any label and icon can be
freely given to the wizard to suit the needs of the client.
- Since:
- 2.2.0
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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.wizard.IWizard |
canFinish, createPageControls, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer |
OVERWRITE_ALL_QUERY
protected static final IOverwriteQuery OVERWRITE_ALL_QUERY
workbench
protected IWorkbench workbench
structuredSelection
protected IStructuredSelection structuredSelection
projectPage
protected AbstractExampleInstallerWizard.ProjectPage projectPage
AbstractExampleInstallerWizard
public AbstractExampleInstallerWizard()
init
public void init(IWorkbench workbench,
IStructuredSelection selection)
- Specified by:
init
in interface IWorkbenchWizard
getProjectDescriptors
protected abstract List getProjectDescriptors()
getFilesToOpen
protected abstract List getFilesToOpen()
dispose
public void dispose()
- Specified by:
dispose
in interface IWizard
addPages
public void addPages()
- Specified by:
addPages
in interface IWizard
performFinish
public boolean performFinish()
- Specified by:
performFinish
in interface IWizard
installExample
protected void installExample(IProgressMonitor progressMonitor)
throws Exception
- Throws:
Exception
openFiles
protected void openFiles(IProgressMonitor progressMonitor)
openErrorDialog
protected void openErrorDialog(String message,
Throwable throwable)
createProject
protected void createProject(AbstractExampleInstallerWizard.ProjectDescriptor projectDescriptor,
IProgressMonitor monitor)
throws CoreException
- Throws:
CoreException
createImportOperation
protected ImportOperation createImportOperation(AbstractExampleInstallerWizard.ProjectDescriptor projectDescriptor)
throws Exception
- Throws:
Exception
createDirectoryImportOperation
protected ImportOperation createDirectoryImportOperation(AbstractExampleInstallerWizard.ProjectDescriptor projectDescriptor)
throws Exception
- Throws:
Exception
createFileImportOperation
protected ImportOperation createFileImportOperation(AbstractExampleInstallerWizard.ProjectDescriptor projectDescriptor)
throws Exception
- Throws:
Exception
isZipFile
protected boolean isZipFile(File file)
createZipImportOperation
protected ImportOperation createZipImportOperation(AbstractExampleInstallerWizard.ProjectDescriptor projectDescriptor,
File file)
throws Exception
- Throws:
Exception
getWorkbench
protected IWorkbench getWorkbench()
getSelection
protected IStructuredSelection getSelection()
openEditor
protected void openEditor(IFile file,
String editorID)
throws PartInitException
- Throws:
PartInitException