mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 02:20:45 +01:00
get core loading properly on Windows, change displays to be numbered at 0
This commit is contained in:
@@ -45,7 +45,7 @@ public class JavaMode extends Mode {
|
||||
// found in the sketchbook)
|
||||
// static public String librariesClassPath;
|
||||
|
||||
|
||||
|
||||
public Editor createEditor(Base base, String path, EditorState state) {
|
||||
return new JavaEditor(base, path, state, this);
|
||||
}
|
||||
@@ -60,7 +60,7 @@ public class JavaMode extends Mode {
|
||||
Base.showError("Problem loading keywords",
|
||||
"Could not load keywords.txt, please re-install Processing.", e);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
item = newJMenuItem("Export", 'E');
|
||||
if (editor != null) {
|
||||
@@ -116,7 +116,7 @@ public class JavaMode extends Mode {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getTitle() {
|
||||
return "Standard";
|
||||
}
|
||||
@@ -126,50 +126,50 @@ public class JavaMode extends Mode {
|
||||
// return new Toolbar(editor);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// public Formatter createFormatter() {
|
||||
// return new AutoFormat();
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
// public Editor createEditor(Base ibase, String path, int[] location) {
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
public File[] getExampleCategoryFolders() {
|
||||
// Basics, Topics, OpenGL, Books
|
||||
return new File[] {
|
||||
return new File[] {
|
||||
new File(examplesFolder, "Basics"),
|
||||
new File(examplesFolder, "Topics"),
|
||||
new File(examplesFolder, "OpenGL"),
|
||||
new File(examplesFolder, "Books")
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getDefaultExtension() {
|
||||
return "pde";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public String[] getExtensions() {
|
||||
return new String[] { "pde", "java" };
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String[] getIgnorable() {
|
||||
return new String[] {
|
||||
return new String[] {
|
||||
"applet",
|
||||
"application.macosx",
|
||||
"application.windows",
|
||||
"application.linux"
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Library getCoreLibrary() {
|
||||
if (coreLibrary == null) {
|
||||
File coreFolder = Base.getContentFile("core");
|
||||
@@ -177,11 +177,11 @@ public class JavaMode extends Mode {
|
||||
}
|
||||
return coreLibrary;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
|
||||
public Runner handleRun(Sketch sketch, RunnerListener listener) throws SketchException {
|
||||
JavaBuild build = new JavaBuild(sketch);
|
||||
String appletClassName = build.build(false);
|
||||
@@ -208,7 +208,7 @@ public class JavaMode extends Mode {
|
||||
runtime.launch(true);
|
||||
}
|
||||
}).start();
|
||||
return runtime;
|
||||
return runtime;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -220,14 +220,14 @@ public class JavaMode extends Mode {
|
||||
// runtime = null; // will this help?
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
// public boolean handleExportApplet(Sketch sketch) throws SketchException, IOException {
|
||||
// JavaBuild build = new JavaBuild(sketch);
|
||||
// return build.exportApplet();
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean handleExportApplication(Sketch sketch) throws SketchException, IOException {
|
||||
JavaBuild build = new JavaBuild(sketch);
|
||||
return build.exportApplication();
|
||||
|
||||
@@ -220,8 +220,8 @@ public class Runner implements MessageConsumer {
|
||||
} else {
|
||||
params.add("processing.core.PApplet");
|
||||
|
||||
// get the stored device index (starts at 1)
|
||||
int runDisplay = Preferences.getInteger("run.display") - 1;
|
||||
// get the stored device index (starts at 0)
|
||||
int runDisplay = Preferences.getInteger("run.display");
|
||||
|
||||
// If there was a saved location (this guy has been run more than once)
|
||||
// then the location will be set to the last position of the sketch window.
|
||||
|
||||
Reference in New Issue
Block a user