ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r547411 - /ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java
Date Thu, 14 Jun 2007 21:27:33 GMT
Author: mbenson
Date: Thu Jun 14 14:27:32 2007
New Revision: 547411

URL: http://svn.apache.org/viewvc?view=rev&rev=547411
Log:
fmting, add getProject()

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java?view=diff&rev=547411&r1=547410&r2=547411
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java Thu Jun 14 14:27:32 2007
@@ -77,11 +77,10 @@
 
     //override facility for subclasses to put custom hashtables in
 
-
     // --------------------  Hook management  --------------------
 
     /**
-     * Set the project for which this helper is performing property resolution
+     * Set the project for which this helper is performing property resolution.
      *
      * @param p the project instance.
      */
@@ -89,6 +88,14 @@
         this.project = p;
     }
 
+    /**
+     * Get this PropertyHelper's Project.
+     * @return Project
+     */
+    public Project getProject() {
+        return project;
+    }
+
     /** There are 2 ways to hook into property handling:
      *  - you can replace the main PropertyHelper. The replacement is required
      * to support the same semantics (of course :-)
@@ -118,12 +125,11 @@
      * 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.
+     * @param project the project for which the property helper is required.
      *
      * @return the project's property helper.
      */
-    public static synchronized
-        PropertyHelper getPropertyHelper(Project project) {
+    public static synchronized PropertyHelper getPropertyHelper(Project project) {
         PropertyHelper helper
             = (PropertyHelper) project.getReference(MagicNames.REFID_PROPERTY_HELPER);
         if (helper != null) {
@@ -274,7 +280,6 @@
                 if (replacement == null) {
                     replacement = getProperty(ns, propertyName);
                 }
-
                 if (replacement == null) {
                     project.log("Property \"" + propertyName
                             + "\" has not been set", Project.MSG_VERBOSE);
@@ -457,7 +462,7 @@
         if (o != null) {
             return o;
         }
-        return  userProperties.get(name);
+        return userProperties.get(name);
     }
 
 
@@ -639,5 +644,4 @@
             fragments.addElement(value.substring(prev));
         }
     }
-
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message