Example #1
0
  /**
   * Factory method to create a property processor. Users can provide their own or replace it using
   * "ant.PropertyHelper" reference. User tasks can also add themselves to the chain, and provide
   * dynamic properties.
   *
   * @param project the project fro which the property helper is required.
   * @return the project's property helper.
   */
  public static synchronized PropertyHelper getPropertyHelper(Project project) {
    PropertyHelper helper = (PropertyHelper) project.getReference("ant.PropertyHelper");
    if (helper != null) {
      return helper;
    }
    helper = new PropertyHelper();
    helper.setProject(project);

    project.addReference("ant.PropertyHelper", helper);
    return helper;
  }