Skip to content

Prompt to save changes when closing Organize Favorites dialog - #2825

Merged
iloveeclipse merged 1 commit into
eclipse-platform:masterfrom
SougandhS:AddClosingPrompt
Aug 4, 2026
Merged

Prompt to save changes when closing Organize Favorites dialog#2825
iloveeclipse merged 1 commit into
eclipse-platform:masterfrom
SougandhS:AddClosingPrompt

Conversation

@SougandhS

Copy link
Copy Markdown
Contributor

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.

Screenshot 2026-07-25 at 6 36 34 PM

@iloveeclipse

Copy link
Copy Markdown
Member

Why not simply save on OK, without dialog?

@SougandhS

SougandhS commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

Why not simply save on OK, without dialog?

it saves on clicking Ok but on accidental ESC press or Cancel click it simply closes without saving, so added for those cases.

@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   58m 12s ⏱️ -2s
 4 703 tests ±0   4 681 ✅ +1   22 💤 ±0  0 ❌  - 1 
12 003 runs  ±0  11 850 ✅ +1  153 💤 ±0  0 ❌  - 1 

Results for commit 3e2086e. ± Comparison against base commit 7beef1c.

♻️ This comment has been updated with latest results.

@SougandhS
SougandhS force-pushed the AddClosingPrompt branch 2 times, most recently from 7f27314 to 96dae57 Compare August 3, 2026 01:26
@SougandhS

Copy link
Copy Markdown
Contributor Author

Hi @iloveeclipse,
build looks good, can this be merged ?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@SougandhS

Copy link
Copy Markdown
Contributor Author

Hi @iloveeclipse,
if no other changes are required, can this be merged ?

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.
@iloveeclipse
iloveeclipse merged commit 1ab1f7e into eclipse-platform:master Aug 4, 2026
18 checks passed
@iloveeclipse

Copy link
Copy Markdown
Member

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants