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

Bug 346903

Summary: Pressing ESC key closes the Project Facets selection dialog and applies the changes as if OK was pressed
Product: [WebTools] WTP Common Tools Reporter: Roberto Sanchez Herrera <shr31223>
Component: Faceted Project FrameworkAssignee: wst.common <wst.common-inbox>
Status: CLOSED WONTFIX QA Contact: Konstantin Komissarchik <konstantin>
Severity: normal    
Priority: P3    
Version: 3.2.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Roberto Sanchez Herrera CLA 2011-05-23 16:34:56 EDT
In bugs 334835 and 334438, the Cancel button was removed from the Facet Selection Dialog, since they were useless (cancel is not supported in that panel right now). 

But in WTP 3.2.4 and 3.3, if you make a modification in the Facet selection dialog (e.g., add a facet), and press ESC key or click on the X in the upper right side of the panel, the change is applied just as if you clicked OK. 

The ESC key should be disabled for this dialog, and for the X button, I'd like to hear opinions.
Comment 1 Konstantin Komissarchik CLA 2011-05-23 23:13:29 EDT
The ESC key support and the X button in upper right are fundamental features of all dialogs in Windows. Trying to mess with these (assuming that is even possible) would create worse usability problems than this would be addressing.
Comment 2 Roberto Sanchez Herrera CLA 2011-05-24 10:12:46 EDT
(In reply to comment #1)
> The ESC key support and the X button in upper right are fundamental features of
> all dialogs in Windows. Trying to mess with these (assuming that is even
> possible) would create worse usability problems than this would be addressing.


In fact, the change is pretty simple. To disable the ESC key, you just need to override the canHandleShellCloseEvent method in FacetsSelectionDialog. And for the X button, just need to change the shell style of the same class
Comment 3 Roberto Sanchez Herrera CLA 2011-05-24 10:22:32 EDT
Closing defect, thank you for looking at it.