Browse Source

Make <echo> accept #PCDATA.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267994 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 25 years ago
parent
commit
34d011b22d
2 changed files with 16 additions and 2 deletions
  1. +8
    -1
      docs/index.html
  2. +8
    -1
      src/main/org/apache/tools/ant/taskdefs/Echo.java

+ 8
- 1
docs/index.html View File

@@ -1442,11 +1442,18 @@ subdirectories.</p>
<tr>
<td valign="top">message</td>
<td valign="top">the message to echo.</td>
<td valign="top" align="center">Yes</td>
<td valign="top" align="center">Yes, unless data is included in a
character section within this element.</td>
</tr>
</table>
<h3>Examples</h3>
<pre> &lt;echo message=&quot;Hello world&quot; /&gt;</pre>
<pre>
&lt;echo&gt;
This is a longer message stretching over
two lines.
&lt;/echo&gt;
</pre>
<hr>
<h2><a name="exec">Exec</a></h2>
<h3>Description</h3>


+ 8
- 1
src/main/org/apache/tools/ant/taskdefs/Echo.java View File

@@ -63,7 +63,7 @@ import java.net.*;
* @author costin@dnt.ro
*/
public class Echo extends Task {
private String message; // required
private String message = ""; // required
/**
* Does the work.
@@ -82,4 +82,11 @@ public class Echo extends Task {
public void setMessage(String msg) {
this.message = msg;
}

/**
* Set a multiline message.
*/
public void addText(String msg) {
message += msg;
}
}

Loading…
Cancel
Save