Index: nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-dep-nb.xsl
===================================================================
RCS file: nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-dep-nb.xsl
diff -N nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-dep-nb.xsl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ nbbuild/antsrc/org/netbeans/nbbuild/Arch-default-dep-nb.xsl 12 Jul 2005 17:58:13 -0000
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+ These modules are required in project.xml file:
+
+
+
+
+
+
+ import
+ java
+ devel
+
+
+
+
+ @
+
+ @/overview-summary.html
+
+
+
+ The module is needed for compilation.
+
+
+ The module is used during runtime.
+
+ Specification version
+
+ is required.
+
+
+
+
+
+
Index: nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd
===================================================================
RCS file: /cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd,v
retrieving revision 1.17
diff -u -r1.17 Arch.dtd
--- nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd 27 Sep 2004 11:03:06 -0000 1.17
+++ nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd 12 Jul 2005 17:58:13 -0000
@@ -20,7 +20,7 @@
can occur in HTML
-->
-
+
%xhtml;
@@ -45,6 +45,11 @@
+
+
+
Index: nbbuild/antsrc/org/netbeans/nbbuild/Arch.java
===================================================================
RCS file: /cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch.java,v
retrieving revision 1.35
diff -u -r1.35 Arch.java
--- nbbuild/antsrc/org/netbeans/nbbuild/Arch.java 12 Jul 2005 10:50:11 -0000 1.35
+++ nbbuild/antsrc/org/netbeans/nbbuild/Arch.java 12 Jul 2005 17:58:14 -0000
@@ -15,6 +15,9 @@
import java.io.*;
import java.text.DateFormat;
import java.util.*;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.stream.StreamSource;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.taskdefs.Ant;
@@ -88,6 +91,11 @@
public void setApichanges (File apichanges) {
this.apichanges = apichanges;
}
+
+ private File project = null;
+ public void setProject (File x) {
+ this.project = x;
+ }
/** Run the conversion */
public void execute () throws BuildException {
@@ -259,6 +267,80 @@
qSource = new DOMSource(q);
}
+
+
+ if (project != null) {
+ // read also project file and apply transformation on defaultanswer tags
+ log("Reading project from " + project);
+
+
+
+ org.w3c.dom.Document prj;
+ try {
+ DocumentBuilderFactory fack = DocumentBuilderFactory.newInstance();
+ fack.setNamespaceAware(false);
+ prj = fack.newDocumentBuilder().parse (project);
+ } catch (SAXParseException ex) {
+ log(ex.getSystemId() + ":" + ex.getLineNumber() + ": " + ex.getLocalizedMessage(), Project.MSG_ERR);
+ throw new BuildException(project.getAbsolutePath() + " is malformed or invalid", ex, getLocation());
+ } catch (Exception ex) {
+ throw new BuildException ("File " + project + " cannot be parsed: " + ex.getLocalizedMessage(), ex, getLocation());
+ }
+
+ DOMSource prjSrc = new DOMSource(prj);
+
+ NodeList node = prj.getElementsByTagName("project");
+ if (node.getLength() != 1) {
+ throw new BuildException("Expected one element in " + project + "but was: " + node.getLength());
+ }
+
+ NodeList list= q.getElementsByTagName("answer");
+ for (int i = 0; i < list.getLength(); i++) {
+ Node n = list.item(i);
+ String id = n.getAttributes().getNamedItem("id").getNodeValue();
+ java.net.URL u = Arch.class.getResource("Arch-default-" + id + ".xsl");
+ if (u != null) {
+ log("Found default answer to " + id + " question", Project.MSG_VERBOSE);
+ Node defaultAnswer = findDefaultAnswer(n);
+ if (defaultAnswer != null &&
+ "none".equals(defaultAnswer.getAttributes().getNamedItem("generate").getNodeValue())
+ ) {
+ log("Skipping answer as there is here"));
+ para.appendChild(q.createElement("br"));
+ para.appendChild(res.getNode());
+ n.appendChild(para);
+ }
+ }
+ }
+
+
+ qSource = new DOMSource(q);
+ }
// apply the transform operation
try {
@@ -352,11 +434,16 @@
//w.write("\n\n\n");
- w.write(" \n \n XXX no answer for " + s + "\n
\n \n\n");
+
+ java.net.URL u = Arch.class.getResource("Arch-default-" + s + ".xsl");
+ if (u != null) {
+ // there is default answer
+ w.write(" \n \n \n\n");
+ } else {
+ w.write(" \n \n XXX no answer for " + s + "\n
\n \n\n");
+ }
}
}
@@ -469,5 +556,19 @@
throw (IOException)new IOException(x.toString()).initCause(x);
}
}
-
+
+ private static Node findDefaultAnswer(Node n) {
+ if (n.getNodeName().equals ("defaultanswer")) {
+ return n;
+ }
+
+ NodeList arr = n.getChildNodes();
+ for (int i = 0; i < arr.getLength(); i++) {
+ Node found = findDefaultAnswer(arr.item(i));
+ if (found != null) {
+ return found;
+ }
+ }
+ return null;
+ }
}
Index: nbbuild/antsrc/org/netbeans/nbbuild/Arch.xsl
===================================================================
RCS file: /cvs/nbbuild/antsrc/org/netbeans/nbbuild/Arch.xsl,v
retrieving revision 1.25
diff -u -r1.25 Arch.xsl
--- nbbuild/antsrc/org/netbeans/nbbuild/Arch.xsl 10 Jul 2005 13:41:36 -0000 1.25
+++ nbbuild/antsrc/org/netbeans/nbbuild/Arch.xsl 12 Jul 2005 17:58:14 -0000
@@ -167,12 +167,18 @@
+
-
+
+
Index: nbbuild/javadoctools/exportOverview.xsl
===================================================================
RCS file: /cvs/nbbuild/javadoctools/exportOverview.xsl,v
retrieving revision 1.2
diff -u -r1.2 exportOverview.xsl
--- nbbuild/javadoctools/exportOverview.xsl 12 Jul 2005 10:50:12 -0000 1.2
+++ nbbuild/javadoctools/exportOverview.xsl 12 Jul 2005 17:58:14 -0000
@@ -62,14 +62,19 @@
Dependencies
- What do other modules need to do to declare a dependency on this one?
-
+
+ What do other modules need to do to declare a dependency on this one?
+
+
- Other dependencies
-
- PENDING: Need project.xml to list what projects this one depends on from project.xml &
- arch.xml and
- other imported interfaces from arch.xml
+ This module depends on following projects
+
+
+
+
+
+
+