Exit dialog window - #9652
Open
TheProjectDark wants to merge 6 commits into
Open
Exit dialog window#9652TheProjectDark wants to merge 6 commits into
TheProjectDark wants to merge 6 commits into
Conversation
neilcsmith-net
requested changes
Oct 2, 2026
neilcsmith-net
left a comment
Member
There was a problem hiding this comment.
Thanks for looking at this. I hit this issue sometimes with a dual monitor setup when the close icon is right next to something I'm trying to click on the other screen! 😄
Couple of changes that are not related need looking at, and I'm not sure why we need the Save All option?
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Description
I was reviewing code in NetBeans and often miss-clicked cmd+q instead of pressing cmd+a, and it was so annoying to wait until the IDE re-launches so I just implemented exit dialog window like in Firefox or JetBrains.
Implementation
The exit flow is centralized in ExitDialog.showDialog(), which is already called during shutdown. It checks for open unsaved files first: if there are any, NetBeans shows its existing save/discard dialog. If there are none, it checks the new preference and, when enabled, shows Exit, Save All and Exit, and Cancel. Choosing Save All calls LifecycleManager.saveAll() before allowing shutdown; Cancel keeps the IDE open.
The checkbox is in Tools > Options > General. The panel loads its value when the options page opens, detects changes so Apply is enabled when appropriate, and saves the preference when settings are applied. The preference is stored with NetBeans’ user settings and defaults to enabled. Cmd+Q and Ctrl+F4 reach the same shutdown flow through their respective platform handlers/keymap bindings.
Screenshots
Assisted by: GitHub Copilot to navigate through project's structure
^Add meaningful description above
Click to collapse/expand PR instructions
By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -
LLMs, Commit messages and PR description:
git log) that all commits have a valid name and email address for you in the Author field.Assisted-by: MODEL_NAME MODEL_VERSIONline appended to the commit message.Assisted-byline from above)If you're a first time contributor, see the Contributing guidelines for more information.
If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.
PR approval and merge checklist:
If this PR targets the delivery branch: don't merge. (full wiki article)