From 31043993ef04ff588f27940ea36d01c68147dd9f Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 29 Jun 1999 10:44:17 +0000 Subject: [PATCH] better classpath handling tabbedprintwriter is now buffered git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@961 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/swingui/Main.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/jode/jode/swingui/Main.java b/jode/jode/swingui/Main.java index a7af142..9793b16 100644 --- a/jode/jode/swingui/Main.java +++ b/jode/jode/swingui/Main.java @@ -21,6 +21,7 @@ package jode.swingui; import jode.GlobalOptions; import jode.decompiler.*; import jode.bytecode.ClassInfo; +import jode.bytecode.SearchPath; ///#ifndef OLDSWING import javax.swing.*; import javax.swing.event.*; @@ -87,7 +88,7 @@ public class MainWindow rightPane.setDividerSize(4); allPane.setDividerLocation(200); allPane.setDividerSize(4); - GlobalOptions.err = new PrintWriter(new AreaWriter(errorArea)); + GlobalOptions.err = new PrintWriter(new AreaWriter(errorArea), true); } public synchronized void valueChanged(TreeSelectionEvent e) { @@ -181,13 +182,18 @@ public class MainWindow imports.init(lastClassName); ClassAnalyzer clazzAna = new ClassAnalyzer(null, clazz, imports); clazzAna.analyze(); + clazzAna.analyzeInnerClasses(); + clazzAna.makeDeclaration(); sourcecodeArea.setText(""); TabbedPrintWriter writer = - new TabbedPrintWriter(new AreaWriter(sourcecodeArea), imports); + new TabbedPrintWriter + (new BufferedWriter + (new AreaWriter(sourcecodeArea), 1024), imports); imports.dumpHeader(writer); clazzAna.dumpSource(writer); + writer.close(); // saveButton.setEnabled(true); } catch (Throwable t) { @@ -261,15 +267,16 @@ public class MainWindow } public static void main(String[] params) { - String cp = System.getProperty("java.class.path"); + String cp = System.getProperty("java.class.path", ""); + cp = cp.replace(File.pathSeparatorChar, SearchPath.pathSeparatorChar); for (int i=0; i