net.sf.ant4eclipse.tools.internal
Class EclipseVariableResolver

java.lang.Object
  extended by net.sf.ant4eclipse.tools.internal.EclipseVariableResolver

public class EclipseVariableResolver
extends java.lang.Object


Constructor Summary
EclipseVariableResolver()
           
 
Method Summary
static java.util.Map getEclipseVariables(EclipseProject project)
          Returns a map with the eclipse variables as keys and their values as values
static java.lang.String resolveEclipseVariables(java.lang.String string, EclipseProject project, java.util.Map otherProperties)
          Substitutes all occurences of an eclipse variable (aka as property in ant)in the given string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EclipseVariableResolver

public EclipseVariableResolver()
Method Detail

resolveEclipseVariables

public static java.lang.String resolveEclipseVariables(java.lang.String string,
                                                       EclipseProject project,
                                                       java.util.Map otherProperties)
Substitutes all occurences of an eclipse variable (aka as property in ant)in the given string. The value for a variable in string is first searched in otherProperties. If the value cannot be found there it will be resolved as eclipse would do it. If a variable contains an argument (${workspace_loc:/path/to/myWorkspace}) the argument is ignored.

Parameters:
string - The string with variables
project - The project that should be used for resolving variables like project_loc
otherProperties - Table with variable names as keys and their values as values. Might be null.

getEclipseVariables

public static java.util.Map getEclipseVariables(EclipseProject project)
Returns a map with the eclipse variables as keys and their values as values