2828import java .util .regex .Matcher ;
2929import java .util .regex .Pattern ;
3030
31- import processing .app .Editor ;
31+ import processing .app .ui . Editor ;
3232import processing .app .RunnerListener ;
3333import processing .app .SketchException ;
3434import processing .mode .java .runner .Runner ;
3737public class AndroidRunner implements DeviceListener {
3838 AndroidBuild build ;
3939 RunnerListener listener ;
40-
40+
4141 protected PrintStream sketchErr ;
4242 protected PrintStream sketchOut ;
4343
44-
44+
4545 public AndroidRunner (AndroidBuild build , RunnerListener listener ) {
4646 this .build = build ;
4747 this .listener = listener ;
48-
48+
4949 if (listener instanceof Editor ) {
5050 Editor editor = (Editor ) listener ;
5151 sketchErr = editor .getConsole ().getErr ();
@@ -55,8 +55,8 @@ public AndroidRunner(AndroidBuild build, RunnerListener listener) {
5555 sketchOut = System .out ;
5656 }
5757 }
58-
59-
58+
59+
6060 public void launch (Future <Device > deviceFuture ) {
6161// try {
6262// runSketchOnDevice(Devices.getInstance().getEmulator(), "debug", AndroidEditor.this);
@@ -70,7 +70,7 @@ public void launch(Future<Device> deviceFuture) {
7070 final Device device = waitForDevice (deviceFuture , listener );
7171 if (device == null || !device .isAlive ()) {
7272 listener .statusError ("Lost connection with device while launching. Try again." );
73- // Reset the server, in case that's the problem. Sometimes when
73+ // Reset the server, in case that's the problem. Sometimes when
7474 // launching the emulator times out, the device list refuses to update.
7575 Devices .killAdbServer ();
7676 return ;
@@ -91,7 +91,7 @@ public void launch(Future<Device> deviceFuture) {
9191 Devices .killAdbServer (); // see above
9292 return ;
9393 }
94- // if (!build.antInstall()) {
94+ // if (!build.antInstall()) {
9595// }
9696
9797// if (monitor.isCanceled()) {
@@ -115,8 +115,8 @@ public void launch(Future<Device> deviceFuture) {
115115//listener.stopIndeterminate();
116116//}
117117 }
118-
119-
118+
119+
120120 private volatile Device lastRunDevice = null ;
121121
122122 /**
@@ -132,7 +132,7 @@ private void runSketchOnDevice(Sketch sketch,
132132// "Building and launching...",
133133// "Creating project...");
134134
135-
135+
136136 AndroidBuild build = new AndroidBuild(sketch, listener);
137137 try {
138138 try {
@@ -207,7 +207,7 @@ private void runSketchOnDevice(Sketch sketch,
207207 }
208208 */
209209
210-
210+
211211 // if user asks for 480x320, 320x480, 854x480 etc, then launch like that
212212 // though would need to query the emulator to see if it can do that
213213
@@ -248,8 +248,8 @@ private Device waitForDevice(Future<Device> deviceFuture, RunnerListener listene
248248 "on waiting for that device to show up." );
249249 return null ;
250250 }
251-
252-
251+
252+
253253 private static final Pattern LOCATION =
254254 Pattern .compile ("\\ (([^:]+):(\\ d+)\\ )" );
255255 private static final Pattern EXCEPTION_PARSER =
@@ -304,7 +304,7 @@ public void close() {
304304 }
305305
306306
307- // sketch stopped on the device
307+ // sketch stopped on the device
308308 public void sketchStopped () {
309309 listener .stopIndeterminate ();
310310 listener .statusHalt ();
0 commit comments