mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
While changing PdePreprocessor to make it more amenable to unit tests, I discovered a bug in my last fix. This fixes the bug while changing the construction of PdePreprocessor. Now instead of emitting the literal text "public" while walking the tree, I modify the tree to contain the "public" modifier on methods that lack explicit access.
This commit is contained in:
@@ -107,7 +107,8 @@ class Build {
|
||||
|
||||
// grab code from current editing window
|
||||
sketch.prepare();
|
||||
className = sketch.preprocess(buildPath, new Preproc());
|
||||
className = sketch.preprocess(buildPath, new Preproc(buildPath, sketch
|
||||
.getName()));
|
||||
if (className != null) {
|
||||
final File androidXML = new File(androidFolder, "AndroidManifest.xml");
|
||||
writeAndroidManifest(androidXML, sketch.getName(), className);
|
||||
@@ -143,6 +144,9 @@ class Build {
|
||||
} catch (final RunnerException e) {
|
||||
editor.statusError(e);
|
||||
return false;
|
||||
} catch (final IOException e) {
|
||||
editor.statusError(e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -320,6 +324,12 @@ class Build {
|
||||
}
|
||||
|
||||
class Preproc extends PdePreprocessor {
|
||||
|
||||
public Preproc(final String buildPath, final String sketchName)
|
||||
throws IOException {
|
||||
super(buildPath, sketchName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int writeImports(final PrintStream out) {
|
||||
out.println("package " + getPackageName() + ";");
|
||||
|
||||
Reference in New Issue
Block a user