public class ProjectGenerator extends Object
|Modifier and Type||Method and Description|
Create a new Ant-based project on disk.
public static AntProjectHelper createProject(FileObject directory, String type) throws IOException, IllegalArgumentException
project.xml. It will be marked as modified.
In order to fill in various details of it, call normal methods on the returned
helper object, then save the project when you are done.
(You can use
ProjectManager to find the project object to be saved.)
build-impl.xml will be created immediately; once you save the project
changes, it will be created. If you wish to create a top-level
GeneratedFilesHelper.generateBuildScriptFromStylesheet(java.lang.String, java.net.URL) after
(or while) saving the project.
Acquires write access. But you are advised to acquire a write lock for
the entire operation of creating, configuring, and saving the new project,
and creating its initial
directory- the main project directory to create it in (see
type- a unique project type identifier (see
IOException- if there is a problem physically creating the project
IllegalArgumentException- if the project type does not match a registered Ant-based project type factory or if the directory is already recognized as some kind of project or if the new project on disk is recognized by some other factory
public static AntProjectHelper createProject(FileObject directory, String type, String librariesDefinition) throws IOException, IllegalArgumentException
ProjectGenerator.createProject(FileObject, String)for more details. This method in addition allows to setup shared libraries location