Bug in Antidote

2003-10-05 Thread Jack J. Woehr
Bug in Antidote that affects the output.

I've just noticed that  xml.XMLWriter. startDocument () never gets called. In
theory it gets called in xml.DOMNodeSerializer.writeNodeStart() when passed
a Node of type DOCUMENT_NODE but apparently it never gets passed that
type of node. The result is that the  tag gets eaten.

This is a case of "eat own dog food". If you open in on antidote's own build.xml
it really messes the file up!

I'm trying to figure this out. Any tips, Christoph?

--
Jack J. Woehr  # You measure democracy by the freedom it
Senior Consultant  # gives its dissidents, not the freedom
Purematrix, Inc.   # it gives its assimilated conformists.
www.purematrix.com # - Abbie Hoffman




Antidote Diff -- XMLWriter.java

2003-10-05 Thread Jack J. Woehr
Here's an Antidote diff that cleans up handling of multiline comment blocks
where each line is an individual comment (such as used within Antidote's
own build.xml file). Antidote currently inserts an extra newline between
each complete XML comment. This changes that behavior at the level
of a block comment just below the  level in the tree.

--
Jack J. Woehr  # You measure democracy by the freedom it
Senior Consultant  # gives its dissidents, not the freedom
Purematrix, Inc.   # it gives its assimilated conformists.
www.purematrix.com # - Abbie Hoffman


Index: org/apache/tools/ant/gui/xml/XMLWriter.java
===
RCS file: 
/home/cvspublic/ant-antidote/src/java/org/apache/tools/ant/gui/xml/XMLWriter.java,v
retrieving revision 1.4
diff -c -r1.4 XMLWriter.java
*** org/apache/tools/ant/gui/xml/XMLWriter.java 28 Sep 2003 13:03:00 -  
1.4
--- org/apache/tools/ant/gui/xml/XMLWriter.java 5 Oct 2003 01:25:37 -
***
*** 593,600 
  String qName, Attributes atts)
throws SAXException
  {
!   elementLevel++;
!   nsSupport.pushContext();
write('<');
writeName(uri, localName, qName, true);
writeAttributes(atts);
--- 593,600 
  String qName, Attributes atts)
