From 5a53146bbea71851a631177290aa19112c714887 Mon Sep 17 00:00:00 2001 From: Costin Manolache Date: Thu, 24 Feb 2000 21:57:20 +0000 Subject: [PATCH] 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 --- src/main/org/apache/tools/ant/Task.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/Task.java b/src/main/org/apache/tools/ant/Task.java index 68433bcbe..568f257c6 100644 --- a/src/main/org/apache/tools/ant/Task.java +++ b/src/main/org/apache/tools/ant/Task.java @@ -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. *