Skip to content

Commit 3de3f9a

Browse files
committed
Small cosmetics
1 parent c71004f commit 3de3f9a

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

app/src/processing/app/Base.java

+7-12
Original file line numberDiff line numberDiff line change
@@ -563,10 +563,10 @@ protected void storeSketches() {
563563
String untitledPath = untitledFolder.getAbsolutePath();
564564

565565
// 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);
568568
int index = 0;
569-
for (Editor editor : reverseEditors) {
569+
for (Editor editor : reversedEditors) {
570570
String path = editor.getSketch().getMainFilePath();
571571
// In case of a crash, save untitled sketches if they contain changes.
572572
// (Added this for release 0158, may not be a good idea.)
@@ -575,9 +575,9 @@ protected void storeSketches() {
575575
}
576576
PreferencesData.set("last.sketch" + index + ".path", path);
577577

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);
581581
index++;
582582
}
583583
PreferencesData.setInteger("last.sketch.count", index);
@@ -896,12 +896,7 @@ protected Editor handleOpen(File file, int[] storedLocation, int[] defaultLocati
896896
// now that we're ready, show the window
897897
// (don't do earlier, cuz we might move it based on a window being closed)
898898
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));
905900
}
906901

907902
return editor;

0 commit comments

Comments
 (0)