rewriting event queue setup, changing default imports, general havoc

This commit is contained in:
benfry
2012-11-13 17:26:06 +00:00
parent 4b33f00ecd
commit b415db23e1
12 changed files with 266 additions and 104 deletions

View File

@@ -90,9 +90,10 @@ class AndroidBuild extends JavaBuild {
if (pkg.startsWith("org.json.")) return true;
if (pkg.startsWith("org.w3c.dom.")) return true;
if (pkg.startsWith("org.xml.sax.")) return true;
if (pkg.startsWith("processing.core.")) return true;
if (pkg.startsWith("processing.data.")) return true;
if (pkg.startsWith("processing.event.")) return true;
if (pkg.startsWith("processing.opengl.")) return true;
return false;

View File

@@ -184,6 +184,7 @@ public class AndroidPreprocessor extends PdePreprocessor {
return new String[] {
"processing.core.*",
"processing.data.*",
"processing.event.*",
"processing.opengl.*"
};
}
@@ -191,25 +192,28 @@ public class AndroidPreprocessor extends PdePreprocessor {
@Override
public String[] getDefaultImports() {
final String prefsLine = Preferences.get("android.preproc.imports.list");
final String prefsLine = Preferences.get("android.preproc.imports");
if (prefsLine != null) {
return PApplet.splitTokens(prefsLine, ", ");
}
// The initial values are stored in here for the day when Android
// is broken out as a separate mode.
// In the future, this may include standard classes for phone or
// accelerometer access within the Android APIs. This is currently living
// in code rather than preferences.txt because Android mode needs to
// maintain its independence from the rest of processing.app.
final String[] androidImports = new String[] {
"android.view.MotionEvent", "android.view.KeyEvent",
"android.graphics.Bitmap", //"java.awt.Image",
// "android.view.MotionEvent", "android.view.KeyEvent",
// "android.graphics.Bitmap", //"java.awt.Image",
"java.io.*", // for BufferedReader, InputStream, etc
//"java.net.*", "java.text.*", // leaving otu for now
"java.util.*" // for ArrayList and friends
//"java.util.zip.*", "java.util.regex.*" // not necessary w/ newer i/o
};
Preferences.set("android.preproc.imports.list",
Preferences.set("android.preproc.imports",
PApplet.join(androidImports, ","));
return androidImports;

View File

@@ -521,6 +521,7 @@ public class JavaBuild {
if (pkg.startsWith("processing.core.")) return true;
if (pkg.startsWith("processing.data.")) return true;
if (pkg.startsWith("processing.event.")) return true;
if (pkg.startsWith("processing.opengl.")) return true;
// // ignore core, data, and opengl packages

View File

@@ -924,13 +924,14 @@ public class PdePreprocessor {
return new String[] {
"processing.core.*",
"processing.data.*",
"processing.event.*",
"processing.opengl.*"
};
}
public String[] getDefaultImports() {
// These may change in-between (if the prefs panel adds this option)
String prefsLine = Preferences.get("preproc.imports.list");
String prefsLine = Preferences.get("preproc.imports");
return PApplet.splitTokens(prefsLine, ", ");
}