diff --git a/app/src/processing/app/Mode.java b/app/src/processing/app/Mode.java index dc609ae81..741474606 100644 --- a/app/src/processing/app/Mode.java +++ b/app/src/processing/app/Mode.java @@ -1046,6 +1046,18 @@ public abstract class Mode { abstract public String getDefaultExtension(); + /** + * Returns the appropriate file extension to use for auxilliary source files in a sketch. + * For example, in a Java-mode sketch, auxilliary files should be name "Foo.java"; in + * Python mode, they should be named "foo.py". + * + *

Modes that do not override this function will get the default behavior of returning the + * default extension. + */ + public String getModuleExtension() { + return getDefaultExtension(); + } + /** * Returns a String[] array of proper extensions. diff --git a/app/src/processing/app/Sketch.java b/app/src/processing/app/Sketch.java index 198eadeec..20e96b56e 100644 --- a/app/src/processing/app/Sketch.java +++ b/app/src/processing/app/Sketch.java @@ -333,9 +333,6 @@ public class Sketch { /** * This is called upon return from entering a new file name. * (that is, from either newCode or renameCode after the prompt) - * This code is almost identical for both the newCode and renameCode - * cases, so they're kept merged except for right in the middle - * where they diverge. */ protected void nameCode(String newName) { newName = newName.trim(); @@ -348,7 +345,7 @@ public class Sketch { // Add the extension here, this simplifies some of the logic below. if (newName.indexOf('.') == -1) { - newName += "." + mode.getDefaultExtension(); + newName += "." + (renamingCode ? mode.getDefaultExtension() : mode.getModuleExtension()); } // if renaming to the same thing as before, just ignore. diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index 304242672..d0d06dd06 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -1,4 +1,4 @@ -PROCESSING 2.1.2 (REV 0225) - 11 April 2014 +PROCESSING 2.1.2 (REV 0225) - 15 April 2014 Lots of small bug fixes plus some additional changes to support the new Python Mode, coming soon: https://github.com/jdf/processing.py @@ -6,6 +6,11 @@ the new Python Mode, coming soon: https://github.com/jdf/processing.py [ the pde ] ++ The PDE was using 15% of CPU while just sitting idle. Thanks to + David Fokkema for the fix (and pull request). + https://github.com/processing/processing/issues/1561 + https://github.com/processing/processing/pull/2451 + + Fix exception caused by Runner when it can't find location https://github.com/processing/processing/issues/2346 https://github.com/processing/processing/pull/2359 @@ -22,6 +27,9 @@ the new Python Mode, coming soon: https://github.com/jdf/processing.py + Remove some hardcoding for .pde as extension https://github.com/processing/processing/issues/2420 ++ Update code signing for Processing.app for Mavericks changes + https://github.com/processing/processing/issues/2453 + [ the core ] diff --git a/todo.txt b/todo.txt index d8d7f630b..f4cf7a868 100644 --- a/todo.txt +++ b/todo.txt @@ -18,6 +18,8 @@ X https://github.com/processing/processing/issues/2453 o use --deep for codesign to work? (nope) o http://furbo.org/2013/10/17/code-signing-and-mavericks/ o http://brockerhoff.net/RB/AppCheckerLite/ +J permit modes to specify alternate extension (.py for .pyde stuff) +J https://github.com/processing/processing/pull/2452 high