public abstract class AbstractExistingModelHandler extends java.lang.Object implements IExistingModelHandler
IExistingModelHandler
interface. This
implementation splits the IExistingModelHandler.createFiles(IProgressMonitor, ExistingModelConfiguration)
method into three steps; preFileCreation, doFileCreation, postFileCreation.
The default implementation of postFileCreation, opens the first newly created model in an eclipse editor.
Constructor and Description |
---|
AbstractExistingModelHandler() |
Modifier and Type | Method and Description |
---|---|
ExistingModelConfiguration |
createExistingModelConfiguration(org.eclipse.core.resources.IFile sourceModel)
Creates the existing model configuration for the given source model,
to be populated by the wizard.
|
boolean |
createFiles(org.eclipse.core.runtime.IProgressMonitor progressMonitor,
ExistingModelConfiguration config)
Creates model files using the data from the given existing model configuration.
|
protected abstract org.eclipse.core.resources.IFile[] |
doCreateFiles(org.eclipse.core.runtime.IProgressMonitor progressMonitor,
ExistingModelConfiguration config)
Create the model files.
|
protected java.lang.String |
getFinalPerspective(ExistingModelConfiguration config)
Return the id which identifies a perspective to activate.
|
protected java.lang.String |
getPreferredPerspectives(ExistingModelConfiguration config)
Return a comma-separated list of perspective IDs.
|
protected boolean |
postFileCreation(org.eclipse.core.runtime.IProgressMonitor progressMonitor,
org.eclipse.core.resources.IFile[] files)
Complete post file creation tasks.
|
protected boolean |
preFileCreation(org.eclipse.core.runtime.IProgressMonitor progressMonitor,
ExistingModelConfiguration config)
Complete pre file creation tasks.
|
public ExistingModelConfiguration createExistingModelConfiguration(org.eclipse.core.resources.IFile sourceModel)
IExistingModelHandler
createExistingModelConfiguration
in interface IExistingModelHandler
sourceModel
- the source model to configurepublic final boolean createFiles(org.eclipse.core.runtime.IProgressMonitor progressMonitor, ExistingModelConfiguration config)
IExistingModelHandler
createFiles
in interface IExistingModelHandler
progressMonitor
- the progress monitorconfig
- the existing model configuration datatrue
if model(s) are created successfully, false
otherwiseprotected boolean preFileCreation(org.eclipse.core.runtime.IProgressMonitor progressMonitor, ExistingModelConfiguration config)
progressMonitor
- the progress monitorconfig
- the existing model configuration datatrue
if pre file creation completed successfully,
false
otherwiseprotected java.lang.String getFinalPerspective(ExistingModelConfiguration config)
config
- the existing model configuration dataprotected java.lang.String getPreferredPerspectives(ExistingModelConfiguration config)
config
- the existing model configuration dataprotected abstract org.eclipse.core.resources.IFile[] doCreateFiles(org.eclipse.core.runtime.IProgressMonitor progressMonitor, ExistingModelConfiguration config)
progressMonitor
- the progress monitorconfig
- the existing model configuration dataprotected boolean postFileCreation(org.eclipse.core.runtime.IProgressMonitor progressMonitor, org.eclipse.core.resources.IFile[] files)
The default implementation opens the first newly created model in an eclipse editor.
progressMonitor
- the progress monitorfiles
- the newly created filestrue
if post file creation completed successfully,
false
otherwise