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

Bug 98024

Summary: Open type dialog skips over too much
Product: [Eclipse Project] Platform Reporter: Billy Biggs <billy.biggs>
Component: SWTAssignee: Steve Northover <snorthov>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: grant_gayed, snorthov
Version: 3.1   
Target Milestone: 3.1 RC2   
Hardware: PC   
OS: Linux-Motif   
Whiteboard:

Description Billy Biggs CLA 2005-06-01 17:56:54 EDT
3.1RC1, Linux-Motif

1. Open the new open type dialog
2. Search for "Control"
3. Open _BOTH_ the sun whatever one and the SWT one so that both are in
   your history
4. Open the new open type dialog and search for "Control"
5. Hit down arrow twice

The selection skips to below the dashed line.

I am filing this in the SWT bucket because I have only seen it on Motif.
Comment 1 Steve Northover CLA 2005-06-06 19:04:08 EDT
BB to show SN and GG.
Comment 2 Grant Gayed CLA 2005-06-07 18:34:27 EDT
This is happening because the selected item is being updated in the Table 
before KeyDown is received by listeners outside of the Table.

The code in jdt is assuming that when it gets KeyDown that the selection has 
not quite changed yet, so if the selection is currently sitting above the 
separator item then it is bumped forward by an extra item index to skip over 
the separator item.  But in the motif case, if the selected item was initially 
at index 0, pressing down arrow bumps the selection to index 1, and then jdt 
receives the KeyDown and sees the selection sitting just above the separator 
item and then bumps it down to index 3.
Comment 3 Steve Northover CLA 2005-06-07 18:53:32 EDT
I have a fix that we can discuss.
Comment 4 Grant Gayed CLA 2005-06-08 14:19:43 EDT
The fix seems fine, and I've copied it to Tree as well.
Comment 5 Steve Northover CLA 2005-06-09 11:08:28 EDT
Fixed > 20060609