mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 10:30:44 +01:00
more bug fixing
This commit is contained in:
@@ -47,7 +47,6 @@ public class JavaBuild {
|
||||
public static final String PACKAGE_REGEX =
|
||||
"(?:^|\\s|;)package\\s+(\\S+)\\;";
|
||||
|
||||
// Editor editor;
|
||||
protected Sketch sketch;
|
||||
|
||||
// what happens in the build, stays in the build.
|
||||
@@ -137,11 +136,7 @@ public class JavaBuild {
|
||||
* @throws RunnerException
|
||||
*/
|
||||
public String build() throws SketchException {
|
||||
srcFolder = sketch.makeTempFolder();
|
||||
binFolder = sketch.makeTempFolder();
|
||||
// System.out.println("src: " + srcFolder);
|
||||
// System.out.println("bin: " + binFolder);
|
||||
return build(srcFolder, binFolder);
|
||||
return build(sketch.makeTempFolder(), sketch.makeTempFolder());
|
||||
}
|
||||
|
||||
|
||||
@@ -155,6 +150,12 @@ public class JavaBuild {
|
||||
* @return null if compilation failed, main class name if not
|
||||
*/
|
||||
public String build(File srcFolder, File binFolder) throws SketchException {
|
||||
this.srcFolder = srcFolder;
|
||||
this.binFolder = binFolder;
|
||||
|
||||
Base.openFolder(srcFolder);
|
||||
Base.openFolder(binFolder);
|
||||
|
||||
// run the preprocessor
|
||||
String classNameFound = preprocess(srcFolder);
|
||||
|
||||
@@ -215,7 +216,7 @@ public class JavaBuild {
|
||||
sketch.ensureExistence();
|
||||
|
||||
// System.out.println("srcFolder is " + srcFolder);
|
||||
classPath = srcFolder.getAbsolutePath();
|
||||
classPath = binFolder.getAbsolutePath();
|
||||
|
||||
// figure out the contents of the code folder to see if there
|
||||
// are files that need to be added to the imports
|
||||
|
||||
@@ -164,7 +164,6 @@ public class JavaMode extends Mode {
|
||||
|
||||
/**
|
||||
* Implements Sketch → Run.
|
||||
* @param present Set true to run in full screen (present mode).
|
||||
* @throws SketchException
|
||||
*/
|
||||
public void handleRun(Sketch sketch, RunnerListener listener) throws SketchException {
|
||||
|
||||
@@ -67,12 +67,12 @@ public class JavaToolbar extends EditorToolbar {
|
||||
|
||||
static public String getTitle(int index, boolean shift) {
|
||||
switch (index) {
|
||||
case RUN: return shift ? "Run" : "Present";
|
||||
case RUN: return !shift ? "Run" : "Present";
|
||||
case STOP: return "Stop";
|
||||
case NEW: return shift ? "New" : "New Editor Window";
|
||||
case OPEN: return shift ? "Open" : "Open in Another Window";
|
||||
case NEW: return !shift ? "New" : "New Editor Window";
|
||||
case OPEN: return !shift ? "Open" : "Open in Another Window";
|
||||
case SAVE: return "Save";
|
||||
case EXPORT: return shift ? "Export Applet" : "Export Application";
|
||||
case EXPORT: return !shift ? "Export Applet" : "Export Application";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ public class Runner implements MessageConsumer {
|
||||
String outgoing[] = new String[params.size()];
|
||||
params.toArray(outgoing);
|
||||
|
||||
//PApplet.println(outgoing);
|
||||
// PApplet.println(outgoing);
|
||||
// PApplet.println(PApplet.split(outgoing[0], ":"));
|
||||
// PApplet.println();
|
||||
// PApplet.println("class path");
|
||||
|
||||
Reference in New Issue
Block a user