Browse Source

InputHandler implementations may now call InputRequest.getDefaultValue() if they wish.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@426173 13f79535-47bb-0310-9956-ffa450edef68
master
Jesse N. Glick 19 years ago
parent
commit
a7192e8ad9
3 changed files with 23 additions and 1 deletions
  1. +5
    -1
      WHATSNEW
  2. +17
    -0
      src/main/org/apache/tools/ant/input/InputRequest.java
  3. +1
    -0
      src/main/org/apache/tools/ant/taskdefs/Input.java

+ 5
- 1
WHATSNEW View File

@@ -250,12 +250,16 @@ Fixed bugs:

* <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.


+ 17
- 0
src/main/org/apache/tools/ant/input/InputRequest.java View File

@@ -25,6 +25,7 @@ package org.apache.tools.ant.input;
public class InputRequest {
private String prompt;
private String input;
private String defaultValue;

/**
* Construct an InputRequest.
@@ -70,4 +71,20 @@ public class InputRequest {
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;
}

}

+ 1
- 0
src/main/org/apache/tools/ant/taskdefs/Input.java View File

@@ -221,6 +221,7 @@ public class Input extends Task {
} else {
request = new InputRequest(message);
}
request.setDefaultValue(defaultvalue);

InputHandler h = handler == null
? getProject().getInputHandler()


Loading…
Cancel
Save