I've hacked jalopy a bit to generate output that conforms more closely to what we'd like.
You can get it here: ftp://sources.redhat.com/pub/java/jalopy-console-1.0.4.tar.gz Also in that directory is "GNU.xml", my attempt at a GNU-like style file. I don't have anywhere to check in my changes; in the meantime they're living here in an eclipse workspace. I can generate a patch for anybody who wants it. A few caveats: * I didn't add a GUI for the new options I added; I just set up their defaults to be what we'd like. This is easy enough to change later if needed. * jalopy always uses spaces for everything; the "tab" options don't do what we'd like. Do we want tabs in the source? If so, we can run the output through unexpand easily enough (or write a simple output filter that tabifies). If not, we can all adjust our .emacs files to cope. * Sometimes jalopy adds blank lines where we probably wouldn't. See the attached Point.java patch. I requested the deletion before "package" and the addition after the imports, but the other changes are jalopy's idea. I'll try to look at this soon-ish. It also adds blank lines around abstract methods, see the second patch. * I disabled interpretation of javadoc (via a setting, not in the source), since our javadoc confuses jalopy. So javadoc is never reformatted. * I'd like to have it be able to delete "closing comments" after the final brace of a method or class (I usually remove these when I see them), but I haven't added this feature yet... not sure if we really wanted it. * Bonus points for anybody who changes jalopy to remove redundant modifiers, like "public" in an interface. Please try it out and let me know what you think. I've only spot-checked a few files in java.awt and javax.swing, we need more eyes on this before we can use it in earnest. I think we're pretty close to being able to use this. Tom Index: Point.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/Point.java,v retrieving revision 1.7 diff -u -r1.7 Point.java --- Point.java 21 Mar 2002 07:58:00 -0000 1.7 +++ Point.java 14 Nov 2003 03:56:44 -0000 @@ -35,12 +35,12 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package java.awt; import java.awt.geom.Point2D; import java.io.Serializable; + /** * This class represents a point on the screen using cartesian coordinates. * Remember that in screen coordinates, increasing x values go from left to @@ -228,7 +228,9 @@ { if (! (obj instanceof Point2D)) return false; + Point2D p = (Point2D) obj; + return x == p.getX() && y == p.getY(); } Index: MenuPeer.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/peer/MenuPeer.java,v retrieving revision 1.10 diff -u -r1.10 MenuPeer.java --- MenuPeer.java 12 Oct 2003 13:53:40 -0000 1.10 +++ MenuPeer.java 14 Nov 2003 04:13:42 -0000 @@ -35,15 +35,16 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ - package java.awt.peer; import java.awt.MenuItem; + public interface MenuPeer extends MenuItemPeer { - void addItem (MenuItem item); - void addSeparator (); - void delItem (int index); -} + void addItem(MenuItem item); + void addSeparator(); + + void delItem(int index); +} _______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath