org.eclipse.core.resources.ant
Class ConvertPath

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.eclipse.core.resources.ant.ConvertPath
All Implemented Interfaces:
java.lang.Cloneable

public class ConvertPath
extends org.apache.tools.ant.Task

An Ant task which allows to switch from a file system path to a resource path, and vice versa, and store the result in a user property whose name is set by the user. If the resource does not exist, the property is set to false.

The attribute "property" must be specified, as well as only one of "fileSystemPath" or "resourcePath".

Example:

<eclipse.convertPath fileSystemPath="D:\MyWork\MyProject" property="myProject.resourcePath"/>


Constructor Summary
ConvertPath()
          Constructs a new ConvertPath instance.
 
Method Summary
 void execute()
          Performs the path conversion operation.
 void setFileSystemPath(java.io.File value)
          Sets the file system path.
 void setPathId(java.lang.String value)
          Sets the id for the path where the result may be stored
 void setProperty(java.lang.String value)
          Sets the name of the property where the result may stored.
 void setResourcePath(java.lang.String value)
          Sets the resource path.
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, init, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertPath

public ConvertPath()
Constructs a new ConvertPath instance.

Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Performs the path conversion operation.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException - thrown if a problem occurs during execution.

setFileSystemPath

public void setFileSystemPath(java.io.File value)
Sets the file system path.

Parameters:
value - the file corresponding to the path supplied by the user

setResourcePath

public void setResourcePath(java.lang.String value)
Sets the resource path.

Parameters:
value - the path

setProperty

public void setProperty(java.lang.String value)
Sets the name of the property where the result may stored.

Parameters:
value - the name of the property

setPathId

public void setPathId(java.lang.String value)
Sets the id for the path where the result may be stored

Parameters:
value - the id of the path