You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by me...@apache.org on 2001/01/12 21:42:25 UTC
cvs commit: jakarta-ant/src/antidote/org/apache/tools/ant/gui/acs ACSFactory.java ACSTaskElement.java
metasim 01/01/12 12:42:24
Modified: src/antidote/org/apache/tools/ant/gui/acs ACSFactory.java
ACSTaskElement.java
Log:
Added rough ability to add new tasks (javac only) and properties.
Revision Changes Path
1.8 +30 -1 jakarta-ant/src/antidote/org/apache/tools/ant/gui/acs/ACSFactory.java
Index: ACSFactory.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/acs/ACSFactory.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ACSFactory.java 2001/01/12 19:02:20 1.7
+++ ACSFactory.java 2001/01/12 20:42:22 1.8
@@ -70,7 +70,7 @@
/**
* Factory for loading Ant Construction set elements.
*
- * @version $Revision: 1.7 $
+ * @version $Revision: 1.8 $
* @author Simeon Fitch
*/
public class ACSFactory {
@@ -203,6 +203,35 @@
getOwnerDocument().createElement("target");
indent(project, 1);
project.appendChild(retval);
+ return retval;
+ }
+
+ /**
+ * Create a new task.
+ *
+ * @param target Target the task is assigned to.
+ * @return New, unnamed task.
+ */
+ public ACSTaskElement createTask(ACSTargetElement target) {
+ ACSTaskElement retval = (ACSTaskElement) target.
+ getOwnerDocument().createElement("task");
+ indent(target, 2);
+ target.appendChild(retval);
+ return retval;
+ }
+
+ /**
+ * Create a new property.
+ *
+ * @param node the Node to assign the property to.
+ * @return New, unnamed property.
+ */
+ public ACSPropertyElement createProperty(ACSElement node) {
+ ACSPropertyElement retval = (ACSPropertyElement) node.
+ getOwnerDocument().createElement("property");
+ // XXX fixme.
+ indent(node, 1);
+ node.appendChild(retval);
return retval;
}
1.4 +9 -1 jakarta-ant/src/antidote/org/apache/tools/ant/gui/acs/ACSTaskElement.java
Index: ACSTaskElement.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/acs/ACSTaskElement.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ACSTaskElement.java 2001/01/03 14:18:17 1.3
+++ ACSTaskElement.java 2001/01/12 20:42:23 1.4
@@ -60,7 +60,7 @@
/**
* Element containing a property definition.
*
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
* @author Simeon Fitch
*/
public class ACSTaskElement extends ACSTreeNodeElement {
@@ -86,6 +86,14 @@
return getTagName();
}
+ /**
+ * Set the task type.
+ *
+ * @param type Type name.
+ */
+ public void setTaskType(String type) {
+ setTag(type);
+ }
/**
* Get the attributes (named value mappings). This method is not named