[Sablevm-developer] Code indenter / Uncompilable classes
Brought to you by:
egagnon
From: Etienne M. G. <eti...@uq...> - 2001-08-27 20:21:24
|
Hi. Lately, I have imported the latest sources from the Classpath repository into sablepath-classes, using scripts to extract java sources (and related resource files) and relocate them in a sane directory structure. I- === One thing I would like to have is a code indenter, somethink akin "indent". This would simplify code maintenance as we could run the indenter along the "import" scripts so that diffs with the vendor CVS branch wouldn't be artificially inflated by simple code re-indentation. Also, it makes life simpler for everybody to have a uniform indentation style. Personally, I would like a program that indents programs closely to the "GNU C" style, with matching parenthesis level, one space between identifier/keyword and "(", with minor modifications... something like: void foo (int a, long b) { ... } *** NOT *** void foo( int a , long b ) { ... } Anyone knows a *** robust *** program to do so? All the ones I have tried so far have bugs when confronted to inner-classes/anonymous classes, or are not flexible using Sun's ugly unmatched "{" "}" levels, etc. II- === The latest Classpath source files are mostly broken under Jikes (I'm using version 1.14). So I have cheated, and tried compiling them under "javac". [I am not checking that semantics are OK, just that they compile]. Even this is asking a lot from Classpath... There are 20 classes that are definitely broken. Here is the list: src/gnu/javax/swing/plaf/gtk/GtkBorders.java src/gnu/javax/swing/plaf/gtk/GtkCheckBoxUI.java src/gnu/javax/swing/plaf/gtk/GtkIconFactory.java src/gnu/javax/swing/plaf/gtk/GtkLookAndFeel.java src/gnu/javax/swing/plaf/gtk/GtkRadioButtonUI.java src/gnu/javax/swing/plaf/gtk/GtkSliderUI.java src/java/util/jar/JarEntry.java src/java/util/jar/JarFile.java src/java/util/jar/JarInputStream.java src/java/util/jar/JarOutputStream.java src/javax/accessibility/Accessible.java src/javax/accessibility/AccessibleHypertext.java src/javax/accessibility/AccessibleText.java src/javax/swing/GrayFilter.java src/javax/swing/plaf/BorderUIResource.java src/java/net/JarURLConnection.java src/javax/accessibility/AccessibleComponent.java src/javax/accessibility/AccessibleSelection.java src/java/net/URLClassLoader.java src/java/util/IdentityHashMap.java I have not looked for the reason why these are broken. More annoying is the fact that many classes, including "core" library classes (I think java.io.File is part of them) are broken under Jikes. Jikes seems to die with something like a "signal 11". As usual, you must be careful to set BOTH the "-bootclasspath" and "-classpath" command line options to for the compiler to use "SablePath" as its core system library when you compile the code (with jikes and/or javac). All help/suggestions would be appreciated. Have fun, Etienne -- Etienne M. Gagnon eti...@uq... SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |