Creates a new project resource in the workspace with files in the default location in the local file system. Upon successful completion, the project will exist but be closed.
Newly created projects have no session or persistent properties.
If the project content area does not contain a project description file, an initial project description file is written in the project content area with the following information:
- no references to other projects
- no natures
- an empty build spec
- an empty comment
If there is an existing project description file, it is not overwritten.
This method changes resources; these changes will be reported in a subsequent resource change event, including an indication that this project has been added to the workspace.
This method is long-running; progress and cancellation are provided by the given progress monitor.
@param monitor a progress monitor, or
null
if progressreporting is not desired
@exception CoreException if this method fails. Reasons include:
- This project already exists in the workspace.
- The name of this resource is not valid (according to
IWorkspace.validateName
). - The project location is not valid (according to
IWorkspace.validateProjectLocation
). - The project description file could not be created in the project content area.
- Resource changes are disallowed during certain types of resource change event notification. See
IResourceChangeEvent
for more details.
@exception OperationCanceledException if the operation is canceled. Cancelation can occur even if no progress monitor is provided.
@see IWorkspace#validateProjectLocation(IProject,IPath)
@see IResourceRuleFactory#createRule(IResource)