| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2060,6 +2060,16 @@ public void startIndeterminate() { | |||
| 2060 | 2060 | public void stopIndeterminate() { | |
| 2061 | 2061 | status.stopIndeterminate(); | |
| 2062 | 2062 | } | |
| 2063 | + | ||
| 2064 | + | ||
| 2065 | + public void statusHalt() { | ||
| 2066 | + // stop called by someone else | ||
| 2067 | + } | ||
| 2068 | + | ||
| 2069 | + | ||
| 2070 | + public boolean isHalted() { | ||
| 2071 | + return false; | ||
| 2072 | + } | ||
| 2063 | 2073 | ||
| 2064 | 2074 | ||
| 2065 | 2075 | // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,10 +30,16 @@ public interface RunnerListener { | |||
| 30 | 30 | public void statusError(Exception exception); | |
| 31 | 31 | ||
| 32 | 32 | public void statusNotice(String message); | |
| 33 | - | ||
| 34 | - // | ||
| 33 | + | ||
| 34 | + // | ||
| 35 | 35 | ||
| 36 | 36 | public void startIndeterminate(); | |
| 37 | 37 | ||
| 38 | 38 | public void stopIndeterminate(); | |
| 39 | + | ||
| 40 | + // | ||
| 41 | + | ||
| 42 | + public void statusHalt(); | ||
| 43 | + | ||
| 44 | + public boolean isHalted(); | ||
| 39 | 45 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -96,21 +96,21 @@ public File createProject(String target, File coreZipFile) throws IOException, S | |||
| 96 | 96 | // PApplet.saveStream(new File(libsFolder, "processing-core.jar"), input); | |
| 97 | 97 | Base.copyFile(coreZipFile, new File(libsFolder, "processing-core.jar")); | |
| 98 | 98 | ||
| 99 | - try { | ||
| 100 | - // Copy any imported libraries or code folder contents to the project | ||
| 101 | - copyLibraries(libsFolder, assetsFolder); | ||
| 102 | - copyCodeFolder(libsFolder); | ||
| 103 | - | ||
| 104 | - // Copy the data folder, if one exists, to the 'assets' folder of the | ||
| 105 | - // project | ||
| 106 | - final File sketchDataFolder = sketch.getDataFolder(); | ||
| 107 | - if (sketchDataFolder.exists()) { | ||
| 108 | - Base.copyDir(sketchDataFolder, assetsFolder); | ||
| 109 | - } | ||
| 110 | - } catch (final IOException e) { | ||
| 111 | - e.printStackTrace(); | ||
| 112 | - throw new SketchException(e.getMessage()); | ||
| 99 | + // try { | ||
| 100 | + // Copy any imported libraries or code folder contents to the project | ||
| 101 | + copyLibraries(libsFolder, assetsFolder); | ||
| 102 | + copyCodeFolder(libsFolder); | ||
| 103 | + | ||
| 104 | + // Copy the data folder, if one exists, to the 'assets' folder of the | ||
| 105 | + // project | ||
| 106 | + final File sketchDataFolder = sketch.getDataFolder(); | ||
| 107 | + if (sketchDataFolder.exists()) { | ||
| 108 | + Base.copyDir(sketchDataFolder, assetsFolder); | ||
| 113 | 109 | } | |
| 110 | + // } catch (final IOException e) { | ||
| 111 | + // e.printStackTrace(); | ||
| 112 | + // throw new SketchException(e.getMessage()); | ||
| 113 | + // } | ||
| 114 | 114 | } | |
| 115 | 115 | // } catch (final SketchException e) { | |
| 116 | 116 | // editor.statusError(e); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -328,10 +328,11 @@ private boolean startSketch(final Device device) { | |||
| 328 | 328 | } | |
| 329 | 329 | ||
| 330 | 330 | ||
| 331 | - private Device waitForDevice(final Future<Device> deviceFuture, | ||
| 332 | - final IndeterminateProgressMonitor monitor) throws MonitorCanceled { | ||
| 331 | + private Device waitForDevice(Future<Device> deviceFuture, RunnerListener listener) throws MonitorCanceled { | ||
| 332 | + // final IndeterminateProgressMonitor monitor) | ||
| 333 | 333 | for (int i = 0; i < 120; i++) { | |
| 334 | - if (monitor.isCanceled()) { | ||
| 334 | + // if (monitor.isCanceled()) { | ||
| 335 | + if (listener.isHalted()) { | ||
| 335 | 336 | deviceFuture.cancel(true); | |
| 336 | 337 | throw new MonitorCanceled(); | |
| 337 | 338 | } | |
@@ -360,13 +361,13 @@ private Device waitForDevice(final Future<Device> deviceFuture, | |||
| 360 | 361 | private void runSketchOnDevice(final Future<Device> deviceFuture, | |
| 361 | 362 | final String target, | |
| 362 | 363 | RunnerListener listener) throws MonitorCanceled { | |
| 363 | - final IndeterminateProgressMonitor monitor = | ||
| 364 | - new IndeterminateProgressMonitor(this, | ||
| 365 | - "Building and launching...", | ||
| 366 | - "Creating project..."); | ||
| 364 | + // final IndeterminateProgressMonitor monitor = | ||
| 365 | + // new IndeterminateProgressMonitor(this, | ||
| 366 | + // "Building and launching...", | ||
| 367 | + // "Creating project..."); | ||
| 367 | 368 | ||
| 368 | 369 | listener.startIndeterminate(); | |
| 369 | - listener.statusNotice("Building and launching..."); | ||
| 370 | + listener.statusNotice("Creating project..."); | ||
| 370 | 371 | ||
| 371 | 372 | build = new AndroidBuild(sketch, amode.getSDK()); | |
| 372 | 373 | try { | |
@@ -380,10 +381,11 @@ private void runSketchOnDevice(final Future<Device> deviceFuture, | |||
| 380 | 381 | statusError(e); | |
| 381 | 382 | } | |
| 382 | 383 | try { | |
| 383 | - if (monitor.isCanceled()) { | ||
| 384 | - throw new MonitorCanceled(); | ||
| 385 | - } | ||
| 386 | - monitor.setNote("Building..."); | ||
| 384 | + // if (monitor.isCanceled()) { | ||
| 385 | + // throw new MonitorCanceled(); | ||
| 386 | + // } | ||
| 387 | + // monitor.setNote("Building..."); | ||
| 388 | + listener.statusNotice("Building..."); | ||
| 387 | 389 | try { | |
| 388 | 390 | if (!build.antBuild(target)) { | |
| 389 | 391 | return; | |
@@ -392,31 +394,36 @@ private void runSketchOnDevice(final Future<Device> deviceFuture, | |||
| 392 | 394 | statusError(se); | |
| 393 | 395 | } | |
| 394 | 396 | ||
| 395 | - if (monitor.isCanceled()) { | ||
| 396 | - throw new MonitorCanceled(); | ||
| 397 | - } | ||
| 398 | - monitor.setNote("Waiting for device to become available..."); | ||
| 399 | - final Device device = waitForDevice(deviceFuture, monitor); | ||
| 397 | + // if (monitor.isCanceled()) { | ||
| 398 | + // throw new MonitorCanceled(); | ||
| 399 | + // } | ||
| 400 | + // monitor.setNote("Waiting for device to become available..."); | ||
| 401 | + listener.statusNotice("Waiting for device to become available..."); | ||
| 402 | + // final Device device = waitForDevice(deviceFuture, monitor); | ||
| 403 | + final Device device = waitForDevice(deviceFuture, listener); | ||
| 400 | 404 | if (device == null || !device.isAlive()) { | |
| 401 | 405 | statusError("Device killed or disconnected."); | |
| 402 | 406 | return; | |
| 403 | 407 | } | |
| 404 | 408 | ||
| 405 | 409 | device.addListener(this); | |
| 406 | 410 | ||
| 407 | - if (monitor.isCanceled()) { | ||
| 411 | + if (listener.isHalted()) { | ||
| 412 | + // if (monitor.isCanceled()) { | ||
| 408 | 413 | throw new MonitorCanceled(); | |
| 409 | 414 | } | |
| 410 | - monitor.setNote("Installing sketch on " + device.getId()); | ||
| 415 | + // monitor.setNote("Installing sketch on " + device.getId()); | ||
| 416 | + statusNotice("Installing sketch on " + device.getId()); | ||
| 411 | 417 | if (!device.installApp(build.getPathForAPK(target), this)) { | |
| 412 | 418 | statusError("Device killed or disconnected."); | |
| 413 | 419 | return; | |
| 414 | 420 | } | |
| 415 | 421 | ||
| 416 | - if (monitor.isCanceled()) { | ||
| 417 | - throw new MonitorCanceled(); | ||
| 418 | - } | ||
| 419 | - monitor.setNote("Starting sketch on " + device.getId()); | ||
| 422 | + // if (monitor.isCanceled()) { | ||
| 423 | + // throw new MonitorCanceled(); | ||
| 424 | + // } | ||
| 425 | + // monitor.setNote("Starting sketch on " + device.getId()); | ||
| 426 | + listener.statusNotice("Starting sketch on " + device.getId()); | ||
| 420 | 427 | if (startSketch(device)) { | |
| 421 | 428 | statusNotice("Sketch launched on the " | |
| 422 | 429 | + (device.isEmulator() ? "emulator" : "phone") + "."); | |
@@ -429,7 +436,8 @@ private void runSketchOnDevice(final Future<Device> deviceFuture, | |||
| 429 | 436 | build.cleanup(); | |
| 430 | 437 | } | |
| 431 | 438 | } finally { | |
| 432 | - monitor.close(); | ||
| 439 | + // monitor.close(); | ||
| 440 | + listener.stopIndeterminate(); | ||
| 433 | 441 | } | |
| 434 | 442 | } | |
| 435 | 443 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -103,6 +103,15 @@ _ test code folder on android | |||
| 103 | 103 | _ test libraries on android | |
| 104 | 104 | _ test opengl on android | |
| 105 | 105 | ||
| 106 | + ugliness | ||
| 107 | + _ inside AndroidPreprocessor | ||
| 108 | + _ processing.mode.java.JavaBuild.scrubComments(sketch.getCode(0).getProgram()) | ||
| 109 | + _ PApplet.match(scrubbed, processing.mode.java.JavaBuild.SIZE_REGEX); | ||
| 110 | + _ remove PdeKeyListener, roll it into the Java InputHandler for JEditTextArea | ||
| 111 | + _ remove any reference to 'Editor' from Sketch.java | ||
| 112 | + _ or is that excessive, since Document is in there, etc | ||
| 113 | + _ Build does the heavy lifting anyway... | ||
| 114 | + | ||
| 106 | 115 | _ don't make examples read-only | |
| 107 | 116 | _ just do them from psk files | |
| 108 | 117 | ||
@@ -113,11 +122,6 @@ _ make sure that android is working again | |||
| 113 | 122 | _ the build is broken! the build is broken! | |
| 114 | 123 | _ http://code.google.com/p/processing/issues/detail?id=519 | |
| 115 | 124 | ||
| 116 | - _ remove PdeKeyListener, roll it into the Java InputHandler for JEditTextArea | ||
| 117 | - _ remove any reference to 'Editor' from Sketch.java | ||
| 118 | - _ or is that excessive, since Document is in there, etc | ||
| 119 | - _ Build does the heavy lifting anyway... | ||
| 120 | - | ||
| 121 | 125 | _ export is broken in 0192 | |
| 122 | 126 | _ http://code.google.com/p/processing/issues/detail?id=487 | |
| 123 | 127 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments