@@ -70,6 +70,7 @@ public class Sketch {
7070
7171 private SketchCode current ;
7272 private int currentIndex ;
73+
7374 /**
7475 * Number of sketchCode objects (tabs) in the current sketch. Note that this
7576 * will be the same as code.length, because the getCode() method returns
@@ -83,28 +84,6 @@ public class Sketch {
8384 /** Moved out of Editor and into here for cleaner access. */
8485 private boolean untitled ;
8586
86- // /** Class path determined during build. */
87- // private String classPath;
88- //
89- // /**
90- // * This is *not* the "Processing" libraries path, this is the Java libraries
91- // * path, as in java.library.path=BlahBlah, which identifies search paths for
92- // * DLLs or JNILIBs. (It's Java's LD_LIBRARY_PATH, for you UNIX fans.)
93- // */
94- // private String javaLibraryPath;
95- //
96- // /**
97- // * List of library folders, set up in the preprocess() method.
98- // */
99- // private ArrayList<Library> importedLibraries;
100- // //private ArrayList<File> importedLibraries;
101-
102- /**
103- * Most recent, default build path. This will contain the .java files that
104- * have been preprocessed, as well as any .class files that were compiled.
105- */
106- // private File buildFolder;
107-
10887
10988 /**
11089 * Used by the command-line version to create a sketch object.
@@ -336,10 +315,10 @@ public void handleRenameCode() {
336315 // TODO maybe just popup a text area?
337316 renamingCode = true ;
338317 String prompt = (currentIndex == 0 ) ?
339- Language .text ("editor.sketch.rename.description" ) : Language .text ("editor.tab.rename.description" );
318+ Language .text ("editor.sketch.rename.description" ) :
319+ Language .text ("editor.tab.rename.description" );
340320 String oldName = (current .isExtension (mode .getDefaultExtension ())) ?
341321 current .getPrettyName () : current .getFileName ();
342- // editor.status.edit(prompt, oldName);
343322 promptForTabName (prompt + ":" , oldName );
344323 }
345324
@@ -788,8 +767,10 @@ public boolean save() throws IOException {
788767 if (!saveAs ()) return false ;
789768 }
790769
791- for (int i = 0 ; i < codeCount ; i ++) {
792- if (code [i ].isModified ()) code [i ].save ();
770+ for (SketchCode sc : code ) {
771+ if (sc .isModified ()) {
772+ sc .save ();
773+ }
793774 }
794775 calcModified ();
795776 return true ;
0 commit comments