mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 17:40:48 +01:00
further working on clearing up compile errors
This commit is contained in:
@@ -57,11 +57,11 @@ public class PdePreprocessor {
|
||||
*/
|
||||
public PdePreprocessor() {
|
||||
defaultImports[JDK11] =
|
||||
BApplet.splitStrings(PdePreferences.get("compiler.imports.jdk11"), ',');
|
||||
BApplet.split(PdePreferences.get("compiler.imports.jdk11"), ',');
|
||||
defaultImports[JDK13] =
|
||||
BApplet.splitStrings(PdePreferences.get("compiler.imports.jdk13"), ',');
|
||||
BApplet.split(PdePreferences.get("compiler.imports.jdk13"), ',');
|
||||
defaultImports[JDK14] =
|
||||
BApplet.splitStrings(PdePreferences.get("compiler.imports.jdk14"), ',');
|
||||
BApplet.split(PdePreferences.get("compiler.imports.jdk14"), ',');
|
||||
}
|
||||
|
||||
|
||||
@@ -105,13 +105,14 @@ public class PdePreprocessor {
|
||||
p2[index++] = 'u';
|
||||
char str[] = Integer.toHexString(c).toCharArray();
|
||||
// add leading zeros, so that the length is 4
|
||||
for (int i = 0; i < 4 - str.length; i++) p2[index++] = '0';
|
||||
//for (int i = 0; i < 4 - str.length; i++) p2[index++] = '0';
|
||||
for (int m = 0; m < 4 - str.length; m++) p2[index++] = '0';
|
||||
System.arraycopy(str, 0, p2, index, str.length);
|
||||
index += str.length;
|
||||
}
|
||||
}
|
||||
program = new String(p2, 0, index);
|
||||
}
|
||||
program = new String(p2, 0, index);
|
||||
}
|
||||
|
||||
// do this after the program gets re-combobulated
|
||||
|
||||
@@ -80,7 +80,7 @@ public class PdeRuntime implements PdeMessageConsumer {
|
||||
// using something like --external=e30,20 where the e stands for
|
||||
// exact. otherwise --external=x,y for just the regular positioning.
|
||||
String location = (windowLocation != null) ?
|
||||
(BApplet.EXACT_LOCATION +
|
||||
(BApplet.EXTERNAL_EXACT_LOCATION +
|
||||
windowLocation.x + "," + windowLocation.y) :
|
||||
(x1 + "," + y1);
|
||||
|
||||
@@ -100,7 +100,8 @@ public class PdeRuntime implements PdeMessageConsumer {
|
||||
processOutput = process.getOutputStream();
|
||||
|
||||
} else {
|
||||
Class c = Class.forName(className);
|
||||
//Class c = Class.forName(className);
|
||||
Class c = Class.forName(sketch.mainClassName);
|
||||
applet = (BApplet) c.newInstance();
|
||||
|
||||
// replaces setRuntime with BApplet having leechErr [fry]
|
||||
|
||||
@@ -697,7 +697,7 @@ public class PdeSketch {
|
||||
|
||||
boolean writeHtml = true;
|
||||
if (appletDir.exists()) {
|
||||
File htmlFile = new new File(appletDir, "index.html");
|
||||
File htmlFile = new File(appletDir, "index.html");
|
||||
if (htmlFile.exists() && !replaceHtml) {
|
||||
writeHtml = false;
|
||||
}
|
||||
|
||||
@@ -240,7 +240,8 @@ public class PdeSketchbook {
|
||||
menu.removeAll();
|
||||
|
||||
try {
|
||||
addSketches(menu, sketchbookFolder);
|
||||
//addSketches(menu, new File(PdePreferences.get("sketchbook.path")));
|
||||
addSketches(menu, new File(PdePreferences.get("sketchbook.path")));
|
||||
menu.addSeparator();
|
||||
addSketches(menu, examplesFolder);
|
||||
|
||||
@@ -255,7 +256,7 @@ public class PdeSketchbook {
|
||||
}
|
||||
|
||||
|
||||
protected boolean addSketches(File folder) throws IOException {
|
||||
protected boolean addSketches(JMenu menu, File folder) throws IOException {
|
||||
// skip .DS_Store files, etc
|
||||
if (!folder.isDirectory()) return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user