Skip to content

Commit c5201b3

Browse files
committed
wrapping up more of the debugging bits so not as many messages are coming through
1 parent 555c26a commit c5201b3

File tree

9 files changed

+32
-16
lines changed

9 files changed

+32
-16
lines changed

android/core/src/processing/core/PApplet.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ public class PApplet extends Activity implements PConstants, Runnable {
5959
/** The PGraphics renderer associated with this PApplet */
6060
public PGraphics g;
6161

62-
static final boolean DEBUG = true;
62+
// static final boolean DEBUG = true;
63+
static final boolean DEBUG = false;
6364

6465
/** The frame containing this applet (if any) */
6566
// public Frame frame;

android/tool/src/processing/app/tools/android/AndroidEnvironment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static void killAdbServer() {
5555

5656

5757
private AndroidEnvironment() {
58-
if (AndroidMode.DEBUG) {
58+
if (processing.app.Base.DEBUG) {
5959
System.out.println("Starting up AndroidEnvironment");
6060
}
6161
// killAdbServer();

android/tool/src/processing/app/tools/android/AndroidMode.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ public class AndroidMode implements DeviceListener {
5252
private Editor editor;
5353
private Build build;
5454

55-
static public boolean DEBUG = true;
56-
5755
private static final String ANDROID_CORE_FILENAME =
5856
"processing-android-core-" + Base.VERSION_NAME + ".zip";
5957

android/tool/src/processing/app/tools/android/AndroidSDK.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ public static ProcessResult runADB(final String... cmd)
199199
adbCmd = cmd;
200200
}
201201
// printing this here to see if anyone else is killing the adb server
202-
if (AndroidMode.DEBUG) PApplet.println(adbCmd);
202+
if (processing.app.Base.DEBUG) {
203+
PApplet.println(adbCmd);
204+
}
203205
// try {
204206
ProcessResult adbResult = new ProcessHelper(adbCmd).execute();
205207
// Ignore messages about starting up an adb daemon

android/tool/src/processing/app/tools/android/Build.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ public File createProject(String target) {
113113

114114
// Create the 'src' folder with the preprocessed code.
115115
final File srcFolder = new File(tempBuildFolder, "src");
116-
if (AndroidMode.DEBUG) Base.openFolder(tempBuildFolder);
116+
if (processing.app.Base.DEBUG) {
117+
Base.openFolder(tempBuildFolder);
118+
}
117119

118120
try {
119121
manifest = new Manifest(editor);

android/tool/src/processing/app/tools/android/EmulatorController.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ public State getState() {
2626
}
2727

2828
private void setState(final State state) {
29-
System.out.println("Emulator state: " + state);
30-
new Exception().printStackTrace(System.out);
29+
if (processing.app.Base.DEBUG) {
30+
System.out.println("Emulator state: " + state);
31+
new Exception().printStackTrace(System.out);
32+
}
3133
this.state = state;
3234
}
3335

@@ -103,7 +105,9 @@ public void run() {
103105
try {
104106
// System.err.println("EmulatorController: Waiting for boot.");
105107
while (state == State.WAITING_FOR_BOOT) {
106-
System.out.println("sleeping for 2 seconds " + new java.util.Date().toString());
108+
if (processing.app.Base.DEBUG) {
109+
System.out.println("sleeping for 2 seconds " + new java.util.Date().toString());
110+
}
107111
Thread.sleep(2000);
108112
// System.out.println("done sleeping");
109113
for (final String device : AndroidEnvironment.listDevices()) {

app/src/processing/app/Base.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ public class Base {
4646
static public String VERSION_NAME = "0190";
4747
/** Set true if this a proper release rather than a numbered revision. */
4848
static public boolean RELEASE = false;
49+
/** True if heavy debugging error/log messages are enabled */
50+
static public boolean DEBUG = false;
4951

5052
static HashMap<Integer, String> platformNames =
5153
new HashMap<Integer, String>();

app/src/processing/app/exec/StreamPump.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import java.util.concurrent.ExecutorService;
1313
import java.util.concurrent.Executors;
1414
import java.util.concurrent.ThreadFactory;
15+
import processing.app.Base;
1516

1617

1718
/**
@@ -77,10 +78,12 @@ public void run() {
7778
}
7879
}
7980
} catch (final IOException e) {
80-
// System.err.println("StreamPump: " + name);
81-
// e.printStackTrace(System.err);
82-
// removing for 0190, but need a better way to handle these
83-
// throw new RuntimeException("Inside " + this + " for " + name, e);
81+
if (Base.DEBUG) {
82+
System.err.println("StreamPump: " + name);
83+
e.printStackTrace(System.err);
84+
// removing for 0190, but need a better way to handle these
85+
throw new RuntimeException("Inside " + this + " for " + name, e);
86+
}
8487
}
8588
}
8689

todo.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ X http://dev.processing.org/bugs/show_bug.cgi?id=35
1818
X http://code.google.com/p/processing/issues/detail?id=15
1919

2020

21+
mode work
22+
_ locations: sketchbook, examples, libraries
23+
_ 'export' and 'export application' titles and/or # of items
24+
_ 'run' and 'present' under sketch, and/or # of items
25+
2126
_ add processing.js export tool from florian
2227
_ http://github.com/fjenett/processingjstool/
2328
_ http://github.com/fjenett/processingjstool/zipball/v0.0.6
@@ -31,9 +36,8 @@ _ http://code.google.com/p/processing/issues/detail?id=335
3136
_ auto-format screws up if/else/else if blocks
3237
_ http://code.google.com/p/processing/issues/detail?id=325
3338

34-
_ locations: sketchbook, examples, libraries
35-
_ 'export' and 'export application' titles and/or # of items
36-
_ 'run' and 'present' under sketch, and/or # of items
39+
_ Exported libraries don't mantain symbolic links
40+
_ http://code.google.com/p/processing/issues/detail?id=353
3741

3842
_ launch4j problem
3943
_ no crash when double-clicking a sketch and loading it

0 commit comments

Comments
 (0)