ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgl...@apache.org
Subject svn commit: r426173 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/input/InputRequest.java src/main/org/apache/tools/ant/taskdefs/Input.java
Date Thu, 27 Jul 2006 18:03:19 GMT
Author: jglick
Date: Thu Jul 27 11:03:19 2006
New Revision: 426173

URL: http://svn.apache.org/viewvc?rev=426173&view=rev
Log:
InputHandler implementations may now call InputRequest.getDefaultValue() if they wish.

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/input/InputRequest.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Input.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=426173&r1=426172&r2=426173&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Jul 27 11:03:19 2006
@@ -250,12 +250,16 @@
 
 * <get> would fetch files that were up to date, because it used > in a
   remote/local timestamp comparison, not >=. Bugzilla 35607.
-  
+
 * <xslt> passes the current file (name + directory) to the stylesheet/transformation.
   xsl-parameter name is configurable.  Bugzilla report 21042.
 
 Other changes:
 --------------
+
+* InputHandler implementations may now call InputRequest.getDefaultValue()
+  if they wish.
+
 * Took in bugzilla report 39320.
 
 * Improve compatibility with GNU Classpath and java versions prior to 1.5. Bugzilla 39027.

Modified: ant/core/trunk/src/main/org/apache/tools/ant/input/InputRequest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/input/InputRequest.java?rev=426173&r1=426172&r2=426173&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/input/InputRequest.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/input/InputRequest.java Thu Jul 27 11:03:19
2006
@@ -25,6 +25,7 @@
 public class InputRequest {
     private String prompt;
     private String input;
+    private String defaultValue;
 
     /**
      * Construct an InputRequest.
@@ -68,6 +69,22 @@
      */
     public String getInput() {
         return input;
+    }
+
+    /**
+     * Gets a configured default value.
+     * @since Ant 1.7.0
+     */
+    public String getDefaultValue() {
+        return defaultValue;
+    }
+
+    /**
+     * Configures a default value.
+     * @since Ant 1.7.0
+     */
+    public void setDefaultValue(String d) {
+        defaultValue = d;
     }
 
 }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Input.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Input.java?rev=426173&r1=426172&r2=426173&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Input.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Input.java Thu Jul 27 11:03:19 2006
@@ -221,6 +221,7 @@
         } else {
             request = new InputRequest(message);
         }
+        request.setDefaultValue(defaultvalue);
 
         InputHandler h = handler == null
             ? getProject().getInputHandler()



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


Mime
View raw message