1.1 --- a/src/share/classes/com/sun/tools/javac/tree/Pretty.java Thu Nov 19 11:43:43 2009 -0800 1.2 +++ b/src/share/classes/com/sun/tools/javac/tree/Pretty.java Thu Nov 19 11:49:27 2009 -0800 1.3 @@ -54,7 +54,7 @@ 1.4 /** Set when we are producing source output. If we're not 1.5 * producing source output, we can sometimes give more detail in 1.6 * the output even though that detail would not be valid java 1.7 - * soruce. 1.8 + * source. 1.9 */ 1.10 private final boolean sourceOutput; 1.11 1.12 @@ -489,6 +489,20 @@ 1.13 print("/*public static final*/ "); 1.14 print(tree.name); 1.15 if (tree.init != null) { 1.16 + if (sourceOutput && tree.init.getTag() == JCTree.NEWCLASS) { 1.17 + print(" /*enum*/ "); 1.18 + JCNewClass init = (JCNewClass) tree.init; 1.19 + if (init.args != null && init.args.nonEmpty()) { 1.20 + print("("); 1.21 + print(init.args); 1.22 + print(")"); 1.23 + } 1.24 + if (init.def != null && init.def.defs != null) { 1.25 + print(" "); 1.26 + printBlock(init.def.defs); 1.27 + } 1.28 + return; 1.29 + } 1.30 print(" /* = "); 1.31 printExpr(tree.init); 1.32 print(" */");