Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325898

Summary: "Manage Configurations" dialog opens on an incorrect parent shell
Product: [Tools] CDT Reporter: Baltasar Belyavsky <bbelyavsky>
Component: cdt-coreAssignee: Andrew Gvozdev <angvoz.dev>
Status: RESOLVED FIXED QA Contact: Doug Schaefer <cdtdoug>
Severity: normal    
Priority: P3 CC: marcin.swiezawski
Version: 8.0   
Target Milestone: 7.0.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch - applies to workspace angvoz.dev: iplog+

Description Baltasar Belyavsky CLA 2010-09-21 15:44:45 EDT
Build Identifier: I20100608-0911, CDT 7.0

The "Manage Configurations" dialog (ManageConfigDialog class) is always opened with the workbench window's shell as its parent (from ManageConfigRunner class).  This works out fine when the dialog is opened through the C/C++ Projects view's context menu, but it's incorrect when it's opened from the project Properties dialog.  In the latter case, the Properties dialog's shell should be used as the parent.

This was caught by our automated GUI tests when running on Linux - the "Manage Configurations" dialog, when opened from the Properties dialog, sometimes ends up hiding behind the Properties dialog.  There is no way to get out of this situation without killing the workbench.

In ManageConfigRunner, instead of using IWorkbench.getActiveWorkbenchWindow().getShell(), consider using Display.getActiveShell() as the parent shell for ManageConfigDialog.

Reproducible: Always

Steps to Reproduce:
The more severe symptom, where the "Manage Configurations" dialog hides behind the Properties dialog, is hard to reproduce - we are able to reproduce it on Linux.  But the general problem can be reproduced as follows:

1. Right-click on any project and bring up its Properties dialog.
2. Go to the C/C++ Build property-page, and click on the "Manage Configurations" button.
3. When the "Manage Configurations" dialog opens, try clicking on the Workbench window's header.
-> The "Manage Configurations" dialog flickers -> correct.
4. Now try clicking on the Properties dialog.
-> The "Manage Configurations" dialog doesn't flicker -> incorrect.
Comment 1 Andrew Gvozdev CLA 2010-09-22 08:12:02 EDT
Can you attach a patch for this proposal?
Comment 2 Baltasar Belyavsky CLA 2010-09-23 16:03:02 EDT
Created attachment 179482 [details]
Patch - applies to workspace

Patch attached.

Thanks!
Comment 3 Andrew Gvozdev CLA 2010-09-23 17:33:39 EDT
The patch committed on HEAD (8.0) and 7.0.2. Thanks!
Comment 4 CDT Genie CLA 2010-09-23 18:23:01 EDT
*** cdt cvs genie on behalf of agvozdev ***
bug 325898: &quot;Manage Configurations&quot; dialog opens on an incorrect parent shell
Patch from Baltasar Belyavsky

[*] ManageConfigRunner.java 1.8 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ManageConfigRunner.java?root=Tools_Project&r1=1.7&r2=1.8

[*] ManageConfigRunner.java 1.6.6.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ManageConfigRunner.java?root=Tools_Project&r1=1.6.6.2&r2=1.6.6.3