~ubuntu-branches/ubuntu/oneiric/electric/oneiric

« back to all changes in this revision

Viewing changes to com/sun/electric/tool/user/MessagesStream.java

  • Committer: Bazaar Package Importer
  • Author(s): Onkar Shinde
  • Date: 2010-01-09 16:26:04 UTC
  • mfrom: (1.1.4 upstream) (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100109162604-1ypvmy8ijmlc6oq7
Tags: 8.10-1
* New upstream version.
* debian/control
  - Add libjava3d-java and quilt build dependencies.
  - Update standards version to 3.8.3.
  - Add libjava3d-java as recommends to binary package.
* debian/rules
  - Use quilt patch system instead of simple patchsys.
  - Add java3d related jar files to DEB_JARS.
* debian/patches/*
  - Update as per current upstream source. Convert to quilt.
* debian/ant.properties
  - Do not disable 3D plugin anymore.
  - Use new property to disable compilation of OS X related classes.
* debian/wrappers/electric
  - Add java3d related jar files to runtime classpath.
* debian/README.source
  - Change text to the appropriate one for quilt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 */
24
24
package com.sun.electric.tool.user;
25
25
 
 
26
import com.sun.electric.Main;
 
27
import com.sun.electric.database.variable.UserInterface;
26
28
import com.sun.electric.tool.Job;
27
29
import com.sun.electric.tool.user.dialogs.OpenFile;
28
30
import com.sun.electric.tool.io.FileType;
94
96
    @Override public void println(Object obj) { print(String.valueOf(obj), true); }
95
97
 
96
98
    private void print(String s, boolean newLine) {
97
 
        Job.getUserInterface().printMessage(s, newLine);
 
99
        if (Main.isBatch()) {
 
100
            if (newLine) Main.UserInterfaceDummy.stdout.println(s);
 
101
            else         Main.UserInterfaceDummy.stdout.print(s);
 
102
        } else {
 
103
            UserInterface ui = Job.getUserInterface();
 
104
            if (ui != null) {
 
105
                ui.printMessage(s, newLine);
 
106
                return;
 
107
            }
 
108
            ui = Job.getExtendedUserInterface();
 
109
            if (ui != null) {
 
110
                ui.printMessage(s, newLine);
 
111
                return;
 
112
            }
 
113
            if (newLine) {
 
114
                System.err.println(s);
 
115
            } else {
 
116
                System.err.print(s);
 
117
            }
 
118
        }
98
119
    }
99
120
 
100
121
        /**