Prompt to save changes when closing Organize Favorites dialog - #2825
Open
SougandhS wants to merge 1 commit into
Open
Prompt to save changes when closing Organize Favorites dialog#2825SougandhS wants to merge 1 commit into
SougandhS wants to merge 1 commit into
Conversation
Member
|
Why not simply save on OK, without dialog? |
Contributor
Author
it saves on clicking |
Contributor
SougandhS
force-pushed
the
AddClosingPrompt
branch
from
August 2, 2026 04:26
7f6991d to
7f27314
Compare
Prompt users to save changes before closing the Organize Favorites dialog when the favorites list has been modified. This prevents accidentally losing changes made to the favorites list when the dialog is closed without pressing OK.
SougandhS
force-pushed
the
AddClosingPrompt
branch
from
August 3, 2026 01:26
7f27314 to
96dae57
Compare
Contributor
Author
|
Hi @iloveeclipse, |
There was a problem hiding this comment.
Pull request overview
Adds a save-confirmation flow to the Debug UI “Organize Favorites” dialog so users are prompted to save when closing the dialog with unsaved changes, reducing accidental loss of edits to the favorites list.
Changes:
- Added new externalized UI strings for a “save changes before closing” prompt.
- Added “dirty” detection and close-interception logic in
FavoritesDialog(Cancel and window-close paths). - Minor refactor in favorites-saving code (iterator → enhanced for-loop).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties | Adds externalized strings for the new close/save prompt. |
| debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java | Declares new NLS message fields for the added prompt strings. |
| debug/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java | Implements dirty tracking and prompts on Cancel / shell-close; minor loop refactor in saving logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+195
to
+210
| MessageDialog dialog = new MessageDialog(getShell(), | ||
| LaunchConfigurationsMessages.FavoritesDialogPromptOnCloseTitle, null, | ||
| LaunchConfigurationsMessages.FavoritesDialogPromptOnClose, MessageDialog.QUESTION, | ||
| new String[] { LaunchConfigurationsMessages.FavoritesDialogPromptOnCloseSaveButton, | ||
| IDialogConstants.CANCEL_LABEL }, | ||
| 0); | ||
|
|
||
| int option = dialog.open(); | ||
| if (option == Window.OK) { | ||
| saveFavorites(); | ||
| return true; | ||
| } | ||
| if (option == Window.CANCEL) { | ||
| return true; | ||
| } | ||
| return false; |
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.
Prompt users to save changes before closing the Organize Favorites dialog when the favorites list has been modified. This prevents accidentally losing changes made to the favorites list when the dialog is closed without pressing OK.