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

Bug 313593

Summary: [Accessibility] Implement retrieval of visible children
Product: [Eclipse Project] Platform Reporter: Scott Kovatch <skovatch>
Component: SWTAssignee: Scott Kovatch <skovatch>
Status: RESOLVED FIXED QA Contact: Carolyn MacLeod <carolynmacleod4>
Severity: normal    
Priority: P3 Flags: carolynmacleod4: review+
Version: 3.6   
Target Milestone: 3.6.1   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Fix none

Description Scott Kovatch CLA 2010-05-19 14:12:40 EDT
Cocoa accessibility supports returning the visible children for things like tables, lists, menubars and menus. There is a comment in Accessible.java that says "SWT has no visible children API", but Carolyn says that one was added just for the Mac support. We need to change Accessible to call it and return the right values.
Comment 1 Scott Kovatch CLA 2010-05-19 14:13:03 EDT
Not for 3.6.
Comment 2 Scott Kovatch CLA 2010-06-14 18:35:10 EDT
Created attachment 171879 [details]
Fix
Comment 3 Scott Kovatch CLA 2010-06-14 18:36:10 EDT
Car, please review. Unfortunately, nothing I could find looks at the ACC.VISIBLE flag.
Comment 4 Carolyn MacLeod CLA 2010-06-15 10:57:05 EDT
Code looks fine. Hmmm... too bad nobody implements it. I guess it would be the type of thing someone might implement if there was a performance complaint (on the Mac). Can you think of a snippet that might show this? Something with lots of lightweight children, and most of them off-screen? Maybe add it to the CTable example's getChildren and try it with a large number of cells? (is getChildren called for tables on the Mac? Or just get[Visible]Rows/get[Visible]Columns/getCell?) It would be great to see a bench that showed noticeable improvement. (but not required before putting this code in).
Comment 5 Scott Kovatch CLA 2010-06-15 12:04:01 EDT
(In reply to comment #4)
> Code looks fine. Hmmm... too bad nobody implements it. I guess it would be the
> type of thing someone might implement if there was a performance complaint (on
> the Mac). Can you think of a snippet that might show this? Something with lots
> of lightweight children, and most of them off-screen? Maybe add it to the
> CTable example's getChildren and try it with a large number of cells? (is
> getChildren called for tables on the Mac? Or just
> get[Visible]Rows/get[Visible]Columns/getCell?) It would be great to see a bench
> that showed noticeable improvement. (but not required before putting this code
> in).

I'm not sure it's done for performance reasons -- my hunch is that if you had a table with a LOT of rows the user could have some kind of expectation as to how long it would take to scroll through them, or if there were a lot of elements in a graphic document, you could get a feel for how big of an image you were working with.

I do agree it would be good to have CTable implement this just to verify that it's working properly, in any event.
Comment 6 Scott Kovatch CLA 2010-06-28 13:44:57 EDT
Fixed in HEAD and 3.6 branch > 2010 06 28.