Ignore:
Timestamp:
2013-09-23T16:47:50+02:00 (13 years ago)
Author:
Don-vip
Message:

Rework console output:

  • new log level "error"
  • Replace nearly all calls to system.out and system.err to Main.(error|warn|info|debug)
  • Remove some unnecessary debug output
  • Some messages are modified (removal of "Info", "Warning", "Error" from the message itself -> notable i18n impact but limited to console error messages not seen by the majority of users, so that's ok)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MultiSplitLayout.java

    r6093 r6248  
    3131import java.beans.PropertyChangeListener;
    3232import java.beans.PropertyChangeSupport;
    33 import java.io.IOException;
    3433import java.io.Reader;
    3534import java.io.StreamTokenizer;
     
    4544import javax.swing.UIManager;
    4645
     46import org.openstreetmap.josm.Main;
    4747import org.openstreetmap.josm.tools.Utils;
    4848
     
    12631263        }
    12641264        catch (Exception e) {
    1265             System.err.println(e);
     1265            Main.error(e);
    12661266        }
    12671267        finally {
     
    13201320        return parseModel(new StringReader(s));
    13211321    }
    1322 
    1323     private static void printModel(String indent, Node root) {
    1324         if (root instanceof Split) {
    1325             Split split = (Split)root;
    1326             System.out.println(indent + split);
    1327             for(Node child : split.getChildren()) {
    1328                 printModel(indent + "  ", child);
    1329             }
    1330         }
    1331         else {
    1332             System.out.println(indent + root);
    1333         }
    1334     }
    1335 
    1336     /**
    1337      * Print the tree with enough detail for simple debugging.
    1338      */
    1339     public static void printModel(Node root) {
    1340         printModel("", root);
    1341     }
    13421322}
Note: See TracChangeset for help on using the changeset viewer.