From 3d4ba9ccf1570159bf29fe20b2360662bd6a570f Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 28 Apr 1999 16:25:05 +0000 Subject: [PATCH] open/closeBraceNoSpace (for ConstantArrayOperator) git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@690 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/decompiler/TabbedPrintWriter.java | 27 +++++++++++++++++++++ 1 file changed, 27 insertions(+) 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("}");