mirror of
https://github.com/processing/processing4.git
synced 2026-02-02 13:21:07 +01:00
getting kjc to work, adding python support files
This commit is contained in:
@@ -59,18 +59,22 @@ public class PdeApplet extends Applet
|
||||
//System.err.println("editor dammit");
|
||||
//System.exit(0);
|
||||
boolean beautify = false;
|
||||
boolean convertSemicolons = false;
|
||||
String program = get("program");
|
||||
if (program != null) {
|
||||
program = readFile(program);
|
||||
} else {
|
||||
program = get("inline_program");
|
||||
program = get("inline_program");
|
||||
convertSemicolons = true;
|
||||
}
|
||||
if (program != null) {
|
||||
// don't beautify if it's java code
|
||||
if (program.indexOf("extends PdePlayer") == -1) {
|
||||
// don't convert ; to \n if scheme
|
||||
if (program.charAt(0) != ';') {
|
||||
program = program.replace(';', '\n');
|
||||
if (convertSemicolons) {
|
||||
program = program.replace(';', '\n');
|
||||
}
|
||||
// not scheme, but don't beautify if it's python
|
||||
if (program.charAt(0) != '#')
|
||||
beautify = true;
|
||||
|
||||
Reference in New Issue
Block a user