Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 231327 - Tabbing into table sets focus to first column regardless of its visibility
Summary: Tabbing into table sets focus to first column regardless of its visibility
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M5   Edit
Assignee: Thomas Schindl CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-09 11:41 EDT by Andi Thomas CLA
Modified: 2009-01-07 23:42 EST (History)
2 users (show)

See Also:


Attachments
snippet that shows the problem (6.94 KB, text/x-java)
2008-05-09 11:41 EDT, Andi Thomas CLA
no flags Details
Revised TableViewerFocusCellManager (3.36 KB, text/x-java)
2008-05-09 11:44 EDT, Andi Thomas CLA
no flags Details
Changes as a patch (1.10 KB, patch)
2008-12-15 13:26 EST, Andi Thomas CLA
no flags Details | Diff
Changes as a patch (1.20 KB, patch)
2008-12-17 16:43 EST, Andi Thomas CLA
bokowski: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andi Thomas CLA 2008-05-09 11:41:34 EDT
Created attachment 99490 [details]
snippet that shows the problem

When you tab into a table for the first time, the focus cell is set to the first column regardless of its visibility.  This creates a strange effect when you down arrow, as you cannot see the focus cell.

See the snippet for an example of the problem.

To reproduce:
  1) Run snippet, tab into table, hit down arrow.  Focus cell is visible in the 2nd row of the 1st column.

  2) Run snippet, click button, tab into table, hit down arrow.  Focus cell is not invisible in the 2nd row of the 1st column.
Comment 1 Andi Thomas CLA 2008-05-09 11:44:07 EDT
Created attachment 99493 [details]
Revised TableViewerFocusCellManager 

Revised TableViewerFocusCellManager.  #getInitialFocusCell() now sets focus to the first visible column, or null if there aren't any.

My proposed fix.
Comment 2 Andi Thomas CLA 2008-05-09 11:45:51 EDT
As an aside, the initial focus drawing is a bit strange.  You would expect the first cell to be highlighted, but since there is no selected row I guess it makes sense.  It is a bit strange though that down arrow gives focus to the 2nd row cell...?
Comment 3 Andi Thomas CLA 2008-05-20 10:15:49 EDT
nudge...
Comment 4 Andi Thomas CLA 2008-12-15 08:21:49 EST
nudge...  3.5?
Comment 5 Thomas Schindl CLA 2008-12-15 08:38:10 EST
Could you please attach the change as a patch against current CVS-HEAD?
Comment 6 Andi Thomas CLA 2008-12-15 13:26:29 EST
Created attachment 120498 [details]
Changes as a patch
Comment 7 Andi Thomas CLA 2008-12-15 13:29:26 EST
I still haven't figured out how to get a compilable version of jFace from CVS, but I've attached the patch anyway.  

Its simple enough that I'm confident of it compiling and working despite being untested on the full HEAD code base.
Comment 8 Boris Bokowski CLA 2008-12-16 22:38:46 EST
(In reply to comment #7)
> I still haven't figured out how to get a compilable version of jFace from CVS

Does this help? http://wiki.eclipse.org/Platform_UI/How_to_Contribute
Comment 9 Andi Thomas CLA 2008-12-17 16:43:24 EST
Created attachment 120765 [details]
Changes as a patch 

updated patch (same code, but I figured I should do it properly).  
Thanks to Boris for pointing me at the right instructions.
Comment 10 Thomas Schindl CLA 2008-12-17 17:02:33 EST
Thanks released to CVS-HEAD >= 20081217 - Boris what do I need to do now - set a flag for contributed?
Comment 11 Boris Bokowski CLA 2009-01-07 23:42:39 EST
Comment on attachment 120765 [details]
Changes as a patch 

This is what you need to do - go to the contributed patch ("Details") and set the iplog flag to +.