Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331992 - Workspace lock dialog not brought to front
Summary: Workspace lock dialog not brought to front
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 331989 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-07 04:44 EST by Dani Megert CLA
Modified: 2011-03-17 04:40 EDT (History)
4 users (show)

See Also:
curtis.windatt.public: review+


Attachments
Fix (8.50 KB, patch)
2011-03-04 08:18 EST, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2010-12-07 04:44:27 EST
3.6 and latest builds.

1. start with new workspace
2. set Launching preference to always launch the previous one
3. start an Eclipse workbench
4. immediately start a second one
==> 'Workspace Cannot Be Locked' dialog is not brought to front and hence not seen by the user.

NOTE: Sometimes this works.
Comment 1 Markus Keller CLA 2010-12-07 06:31:19 EST
The two dialogs are just looking similar, but they are completely different.

A)
- You quickly launch twice with the same workspace
- When the host Eclipse launches the second runtime instance, the first instance did not yet lock the workspace
=> PDE doesn't detect a conflict
=> The second runtime's launcher shows a dialog "Could not launch the *product* ..."
=> That dialog has the splash screen as parent and does not come to front when you clicked into the host window again after launching

B)
- You only launch the second instance after the first one is up and running
=> PDE detects that the workspace is already in use *before* launching the second instance
=> You get a dialog "Could not launch the *application* ..." with the path to the workspace and (since I20101206-1800) with the Edit... button.

I don't think there's anything to do in the launcher, but PDE could be made smarter: It could fill the gap between launching and the creation of the workspace lock, e.g. by keeping a list of workspaces that have been launched but are not yet locked (and also show the PDE dialog in that case).
Comment 2 Markus Keller CLA 2010-12-07 06:33:15 EST
*** Bug 331989 has been marked as a duplicate of this bug. ***
Comment 3 Markus Keller CLA 2010-12-07 07:00:15 EST
I'll look into this for M5. I guess the changes will be too big to fix it for M4.

The underlying problem is old. Before M4, it was mainly a focus issue for the user, but now it also causes missing functionality (missing Edit... button).
Comment 4 Markus Keller CLA 2010-12-09 12:21:12 EST
Houston, we have a little problem here: PDE JUnit launch configurations have a workspace field, but depending on the Product/Application that is selected on the Main tab, that field is not used at all.

E.g. with Application: "[No Application] - Headless Mode", no workspace is ever created, so showing the dialog just based on conflicting locations in the launch config will actually block test runs that never cause a problem.

A better solution would be to let the launcher detect the conflict but then it shouldn't show a dialog but report the failure back to the host workbench, so we can show the more useful dialog there. Unfortunately, I have no idea how the launcher could be tweaked to not show its dialog.
Comment 5 Markus Keller CLA 2011-03-04 08:18:42 EST
Created attachment 190378 [details]
Fix
Comment 6 Markus Keller CLA 2011-03-04 08:23:16 EST
Curtis, I can release the change in IDEApplication if you release the LaunchListener.
Comment 7 Curtis Windatt CLA 2011-03-04 11:53:56 EST
+1 Applied changes to LaunchListener to HEAD.
Comment 8 Markus Keller CLA 2011-03-04 12:20:03 EST
Thanks, released to HEAD.
Comment 9 Markus Keller CLA 2011-03-06 18:43:56 EST
Raksha, could you please verify this bug during the test pass?
Bug 331989 is your dup.
Comment 10 Raksha Vasisht CLA 2011-03-09 03:20:19 EST
Verified for 3.6 M6 with  I20110307-2110.
Comment 11 Dani Megert CLA 2011-03-17 04:40:59 EDT
Verified in 3.6 M6.