MCPcopy Index your code
hub / github.com/benfry/processing4 / handleLaunch

Method handleLaunch

java/src/processing/mode/java/JavaMode.java:104–122  ·  view source on GitHub ↗

Handles the standard Java "Run" or "Present"

(Sketch sketch, RunnerListener listener,
                             final boolean present)

Source from the content-addressed store, hash-verified

102
103 /** Handles the standard Java "Run" or "Present" */
104 public Runner handleLaunch(Sketch sketch, RunnerListener listener,
105 final boolean present) throws SketchException {
106 JavaBuild build = new JavaBuild(sketch);
107// String appletClassName = build.build(false);
108 String appletClassName = build.build(true);
109 if (appletClassName != null) {
110 final Runner runtime = new Runner(build, listener);
111 new Thread(() -> {
112 // these block until finished
113 if (present) {
114 runtime.present(null);
115 } else {
116 runtime.launch(null);
117 }
118 }).start();
119 return runtime;
120 }
121 return null;
122 }
123
124
125 /** Start a sketch in tweak mode */

Callers

nothing calls this directly

Calls 4

buildMethod · 0.95
presentMethod · 0.95
launchMethod · 0.95
startMethod · 0.45

Tested by

no test coverage detected