Modifier and Type | Class and Description |
---|---|
static interface |
NewEmptyProjectCommand.ProjectInitializer |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
WORKSPACE_PACKAGE_COUNTER_PROPERTY |
Constructor and Description |
---|
NewEmptyProjectCommand() |
Modifier and Type | Method and Description |
---|---|
static Project |
createProject(java.net.URL projectURL)
Clones the default project (if possible) to a new project with the
supplied URL.
|
static Project |
createProjectInWorkspace(java.net.URL projectURL,
Workspace workspace)
|
static Project |
createProjectInWorkspace(java.net.URL projectURL,
Workspace workspace,
java.lang.String defaultPackage)
|
int |
doit()
Executes the create new project command.
|
static java.lang.String |
getProjectPackage(Workspace workspace) |
static void |
initializeProjectSettings(Project project,
Workspace workspace,
java.lang.String defaultPackage)
Configures the supplied project with default compiler, build, and
content options; sets the project package based on the supplied
package name and the default application package from teh supplied
workspace.
|
static void |
registerProjectInitializer(NewEmptyProjectCommand.ProjectInitializer init) |
static void |
setProjectPackage(java.lang.String pkgName,
Project newProject,
Workspace wksp) |
static void |
unregisterProjectInitializer(NewEmptyProjectCommand.ProjectInitializer init) |
enableConfirmation, getAffectedNodes, getContext, getData, getId, getName, getProgressHandle, getType, isGlobal, setContext, setData, setTaskInfo, undo
public static final java.lang.String WORKSPACE_PACKAGE_COUNTER_PROPERTY
public final int doit() throws java.lang.Exception
public static Project createProjectInWorkspace(java.net.URL projectURL, Workspace workspace) throws java.lang.IllegalAccessException, java.lang.InstantiationException
URL
is projectURL
and adds it to the Workspace
specified. The newly created
Project
is returned.projectURL
- The URL
of the Project
that is
to be createdworkspace
- The Workspace
where the newly created
Project
is to be addedProject
java.lang.IllegalAccessException
- if the project could not be created.java.lang.InstantiationException
- if an exception occurs while trying
to instantiate the new project.createProjectInWorkspace(URL, Workspace, String)
public static Project createProjectInWorkspace(java.net.URL projectURL, Workspace workspace, java.lang.String defaultPackage) throws java.lang.IllegalAccessException, java.lang.InstantiationException
URL
is projectURL
and adds it to the Workspace
specified. If non-null,
defaultPackage
is set as the project's default package.
The package name can also be stored as a transient property
in the workspace using key JavaProject.DEFAULT_PACKAGE. The default
project's default package is used if the others are null.
The newly created Project
is returned.projectURL
- The URL
of the Project
that is
to be createdworkspace
- The Workspace
where the newly created
Project
is to be addeddefaultPackage
- The default package name (can be null)Project
java.lang.IllegalAccessException
- if the project could not be created.java.lang.InstantiationException
- if an exception occurs while trying
to instantiate the new project.createProjectInWorkspace(URL, Workspace)
public static void initializeProjectSettings(Project project, Workspace workspace, java.lang.String defaultPackage)
public static Project createProject(java.net.URL projectURL) throws java.lang.IllegalAccessException, java.lang.InstantiationException
#initialize(Project)
.public static java.lang.String getProjectPackage(Workspace workspace)
public static void setProjectPackage(java.lang.String pkgName, Project newProject, Workspace wksp)
public static void registerProjectInitializer(NewEmptyProjectCommand.ProjectInitializer init)
public static void unregisterProjectInitializer(NewEmptyProjectCommand.ProjectInitializer init)