net.sf.ant4eclipse.ant.util
Class WorkspaceBase

java.lang.Object
  extended by net.sf.ant4eclipse.ant.util.WorkspaceBase
Direct Known Subclasses:
ProjectBase, ProjectSetBase

public class WorkspaceBase
extends java.lang.Object

Base class for all Tasks working with an eclipse workspace.


Constructor Summary
WorkspaceBase(ProjectComponent component)
           
 
Method Summary
 java.lang.String getDirSeparator()
          Returns the currently used directory separator.
 java.lang.String getPathSeparator()
          Returns the currently used path separator.
 Workspace getWorkspace()
           
 boolean isInitialiseWorkspaceSet()
          Returns true if workspace should be loaded initially.
 boolean isWorkspaceSet()
          Returns whether a workspace has been set to this task
 void requireWorkspaceSet()
           
 void setDirSeparator(java.lang.String newdirseparator)
          Changes the current directory separator.
 void setInitialiseWorkspace(boolean enable)
          If enabled the workspace will be completely loaded when set.
 void setPathProperty(java.lang.String propertyname, ResolvedPathEntry[] pathentries)
          Changes the path property according to the developers requirements.
 void setPathSeparator(java.lang.String newpathseparator)
          Changes the path separator for this task.
 void setStringProperty(java.lang.String propertyname, java.lang.String value)
          Changes the string property.
 void setWorkspace(java.io.File workspace)
          Sets the workspace for this task
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkspaceBase

public WorkspaceBase(ProjectComponent component)
Method Detail

getWorkspace

public final Workspace getWorkspace()
Returns:
Currently associated workspace with this task.

isWorkspaceSet

public final boolean isWorkspaceSet()
Returns whether a workspace has been set to this task


requireWorkspaceSet

public final void requireWorkspaceSet()

setWorkspace

public final void setWorkspace(java.io.File workspace)
Sets the workspace for this task

Parameters:
workspace - Path to workspace that should be associated with this Task

setPathSeparator

public void setPathSeparator(java.lang.String newpathseparator)
Changes the path separator for this task.

Parameters:
newpathseparator - The new path separator.

getPathSeparator

public java.lang.String getPathSeparator()
Returns the currently used path separator.

Returns:
The currently used path separator.

setDirSeparator

public void setDirSeparator(java.lang.String newdirseparator)
Changes the current directory separator.

Parameters:
newdirseparator - The new directory separator.

getDirSeparator

public java.lang.String getDirSeparator()
Returns the currently used directory separator.

Returns:
The currently used directory separator.

setPathProperty

public void setPathProperty(java.lang.String propertyname,
                            ResolvedPathEntry[] pathentries)
Changes the path property according to the developers requirements.

Parameters:
propertyname - The name of the property that has to be set.
pathentries - The path entries containing the values.

setStringProperty

public void setStringProperty(java.lang.String propertyname,
                              java.lang.String value)
Changes the string property.

Parameters:
propertyname - The name of the property that has to be set.
value - The value for the property.

setInitialiseWorkspace

public void setInitialiseWorkspace(boolean enable)
If enabled the workspace will be completely loaded when set. This allows to associate projectnames with their foldernames.

Parameters:
enable - true <=> Load each potential project first.

isInitialiseWorkspaceSet

public boolean isInitialiseWorkspaceSet()
Returns true if workspace should be loaded initially.

Returns:
true if the workspace should be loaded initially.