|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ant4eclipse.model.project.Workspace
public final class Workspace
Encapsulates the workspace that contains the (Eclipse-)Projects.
Method Summary | |
---|---|
void |
addExternalLocation(java.lang.String projectname,
java.io.File location)
Adds the external location for the supplied project. |
static void |
clearCache()
This method allows to clear the internal cache. |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getAbsolutePath()
Returns the absolute path of the workspace. |
java.io.File |
getChild(java.lang.String path)
Returns the child of the workspace with the given path. |
java.io.File |
getChild(java.lang.String path,
boolean relative)
Returns the child of the workspace with the given path. |
java.io.File |
getExternalLocation(java.lang.String projectname)
Returns the external location of the supplied project. |
java.io.File |
getFolder()
Returns the workspace as a file. |
EclipseProject |
getProject(java.lang.String name)
Returns the EclipseProject associated with the supplied name. |
static Workspace |
getWorkspace(java.io.File workspace)
Provides access to an instance of type Workspace. |
boolean |
hasChild(java.lang.String path)
Returns whether the workspace has a child with the given path. |
int |
hashCode()
|
void |
registerProject(EclipseProject project)
Registers the supplied project with this workspace. |
java.lang.String |
toString()
|
void |
unregisterProject(EclipseProject project)
Unregisters the supplied project. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void addExternalLocation(java.lang.String projectname, java.io.File location)
projectname
- The name of the project which is located externally.location
- The location of the external project.public java.io.File getExternalLocation(java.lang.String projectname)
projectname
- The name of the external project.
public void registerProject(EclipseProject project)
project
- The project that shall be registered.public void unregisterProject(EclipseProject project)
project
- The project that shall be unregistered.public EclipseProject getProject(java.lang.String name)
name
- The name of the desired project.
public java.lang.String getAbsolutePath()
public boolean hasChild(java.lang.String path)
path
- the path (relative to the workspace)
public java.io.File getChild(java.lang.String path)
path
- the path (relative to the workspace)
public java.io.File getChild(java.lang.String path, boolean relative)
true
, the returned file is relative to the
workspace (e.g. "project\.classpath"
). If
false
, the returned file is absolute (e.g.
"c:\myworkspace\project\.classpath"
).
The supplied path is not allowed to be a linked resource.
path
- the path (relative to the workspace)relative
- indicates whether or not the returned File should be relative to
the workspace
public java.io.File getFolder()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static final Workspace getWorkspace(java.io.File workspace)
workspace
- the file that represents the workspace.public static final void clearCache()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |