org.eclipse.xtext.xtext.ui.wizard.project
Class XtextProjectCreator
java.lang.Object
org.eclipse.ui.actions.WorkspaceModifyOperation
org.eclipse.xtext.ui.wizard.AbstractProjectCreator
org.eclipse.xtext.xtext.ui.wizard.project.XtextProjectCreator
- All Implemented Interfaces:
- org.eclipse.jface.operation.IRunnableWithProgress, org.eclipse.jface.operation.IThreadListener, IProjectCreator
- Direct Known Subclasses:
- Ecore2XtextProjectCreator
public class XtextProjectCreator
- extends AbstractProjectCreator
XtextProjectCreator handles the actual creation of the new Xtext project.
- Author:
- Michael Clay - Initial contribution and API, Sebastian Zarnekow
Methods inherited from class org.eclipse.xtext.ui.wizard.AbstractProjectCreator |
configureProjectBuilder, createProject, enhanceProject, getBuilders, getEncoding, getModelFile, getPrimaryModelFileExtension, getProjectInfo, getProjectNatures, getReferencedProjects, getResult, setProjectInfo, setResult |
Methods inherited from class org.eclipse.ui.actions.WorkspaceModifyOperation |
getRule, run, threadChange |
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.operation.IRunnableWithProgress |
run |
DSL_PROJECT_NATURES
protected static final java.lang.String[] DSL_PROJECT_NATURES
DSL_UI_PROJECT_NATURES
protected static final java.lang.String[] DSL_UI_PROJECT_NATURES
BUILDERS
protected static final java.lang.String[] BUILDERS
GENERATOR_PROJECT_NATURES
protected static final java.lang.String[] GENERATOR_PROJECT_NATURES
TEST_PROJECT_NATURES
protected static final java.lang.String[] TEST_PROJECT_NATURES
SRC_GEN_ROOT
protected static final java.lang.String SRC_GEN_ROOT
- See Also:
- Constant Field Values
SRC_ROOT
protected static final java.lang.String SRC_ROOT
- See Also:
- Constant Field Values
XTEND_GEN_ROOT
protected static final java.lang.String XTEND_GEN_ROOT
- See Also:
- Constant Field Values
SRC_FOLDER_LIST
protected static final java.util.List<java.lang.String> SRC_FOLDER_LIST
XtextProjectCreator
public XtextProjectCreator()
getXtextProjectInfo
protected XtextProjectInfo getXtextProjectInfo()
execute
protected void execute(org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException,
java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException
- Description copied from class:
org.eclipse.ui.actions.WorkspaceModifyOperation
- Performs the steps that are to be treated as a single logical workspace
change.
Subclasses must implement this method.
- Overrides:
execute
in class AbstractProjectCreator
- Parameters:
monitor
- the progress monitor to use to display progress and field
user requests to cancel
- Throws:
org.eclipse.core.runtime.CoreException
- if the operation fails due to a CoreException
java.lang.reflect.InvocationTargetException
- if the operation fails due to an exception other than CoreException
java.lang.InterruptedException
- if the operation detects a request to cancel,
using IProgressMonitor.isCanceled()
, it should exit by throwing
InterruptedException
. It is also possible to throw
OperationCanceledException
, which gets mapped to InterruptedException
by the run
method.
getMonitorTicks
protected int getMonitorTicks()
createProjectFactory
protected PluginProjectFactory createProjectFactory()
- Specified by:
createProjectFactory
in class AbstractProjectCreator
getCreateModelProjectMessage
protected java.lang.String getCreateModelProjectMessage()
- Overrides:
getCreateModelProjectMessage
in class AbstractProjectCreator
createDslUiProject
protected org.eclipse.core.resources.IProject createDslUiProject(org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException
- Throws:
org.eclipse.core.runtime.CoreException
configureDslUiProjectFactory
protected void configureDslUiProjectFactory(PluginProjectFactory factory)
getDslUiProjectRequiredBundles
protected java.util.List<java.lang.String> getDslUiProjectRequiredBundles()
getDslUiProjectNatures
protected java.lang.String[] getDslUiProjectNatures()
createDslProject
protected org.eclipse.core.resources.IProject createDslProject(org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException
- Throws:
org.eclipse.core.runtime.CoreException
configureDslProjectFactory
protected void configureDslProjectFactory(PluginProjectFactory factory)
getDslProjectRequiredBundles
protected java.util.List<java.lang.String> getDslProjectRequiredBundles()
getDslProjectNatures
protected java.lang.String[] getDslProjectNatures()
configureProjectFactory
protected PluginProjectFactory configureProjectFactory(ProjectFactory factory)
- Overrides:
configureProjectFactory
in class AbstractProjectCreator
getBuilderIDs
protected java.lang.String[] getBuilderIDs()
getTestProjectNatures
protected java.lang.String[] getTestProjectNatures()
createTestProject
protected org.eclipse.core.resources.IProject createTestProject(org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException
- Throws:
org.eclipse.core.runtime.CoreException
configureTestProjectBuilder
protected void configureTestProjectBuilder(PluginProjectFactory factory)
getTestProjectRequiredBundles
protected java.util.List<java.lang.String> getTestProjectRequiredBundles()
createProject
protected org.eclipse.core.resources.IProject createProject(ProjectFactory factory,
java.lang.String templateName,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException
- Throws:
org.eclipse.core.runtime.CoreException
pathToTemplates
protected java.lang.String pathToTemplates()
getDslProjectTemplateName
protected java.lang.String getDslProjectTemplateName()
getDslUiProjectTemplateName
protected java.lang.String getDslUiProjectTemplateName()
getGeneratorProjectTemplateName
protected java.lang.String getGeneratorProjectTemplateName()
getTestProjectTemplateName
protected java.lang.String getTestProjectTemplateName()
getImportedPackages
protected java.util.List<java.lang.String> getImportedPackages()
getAdditionalRequiredBundles
protected java.util.Collection<java.lang.String> getAdditionalRequiredBundles()
getModelFolderName
protected java.lang.String getModelFolderName()
- Specified by:
getModelFolderName
in class AbstractProjectCreator
getAllFolders
protected java.util.List<java.lang.String> getAllFolders()
- Specified by:
getAllFolders
in class AbstractProjectCreator