@@ -563,10 +563,10 @@ protected void storeSketches() {
563
563
String untitledPath = untitledFolder .getAbsolutePath ();
564
564
565
565
// Save the sketch path and window placement for each open sketch
566
- LinkedList <Editor > reverseEditors = new LinkedList <Editor >(editors );
567
- Collections .reverse (reverseEditors );
566
+ List <Editor > reversedEditors = new LinkedList <Editor >(editors );
567
+ Collections .reverse (reversedEditors );
568
568
int index = 0 ;
569
- for (Editor editor : reverseEditors ) {
569
+ for (Editor editor : reversedEditors ) {
570
570
String path = editor .getSketch ().getMainFilePath ();
571
571
// In case of a crash, save untitled sketches if they contain changes.
572
572
// (Added this for release 0158, may not be a good idea.)
@@ -575,9 +575,9 @@ protected void storeSketches() {
575
575
}
576
576
PreferencesData .set ("last.sketch" + index + ".path" , path );
577
577
578
- int [] location = editor .getPlacement ();
579
- String locationStr = PApplet .join (PApplet .str (location ), "," );
580
- PreferencesData .set ("last.sketch" + index + ".location" , locationStr );
578
+ int [] placement = editor .getPlacement ();
579
+ String location = PApplet .join (PApplet .str (placement ), "," );
580
+ PreferencesData .set ("last.sketch" + index + ".location" , location );
581
581
index ++;
582
582
}
583
583
PreferencesData .setInteger ("last.sketch.count" , index );
@@ -896,12 +896,7 @@ protected Editor handleOpen(File file, int[] storedLocation, int[] defaultLocati
896
896
// now that we're ready, show the window
897
897
// (don't do earlier, cuz we might move it based on a window being closed)
898
898
if (showEditor ) {
899
- SwingUtilities .invokeLater (new Runnable () {
900
- @ Override
901
- public void run () {
902
- editor .setVisible (true );
903
- }
904
- });
899
+ SwingUtilities .invokeLater (() -> editor .setVisible (true ));
905
900
}
906
901
907
902
return editor ;
0 commit comments