Restore last sketch feature - autosave and reopen last sketch #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature: Restore Last Sketch on Startup
This pull request implements a usability enhancement for the Processing IDE: automatically reopening the last sketch that was open when the program was last closed.
Description
When the IDE is launched, it checks the preferences file for a saved last.sketch.path. If found and valid, it restores and opens that sketch instead of starting with a blank/new one. This mimics the behavior of many modern IDEs and improves the developer experience.
Key Changes
Added logic to Base.java to read and validate the last sketch path on startup.
Updated handleOpen() to save the current sketch path to preferences upon opening.
Added debug logs to assist with troubleshooting.
Why This Matters
I believe this feature aligns with how most users expect their development tools to behave. By preserving context between sessions, it improves workflow continuity and reduces friction when working on ongoing projects.
Notes
This was developed independently in my fork since the upstream issue has not yet been assigned.
The original issue for this enhancement can be found here: #1132