mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 13:49:18 +01:00
working on android stuff, debugging whatnot
This commit is contained in:
@@ -10,8 +10,8 @@ public class ProcessResult implements Iterable<String> {
|
||||
private final String error;
|
||||
private final int result;
|
||||
|
||||
public ProcessResult(final String cmd, final int result, final String output,
|
||||
final String error, final long time) {
|
||||
public ProcessResult(String cmd, int result, String output,
|
||||
String error, long time) {
|
||||
this.cmd = cmd;
|
||||
this.output = output;
|
||||
this.error = error;
|
||||
@@ -52,8 +52,8 @@ public class ProcessResult implements Iterable<String> {
|
||||
final StringBuilder sb = new StringBuilder(cmd).append("\n");
|
||||
sb.append(" status: ").append(result).append("\n");
|
||||
sb.append(" ").append(time).append("ms").append("\n");
|
||||
sb.append(" stdout:\n").append(output).append("\n");
|
||||
sb.append(" stderr:\n").append(error);
|
||||
sb.append(" stdout:\n").append(output.trim()).append("\n");
|
||||
sb.append(" stderr:\n").append(error.trim());
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import processing.app.EditorConsole;
|
||||
|
||||
|
||||
/**
|
||||
* <p>A StreamPump reads lines of text from its given InputStream
|
||||
@@ -24,8 +26,8 @@ import java.util.concurrent.ThreadFactory;
|
||||
*
|
||||
*/
|
||||
public class StreamPump implements Runnable {
|
||||
private static final ExecutorService threads = Executors
|
||||
.newCachedThreadPool(new ThreadFactory() {
|
||||
private static final ExecutorService threads =
|
||||
Executors.newCachedThreadPool(new ThreadFactory() {
|
||||
public Thread newThread(final Runnable r) {
|
||||
final Thread t = new Thread(r);
|
||||
t.setDaemon(true);
|
||||
@@ -59,6 +61,8 @@ public class StreamPump implements Runnable {
|
||||
}
|
||||
|
||||
public void start() {
|
||||
// System.out.println("starting new StreamPump");
|
||||
// new Exception().printStackTrace(EditorConsole.systemOut);
|
||||
threads.execute(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user