Skip to content

Fix broken launch config dialog UI after unsaved-changes prompt on macOS - #3003

Open
SougandhS wants to merge 1 commit into
eclipse-platform:masterfrom
SougandhS:FIxLaunchDial
Open

SougandhS wants to merge 1 commit into
eclipse-platform:masterfrom
SougandhS:FIxLaunchDial

Conversation

@SougandhS

Copy link
Copy Markdown
Contributor

On macOS the tree selects on mouse down, and opening the modal "unsaved changes" prompt at that point corrupts the tree. Skip selection changes while the mouse is pressed and handle them on release.

Before :

Screen.Recording.2026-10-09.at.10.52.07.AM.mov

After :

Screen.Recording.2026-10-09.at.10.52.58.AM.mov

Fixes eclipse-jdt/eclipse.jdt.debug#909

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   36m 20s ⏱️ + 4m 11s
 5 029 tests ±0   5 007 ✅ ±0   22 💤 ±0  0 ❌ ±0 
12 978 runs  ±0  12 824 ✅ ±0  154 💤 ±0  0 ❌ ±0 

Results for commit 3055947. ± Comparison against base commit 68420ce.

♻️ This comment has been updated with latest results.

@SougandhS
SougandhS force-pushed the FIxLaunchDial branch 2 times, most recently from a94b671 to 55e562f Compare October 11, 2026 17:02

@merks merks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I’m looking on my phone. I likely can and a better job on a bigger screen.

@SougandhS
SougandhS force-pushed the FIxLaunchDial branch 2 times, most recently from 0ead9cb to 5a30600 Compare October 11, 2026 17:45
@SougandhS
SougandhS requested a review from merks October 13, 2026 01:07
@SougandhS
SougandhS force-pushed the FIxLaunchDial branch 2 times, most recently from fa06f47 to a8fa439 Compare October 15, 2026 07:44
@SougandhS

Copy link
Copy Markdown
Contributor Author

Just rebased on master 👍 ..

@SougandhS

Copy link
Copy Markdown
Contributor Author

Hi @merks, could you please re-check this PR ?

@merks merks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks okay. I haven't tested though...

@merks
merks requested a review from iloveeclipse October 18, 2026 11:11
@SougandhS

Copy link
Copy Markdown
Contributor Author

Hi @iloveeclipse, can you have a look at this ?

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.

🟡 Changes recommended

After a tree click, listenerAction overwrites the MouseUp handler’s reset of fTreeMouseDown. A subsequent keyboard selection change with unsaved edits therefore queues the prompt instead of displaying it, waiting for another mouse event while further selection changes are ignored.

1 open issue
What changed in this PR

Updates Eclipse’s launch configuration dialog to address macOS tree corruption when switching configurations with unsaved edits, targeting eclipse-jdt/eclipse.jdt.debug#909.

Changes:

  • Defers mouse-triggered confirmation prompts until mouse release.
  • Extracts save/discard/cancel handling and guards against selection changes while prompting.
File Description
debug/​org.eclipse.debug.ui/​ui/​org/​eclipse/​debug/​internal/​ui/​launchConfigurations/​LaunchConfigurationsDialog.java Adds mouse-state tracking, deferred prompts, and guarded input switching.

Review effort: Balanced

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.

🟡 Changes recommended

Changing the tree selection while the prompt waits for mouse-up can leave it using a stale selection, so saving or discarding may display and launch a configuration other than the one currently selected. Separately, after a missed mouse release, the next mouse-down can queue the prompt before the button is released, potentially reintroducing the macOS corruption this change addresses.

2 open issues
1 resolved since last review

Review effort: Balanced

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.

🔵 Needs a closer look

The fix depends on native SWT mouse/selection event ordering and modal event-loop behavior on macOS, which could not be validated here. Human macOS UI verification remains needed for Save/Don’t Save/Cancel, keyboard selection and navigation, context menus, double-click launch, and releasing the mouse outside the tree.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@SougandhS

Copy link
Copy Markdown
Contributor Author

Human macOS UI verification remains needed

Tested 👍

On macOS the tree selects on mouse down, and opening the modal "unsaved
changes" prompt at that point corrupts the tree. Skip selection changes
while the mouse is pressed and handle them on release.

Fixes eclipse-jdt/eclipse.jdt.debug#909
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.

editing env vars in launch configs causes UI issues

3 participants