Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318593 - Select Variable dialog goes in wait when clicking on the 'Edit Variables' button in the Select Variable dialog from Preferences
Summary: Select Variable dialog goes in wait when clicking on the 'Edit Variables' bu...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 major with 1 vote (vote)
Target Milestone: 3.7 M1   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-01 08:50 EDT by Abhishek CLA
Modified: 2011-05-26 14:52 EDT (History)
4 users (show)

See Also:


Attachments
Select variable dialog box hangs (142.88 KB, image/png)
2010-07-01 08:53 EDT, Abhishek CLA
no flags Details
patch (2.32 KB, patch)
2010-07-26 14:27 EDT, Darin Wright CLA
no flags Details | Diff
patch (6.31 KB, patch)
2010-07-27 15:15 EDT, Darin Wright CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Abhishek CLA 2010-07-01 08:50:20 EDT
Build Identifier: 3.4.2

Overview:  Select Variable dialog goes in wait when clicking on the 'Edit Variables' button in the Select Variable dialog from Preferences


Reproducible: Always

Steps to Reproduce:

1. Open Eclipse, and Click 'Window' -> 'Preferences'
2. Expand 'General' -> 'Editors' -> 'Text Editors' and click on 'Spelling'
3. Click on 'Variables ' button
4. Select a variable and click the 'Edit Variables...' button

Actual Result:
Select Variable dialog goes in wait when clicking the 'Edit Variable...' button.

Expected Result:
User can invoke the Edit Variables dialog. Correct Product Functioning is
expected.
Comment 1 Abhishek CLA 2010-07-01 08:53:25 EDT
Created attachment 173213 [details]
Select variable dialog box hangs

Select variable dialog box hangs..
Comment 2 Olivier Thomann CLA 2010-07-01 09:35:10 EDT
Move to JDT/Text
Comment 3 Dani Megert CLA 2010-07-02 02:14:26 EDT
Can reproduce using 3.6 and latest 3.7 builds.

>Select variable dialog box hangs..
It doesn't hang: you can hit 'Cancel' to abort.

Bug is in org.eclipse.debug.ui.StringVariableSelectionDialog.editVariables()
Comment 4 Abhishek CLA 2010-07-02 02:30:00 EDT
Dani, Yes you can click cancel to abort but still this 'Edit Variables' is broken  and it gives a impression as if window has hanged..
Comment 5 Dani Megert CLA 2010-07-02 02:34:59 EDT
(In reply to comment #4)
> Dani, Yes you can click cancel to abort but still this 'Edit Variables' is
> broken  and it gives a impression as if window has hanged..
Yes, I agree that it's a major bug since the user might not even try to cancel.
Comment 6 Darin Wright CLA 2010-07-05 11:38:26 EDT
Marking as 3.6.1 candidate
Comment 7 Darin Wright CLA 2010-07-26 14:24:33 EDT
Moving to 3.7, this is not a regression - same problem existed in 3.5.
Comment 8 Darin Wright CLA 2010-07-26 14:27:24 EDT
Created attachment 175255 [details]
patch

This patch does not add the "Edit Variables" button when the parenting shell is the preference dialog.

Dani, do you think this is a reasonable approach? or would it be better to add API to the dialog to programmatically hide the edit button? (I'm not sure if this is a sure fire way of detecting the preference dialog is open - for example, it could be broken when the preference dialog is open but not the immediate parent).
Comment 9 Dani Megert CLA 2010-07-27 09:42:55 EDT
Not showing the button is good enough for me but the code you use is not safe. Theoretically, someone can open many PreferenceDialog/s on different shells. What you really want to check is whether the PreferenceUtil returns a preference dialog that has the same parent. You can then call open() on it if the button gets pressed.
Comment 10 Darin Wright CLA 2010-07-27 15:15:03 EDT
Created attachment 175345 [details]
patch

Updated patch. Opens a new preference dialog rather than re-using.
Comment 11 Darin Wright CLA 2010-07-27 15:22:07 EDT
Fixed.
Comment 12 Dani Megert CLA 2010-07-27 15:39:30 EDT
>Updated patch. Opens a new preference dialog rather than re-using.
So, you chose the hard way ;-)
Comment 13 Darin Wright CLA 2010-07-27 15:43:04 EDT
(In reply to comment #12)
> >Updated patch. Opens a new preference dialog rather than re-using.
> So, you chose the hard way ;-)

Sort of.. the problem was that the PreferenceUtil method to create a preference dialog modifies the page the existing dialog is on before calling open()... so I could not find a clean way to tell if the existing dialog was parented by a preference dialog to hide the button...

However, it works.
Comment 14 Dani Megert CLA 2010-07-28 01:22:51 EDT
>PreferenceUtil method to create a preference
>dialog modifies the page the existing dialog is on before calling open
Ugly.
Comment 15 Darin Wright CLA 2010-08-03 14:37:35 EDT
Verified.