throws SAXException
  {
! elementLevel++;
! nsSupport.pushContext();
write('<');
writeName(uri, localName, qName, true);
writeAttributes(atts);
***
*** 631,644 
write("');
!   if (elementLevel == 1) {
  writeln();
}
super.endElement(uri, localName, qName);
nsSupport.popContext();
!   elementLevel--;
  }
- 
  
  /**
   * Write character data.
--- 631,648 
write("');
! 
! if (elementLevel == 1) {
  writeln();
}
+ 
super.endElement(uri, localName, qName);
nsSupport.popContext();
! 
! if (--elementLevel == 1) {
! writeln();
!   }
  }
  
  /**
   * Write character data.
***
*** 712,718 
  public void comment (String data)
throws SAXException
  {
- writeln();
  doIndent();
write("

Bug report for Ant [2003/10/05]

2003-10-05 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
| 1509|Opn|Enh|2001-04-25|Project object not fully functional in BuildEvents|
| 2743|New|Enh|2001-07-23|More sophisticated dependency analysis|
| 2811|Ass|Enh|2001-07-25| does not work when an interface is modifi|
| 3198|Opn|Enh|2001-08-21|The  task doesn't work properly with multi-|
| 3310|New|Enh|2001-08-28|Clear case files and directories  |
| 3808|New|Enh|2001-09-25|making interfaces that projects implements.   |
| 3968|New|Enh|2001-10-04|Need way to have ejbjar task continue when errors |
| 4066|New|Enh|2001-10-10|Ant task and classpath|
| 5019|Ass|Maj|2001-11-21|ejbjar does not package ejb-ref interfaces|
| 5035|New|Enh|2001-11-22|Patternset and fileset enhancements   |
| 5270|Opn|Enh|2001-12-04|Ant task - allow multiple targets |
| 5748|New|Enh|2002-01-08|Filtering, Default Filter |
| 5789|New|Enh|2002-01-10|Enhanced PVCS task.   |
| 5949|New|Enh|2002-01-21|Stop using timestamp for "out-of-dateness" check  |
| 6226|New|Enh|2002-02-04|Organization of ant/lib directory, contents of ant|
| 6266|New|Enh|2002-02-06|Ant Zip task additional parameter request |
| 6368|Opn|Enh|2002-02-11|Wild card as a target name or comma separated targ|
| 6475|New|Enh|2002-02-14|I would like to be able to do the diff with to fil|
| 6495|New|Enh|2002-02-15|Support XML catalogs to resolve external entities |
| 6599|New|Enh|2002-02-20|Fork in javadoc is not needed if you added a secur|
| 6606|Opn|Enh|2002-02-21|META-BUG problems with delegating classloaders|
| 6757|New|Enh|2002-02-28|adding visibility to tasks|
| 7245|Ass|Enh|2002-03-19|JUnit & JUnitReport tasks / VM constraints|
| 7546|New|Enh|2002-03-27|EjbJar:Borland Task doesn't allow alternate compil|
| 7624|New|Enh|2002-03-29|chmod task should be extensible to non-Unix system|
| 7712|New|Enh|2002-04-03|Provide patternset support for VSSGET task?   |
| 7879|New|Enh|2002-04-09|the "style" task is very useful, but a little too |
| 8031|Opn|Enh|2002-04-12|Suggest ProjectHelperImpl use File.toURI().toURL()|
| 8085|Opn|Nor|2002-04-15|cvschangelog does not correctly detect ends of com|
| 8089|New|Maj|2002-04-15|weblogic-Element of ejbjar-Task needs support for |
| 8294|New|Enh|2002-04-19|Make apply better!|
| 8502|New|Enh|2002-04-25|Style task needs a failonerror/haltonerror attribu|
| 8559|New|Enh|2002-04-26|Add  to , add a new task ex.  property v|
| 8981|New|Enh|2002-05-10|Tar task command additional features  |
| 8986|New|Enh|2002-05-10|New attributes and nested tags for WAR task   |
| 8988|New|Enh|2002-05-10|global property inside a target   |
| 9294|New|Enh|2002-05-21|[PATCH] optional/j2ee/ServerDeploy OC4J Support   |
| 9296|New|Enh|2002-05-21|pathconvert should use default separators without |
| 9481|Ass|Enh|2002-05-29|Add a "prefix" attribute to ExpandProperties filte|
| 9671|New|Enh|2002-06-06|Add nested dirset in delete task  |
| 9784|New|Enh|2002-06-11|BuildNumber task: make more extendable... |
| 9892|New|Enh|2002-06-15|Comments on classpath tool|
| 9995|Ass|Enh|2002-06-19|MKS Source Integrity tasks|
|10020|New|Enh|2002-06-19|'s dependency behaviour should be more con|
|10231|New|Enh|2002-06-25|Need access to current file in SQLExec|
|10283|New|Enh|2002-06-27|Add a destfile to the uptodate task   |
|10402|New|Enh|2002-07-02|adding the ability of html like whitespace preserv|
|10413|Ass|Enh|2002-07-02|enhancement: JUnit task only creates one forked VM|
|10570|New|Enh|2002-07-08|more value on  tag with -projecthelp |
|10638|New|Enh|2002-07-10|Ant 2 should support the options with '-' and '--'|
|10652|New|Enh|2002-07-10|WebDav Support|
|10765|New|Enh|2002-07-12|junitreport stylesheet shou

cvs commit: ant-antidote/src/java/org/apache/tools/ant/gui/customizer package.html

2003-10-05 Thread chrisw
chrisw  2003/10/05 12:31:08

  Modified:src/java/org/apache/tools/ant/gui/xml XMLWriter.java
   src/java/org/apache/tools/ant/gui/core AppContext.java
  Added:   src/java/org/apache/tools/ant/gui/modules/console
package.html
   src/java/org/apache/tools/ant/gui/xml package.html
   src/java/org/apache/tools/ant/gui/event package.html
   src/java/org/apache/tools/ant/gui/core package.html
   src/java/org/apache/tools/ant/gui/xml/dtd package.html
   src/java/org/apache/tools/ant/gui/modules package.html
   src/java/org/apache/tools/ant/gui/modules/edit package.html
   src/java/org/apache/tools/ant/gui/ide package.html
   src/java/org/apache/tools/ant/gui/command package.html
   src/java/org/apache/tools/ant/gui/customizer package.html
  Log:
  Formatting XML output propertly, more JavaDoc, remove some import warnings.
  
  Obtained from: Jack Woehr
  Submitted by: Christoph Wilhelms
  Reviewed by:  Christoph Wilhelms
  
  Revision  ChangesPath
  1.1  
ant-antidote/src/java/org/apache/tools/ant/gui/modules/console/package.html
  
  Index: package.html
  ===
  
  
  
  
  
  Provides the Antidote text output console where build events, errors, etc., 
get reported in realtime.
  Package Specification
  The Console package provides the Antidote text output console where build 
events, errors, etc., get reported in realtime.
  
  
  
  
  
  
  1.5   +10 -7 
ant-antidote/src/java/org/apache/tools/ant/gui/xml/XMLWriter.java
  
  Index: XMLWriter.java
  ===
  RCS file: 
/home/cvs/ant-antidote/src/java/org/apache/tools/ant/gui/xml/XMLWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XMLWriter.java28 Sep 2003 13:03:00 -  1.4
  +++ XMLWriter.java5 Oct 2003 19:31:07 -   1.5
  @@ -593,8 +593,8 @@
  String qName, Attributes atts)
throws SAXException
   {
  - elementLevel++;
  - nsSupport.pushContext();
  +elementLevel++;
  +nsSupport.pushContext();
write('<');
writeName(uri, localName, qName, true);
writeAttributes(atts);
  @@ -631,14 +631,18 @@
write("');
  - if (elementLevel == 1) {
  +
  +if (elementLevel == 1) {
   writeln();
}
  +
super.endElement(uri, localName, qName);
nsSupport.popContext();
  - elementLevel--;
  +
  +if (--elementLevel == 1) {
  +writeln();
  + }
   }
  -
   
   /**
* Write character data.
  @@ -712,7 +716,6 @@
   public void comment (String data)
throws SAXException
   {
  -writeln();
   doIndent();
write("
  
  
  Provides the Antidote infrastructure for XML parsing and writing.
  
  Package Specification
  The XML package provides the Antidote infrastructure for XML parsing and 
writing.
  
  
  
  
  
  
  1.1  
ant-antidote/src/java/org/apache/tools/ant/gui/event/package.html
  
  Index: package.html
  ===
  
  
  
  
  
  Provides the features of the event bus by means of which entities within the 
Antidote
  application share and manage event notifications.
  
  Package Specification
  The Event package provides the features of the event bus by means
  of which entities within the Antidote application share and manage
  event notifications.
  
  
  
  
  
  
  1.7   +3 -6  
ant-antidote/src/java/org/apache/tools/ant/gui/core/AppContext.java
  
  Index: AppContext.java
  ===
  RCS file: 
/home/cvs/ant-antidote/src/java/org/apache/tools/ant/gui/core/AppContext.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AppContext.java   28 Sep 2003 13:03:00 -  1.6
  +++ AppContext.java   5 Oct 2003 19:31:08 -   1.7
  @@ -52,12 +52,9 @@
* .
*/
   package org.apache.tools.ant.gui.core;
  -import org.apache.tools.ant.BuildListener;
  -import org.apache.tools.ant.gui.event.*;
  -import org.apache.tools.ant.gui.acs.ACSProjectElement;
  -import org.apache.tools.ant.gui.acs.ACSTargetElement;
   import java.awt.Frame;
  -import java.util.*;
  +
  +import org.apache.tools.ant.gui.event.EventBus;
   
   /**
* A container for the state information for the application. Provides
  
  
  
  1.1  
ant-antidote/src/java/org/apache/tools/ant/gui/core/package.html
  
  Index: package.html
  ===
  
  
  
  
  
  Occupies the foundation layer of the Antidote application.
  Package Specification
  T

cvs commit: ant-antidote/src/java/org/apache/tools/ant/gui/core ProjectManager.java

2003-10-05 Thread chrisw
chrisw  2003/10/05 12:43:49

  Modified:src/java/org/apache/tools/ant/gui/core ProjectManager.java
  Log:
  Fixed bug persisting project, but not entire document!
  
  PR: Bug reported by Jack Woehr via mailig list!
  
  Revision  ChangesPath
  1.7   +4 -2  
ant-antidote/src/java/org/apache/tools/ant/gui/core/ProjectManager.java
  
  Index: ProjectManager.java
  ===
  RCS file: 
/home/cvs/ant-antidote/src/java/org/apache/tools/ant/gui/core/ProjectManager.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ProjectManager.java   10 Feb 2003 14:35:02 -  1.6
  +++ ProjectManager.java   5 Oct 2003 19:43:49 -   1.7
  @@ -174,7 +174,9 @@
   }
   
   // Persist the project.
  -project.write(out);
  +// Call the write method of the parent node (document) do 
persist document related tags
  +// and not only the project!
  +project.getParentNode().write(out);
   out.flush();
   project.setLocation(location);
   project.setModified(false);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Bug in Antidote

2003-10-05 Thread Christoph Wilhelms
Hi Jack!

> Bug in Antidote that affects the output.
> 
> I've just noticed that  xml.XMLWriter. startDocument () never 
> gets called. In theory it gets called in 
> xml.DOMNodeSerializer.writeNodeStart() when passed a Node of 
> type DOCUMENT_NODE but apparently it never gets passed that 
> type of node. The result is that the  never gets written to the output file. This may also be the 
> reason that a document-leading comment outside the  
> tag gets eaten.
>
[...]
> 
> I'm trying to figure this out. Any tips, Christoph?

Fixed myself! Thanx!

It occurred because the serialize method "write" has been called to the
Project node, not to the document node one level above (in
core.ProjectManager)! Should work now!

Greeting,
Christoph


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]