public class ProjectFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
builderIds |
protected String |
defaultCharset |
protected List<String> |
folders |
protected org.eclipse.core.runtime.IPath |
location |
protected String |
projectName |
protected List<String> |
projectNatures |
protected List<org.eclipse.core.resources.IProject> |
referencedProjects |
protected org.eclipse.ui.IWorkbench |
workbench |
protected List<org.eclipse.ui.IWorkingSet> |
workingSets |
protected org.eclipse.core.resources.IWorkspace |
workspace |
| Constructor and Description |
|---|
ProjectFactory() |
| Modifier and Type | Method and Description |
|---|---|
ProjectFactory |
addBuilderIds(String... builderIds) |
void |
addContributor(IProjectFactoryContributor projectFactoryContributor) |
void |
addEarlyContributor(IProjectFactoryContributor projectFactoryContributor)
These contributors will be executed before enhancing the project.
|
ProjectFactory |
addFolders(List<String> folders) |
ProjectFactory |
addProjectNatures(String... projectNatures) |
ProjectFactory |
addReferencedProjects(List<org.eclipse.core.resources.IProject> referencedProjects) |
ProjectFactory |
addWorkingSets(List<org.eclipse.ui.IWorkingSet> workingSets) |
protected org.eclipse.core.resources.IFile |
createFile(String name,
org.eclipse.core.resources.IContainer container,
String content,
org.eclipse.core.runtime.IProgressMonitor progressMonitor) |
protected void |
createFolders(org.eclipse.core.resources.IProject project,
org.eclipse.core.runtime.SubMonitor subMonitor,
org.eclipse.swt.widgets.Shell shell) |
org.eclipse.core.resources.IProject |
createProject(org.eclipse.core.runtime.IProgressMonitor monitor,
org.eclipse.swt.widgets.Shell shell) |
protected org.eclipse.core.resources.IProjectDescription |
createProjectDescription() |
protected void |
createRecursive(org.eclipse.core.resources.IContainer resource) |
protected boolean |
deleteExistingProject(org.eclipse.core.resources.IProject project,
org.eclipse.swt.widgets.Shell theShell,
org.eclipse.core.runtime.SubMonitor subMonitor) |
protected void |
enhanceProject(org.eclipse.core.resources.IProject project,
org.eclipse.core.runtime.SubMonitor subMonitor,
org.eclipse.swt.widgets.Shell shell) |
protected void |
runContributors(List<IProjectFactoryContributor> contribs,
org.eclipse.core.resources.IProject project,
IProjectFactoryContributor.IFileCreator fileCreator) |
protected void |
setBuilder(org.eclipse.core.resources.IProjectDescription projectDescription,
String[] builders) |
ProjectFactory |
setLocation(org.eclipse.core.runtime.IPath location) |
void |
setProjectDefaultCharset(String encoding) |
ProjectFactory |
setProjectName(String projectName) |
protected org.eclipse.core.resources.IFile |
writeToFile(CharSequence chrSeq,
String fileName,
org.eclipse.core.resources.IProject project,
org.eclipse.core.runtime.IProgressMonitor progrMonitor)
Shortcut method to be used with Xtend rich strings
|
@Inject(optional=true) protected org.eclipse.ui.IWorkbench workbench
@Inject protected org.eclipse.core.resources.IWorkspace workspace
protected String projectName
protected org.eclipse.core.runtime.IPath location
protected List<org.eclipse.core.resources.IProject> referencedProjects
protected List<org.eclipse.ui.IWorkingSet> workingSets
protected String defaultCharset
public ProjectFactory addBuilderIds(String... builderIds)
public ProjectFactory addProjectNatures(String... projectNatures)
public ProjectFactory setProjectName(String projectName)
public ProjectFactory setLocation(org.eclipse.core.runtime.IPath location)
public ProjectFactory addFolders(List<String> folders)
public ProjectFactory addReferencedProjects(List<org.eclipse.core.resources.IProject> referencedProjects)
public ProjectFactory addWorkingSets(List<org.eclipse.ui.IWorkingSet> workingSets)
public void addContributor(IProjectFactoryContributor projectFactoryContributor)
public void addEarlyContributor(IProjectFactoryContributor projectFactoryContributor)
public void setProjectDefaultCharset(String encoding)
public org.eclipse.core.resources.IProject createProject(org.eclipse.core.runtime.IProgressMonitor monitor,
org.eclipse.swt.widgets.Shell shell)
protected void runContributors(List<IProjectFactoryContributor> contribs, org.eclipse.core.resources.IProject project, IProjectFactoryContributor.IFileCreator fileCreator)
protected void createFolders(org.eclipse.core.resources.IProject project,
org.eclipse.core.runtime.SubMonitor subMonitor,
org.eclipse.swt.widgets.Shell shell)
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreExceptionprotected void enhanceProject(org.eclipse.core.resources.IProject project,
org.eclipse.core.runtime.SubMonitor subMonitor,
org.eclipse.swt.widgets.Shell shell)
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreExceptionprotected boolean deleteExistingProject(org.eclipse.core.resources.IProject project,
org.eclipse.swt.widgets.Shell theShell,
org.eclipse.core.runtime.SubMonitor subMonitor)
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreExceptionprotected org.eclipse.core.resources.IProjectDescription createProjectDescription()
protected void setBuilder(org.eclipse.core.resources.IProjectDescription projectDescription,
String[] builders)
protected org.eclipse.core.resources.IFile createFile(String name, org.eclipse.core.resources.IContainer container, String content, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
protected org.eclipse.core.resources.IFile writeToFile(CharSequence chrSeq, String fileName, org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.IProgressMonitor progrMonitor)
protected void createRecursive(org.eclipse.core.resources.IContainer resource)
Copyright © 2016. All Rights Reserved.