Browse Source

Add description attributes for elements and attributes of macrodef

PR: 24711
Obtained from: gudnabrsam at yahoo dot com and Yuji Yamano


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275884 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 21 years ago
parent
commit
049e8cfaa9
2 changed files with 48 additions and 0 deletions
  1. +15
    -0
      docs/manual/CoreTasks/macrodef.html
  2. +33
    -0
      src/main/org/apache/tools/ant/taskdefs/MacroDef.java

+ 15
- 0
docs/manual/CoreTasks/macrodef.html View File

@@ -84,6 +84,13 @@
</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">description</td>
<td valign="top">
This contains a description of the attribute.
</td>
<td valign="top" align="center">No</td>
</tr>
</table>
<h4>element</h4>
<p>
@@ -112,6 +119,14 @@
</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">description</td>
<td valign="top">
This contains a description
informing the user what the contents of the element are expected to be.
</td>
<td valign="top" align="center">No</td>
</tr>
</table>
<h3>Examples</h3>


+ 33
- 0
src/main/org/apache/tools/ant/taskdefs/MacroDef.java View File

@@ -283,6 +283,7 @@ public class MacroDef extends AntlibDefinition {
public static class Attribute {
private String name;
private String defaultValue;
private String description;

/**
* The name of the attribute.
@@ -321,6 +322,21 @@ public class MacroDef extends AntlibDefinition {
return defaultValue;
}

/**
* @param desc Description of the element.
*/
public void setDescription(String desc) {
description = desc;
}

/**
* @return the description of the element, or <code>null</code> if
* no description is available.
*/
public String getDescription() {
return description;
}

/**
* equality method
*
@@ -367,6 +383,8 @@ public class MacroDef extends AntlibDefinition {
public static class TemplateElement {
private String name;
private boolean optional = false;
private String description;

/**
* The name of the element.
*
@@ -404,6 +422,21 @@ public class MacroDef extends AntlibDefinition {
return optional;
}

/**
* @param desc Description of the element.
*/
public void setDescription(String desc) {
description = desc;
}

/**
* @return the description of the element, or <code>null</code> if
* no description is available.
*/
public String getDescription() {
return description;
}

/**
* equality method
*


Loading…
Cancel
Save