Skip navigation links
oracle.ide.cmd
Class NewWorkspaceCommand
java.lang.Object
oracle.ide.controller.Command
oracle.ide.cmd.NewWorkspaceCommand
-
public class NewWorkspaceCommand
- extends Command
The WorkspaceCommand
class implements the create new workspace command.
- See Also:
Command
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NewWorkspaceCommand
public NewWorkspaceCommand()
- Constructor.
doit
public int doit()
throws java.lang.Exception
- Executes the create new workspacecommand. The method generates a new unique name for the workspace, creates a project group instance, and adds the instance to the workspaces folder. instance by cloning the 'Default Project Group', and adds the instance to the project groups folder.
-
- Specified by:
doit
in class Command
-
- Throws:
java.lang.Exception
createProject
public static Project createProject(Context context,
Workspace workspace)
throws java.lang.Exception
- Provides the UI for creating a project in the given workspace
-
- Parameters:
context
- the context
workspace
- the workspace in which to create the project
- Throws:
java.lang.Exception
createEmptyWorkspace
public static Workspace createEmptyWorkspace(Context context,
java.net.URL wspURL)
throws java.lang.IllegalAccessException,
java.lang.InstantiationException
- Creates a new empty workspace. An existing workspace at the same location will be overwritten.
-
- Parameters:
context
- The current command Context
.
wspURL
- The URL
for the new workspace; the URL
is assumed to have the proper file extension for a workspace file.
- Returns:
- The newly created
Workspace
, or null
if the workspace could not be created.
- Throws:
java.lang.IllegalAccessException
- If the Workspace
class or its constructor is not accessible.
java.lang.InstantiationException
- If the Workspace
object could not be instantiated.
Skip navigation links
Copyright © 1997, 2015, Oracle. All rights reserved.