|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A project description contains the metadata required to define a project. In effect, a project description is a project's "content".
This interface is not intended to be implemented by clients.
Field Summary | |
static String |
DESCRIPTION_FILE_NAME
Constant name of the project description file (value ".project" ). |
Method Summary | |
ICommand[] |
getBuildSpec()
Returns the list of build commands to run when building the described project. |
String |
getComment()
Returns the descriptive comment for the described project. |
IPath |
getLocation()
Returns the local file system location for the described project. |
String |
getName()
Returns the name of the described project. |
String[] |
getNatureIds()
Returns the list of natures associated with the described project. |
IProject[] |
getReferencedProjects()
Returns the projects referenced by the described project. |
boolean |
hasNature(String natureId)
Returns whether the project nature specified by the given nature extension id has been added to the described project. |
ICommand |
newCommand()
Returns a new build command. |
void |
setBuildSpec(ICommand[] buildSpec)
Sets the list of build command to run when building the described project. |
void |
setComment(String comment)
Sets the comment for the described project |
void |
setLocation(IPath location)
Sets the local file system location for the described project. |
void |
setName(String projectName)
Sets the name of the described project |
void |
setNatureIds(String[] natures)
Sets the list of natures associated with the described project. |
void |
setReferencedProjects(IProject[] projects)
Sets the referenced projects, ignoring any duplicates. |
Field Detail |
public static final String DESCRIPTION_FILE_NAME
".project"
).
The handle of a project's description file is
project.getFile(DESCRIPTION_FILE_NAME)
.
The project description file is located in the root of the project's content area.
Method Detail |
public ICommand[] getBuildSpec()
public String getComment()
public IPath getLocation()
null
is returned if the default location should be used.
null
public String getName()
public String[] getNatureIds()
setNatureIds(java.lang.String[])
public IProject[] getReferencedProjects()
public boolean hasNature(String natureId)
natureId
- the nature extension identifier
true
if the described project has the given naturepublic ICommand newCommand()
Note that the new command does not become part of this project
description's build spec until it is installed via the setBuildSpec
method.
setBuildSpec(org.eclipse.core.resources.ICommand[])
public void setBuildSpec(ICommand[] buildSpec)
Users must call IProject.setDescription
before changes
made to this description take effect.
buildSpec
- the array of build commands to runIProject.setDescription(org.eclipse.core.resources.IProjectDescription, org.eclipse.core.runtime.IProgressMonitor)
,
getBuildSpec()
,
newCommand()
public void setComment(String comment)
Users must call IProject.setDescription
before changes
made to this description take effect.
comment
- the comment for the described projectIProject.setDescription(org.eclipse.core.resources.IProjectDescription, org.eclipse.core.runtime.IProgressMonitor)
,
getComment()
public void setLocation(IPath location)
null
is specified, the default location is used.
Setting the location on a description for a project which already
exists has no effect; the new project location is ignored when the
description is set on the already existing project. This method is
intended for use on descriptions for new projects or for destination
projects for copy
and move
.
This operation maps the root folder of the project to the exact location provided. For example, if the location for project named "P" is set to the path c:\my_plugins\Project1, the file resource at workspace path /P/index.html would be stored in the local file system at c:\my_plugins\Project1\index.html.
location
- the location for the described project or null
getLocation()
public void setName(String projectName)
Setting the name on a description and then setting the description on the project has no effect; the new name is ignored.
Creating a new project with a description name which doesn't match the project handle name results in the description name being ignored, the project will be creating using the name in the handle.
projectName
- the name of the described projectIProject.setDescription(org.eclipse.core.resources.IProjectDescription, org.eclipse.core.runtime.IProgressMonitor)
,
getName()
public void setNatureIds(String[] natures)
Users must call IProject.setDescription
before changes
made to this description take effect.
natures
- the list of naturesIProject.setDescription(org.eclipse.core.resources.IProjectDescription, org.eclipse.core.runtime.IProgressMonitor)
,
getNatureIds()
public void setReferencedProjects(IProject[] projects)
Users must call IProject.setDescription
before changes
made to this description take effect.
projects
- a list of projectsIProject.setDescription(org.eclipse.core.resources.IProjectDescription, org.eclipse.core.runtime.IProgressMonitor)
,
getReferencedProjects()
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |