Browse Source

Added a new property to task: "description".

It can be used to add a short description of what the particular instance
of the task is doing - instead of/in addition to xml comments.

It can be usefull to display it if a task fails, and it's a good way to
document the file.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267618 13f79535-47bb-0310-9956-ffa450edef68
master
Costin Manolache 25 years ago
parent
commit
5a53146bbe
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      src/main/org/apache/tools/ant/Task.java

+ 13
- 1
src/main/org/apache/tools/ant/Task.java View File

@@ -62,7 +62,8 @@ public abstract class Task {

protected Project project = null;
protected Target target = null;

protected String description=null;
/**
* Sets the project object of this task. This method is used by
* project when a task is added to it so that the task has
@@ -84,6 +85,17 @@ public abstract class Task {
this.target = target;
}

/** Sets a description of the current action. It will be usefull in commenting
* what we are doing.
*/
public void setDescription( String desc ) {
description=desc;
}

public String getDescription() {
return description;
}
/**
* Called by the project to let the task initialize properly. Normally it does nothing.
*


Loading…
Cancel
Save