diff --git a/jode/jode/decompiler/TabbedPrintWriter.java b/jode/jode/decompiler/TabbedPrintWriter.java index fef7056..34a8dcd 100644 --- a/jode/jode/decompiler/TabbedPrintWriter.java +++ b/jode/jode/decompiler/TabbedPrintWriter.java @@ -140,6 +140,23 @@ public class TabbedPrintWriter { } } + /** + * Print a opening brace with the current indentation style. + * Called at the end of the line of the instance that opens the + * brace. It doesn't do a tab stop after opening the brace. + */ + public void openBraceNoSpace() { + if ((Decompiler.outputStyle & Decompiler.BRACE_AT_EOL) != 0) + println("{"); + else { + if (!atbol) + println(); + if (currentIndent > 0) + tab(); + println("{"); + } + } + public void closeBraceContinue() { if ((Decompiler.outputStyle & Decompiler.BRACE_AT_EOL) != 0) print("} "); @@ -150,6 +167,16 @@ public class TabbedPrintWriter { } } + public void closeBraceNoSpace() { + if ((Decompiler.outputStyle & Decompiler.BRACE_AT_EOL) != 0) + print("}"); + else { + println("}"); + if (currentIndent > 0) + untab(); + } + } + public void closeBrace() { if ((Decompiler.outputStyle & Decompiler.BRACE_AT_EOL) != 0) println("}");