Community
Participate
Working Groups
Build Identifier: 20100617-1415 If programmatically select all rows in CheckboxTableViewer created upon virtual table using setAllChecked, then getCheckedElements method returns null data objects, probably, for non-displayed rows. In spite of the fact, that table is virtual, it is expected that getCheckedElements returns concrete non-null data objects associated with rows. Reproducible: Always Steps to Reproduce: 1. Launch attached snippet. 2. Click "Select/Deselect All" to select all rows, then click "Null Rows" and message with number of rows with null data objects will be displayed.
Created attachment 174055 [details] Snippet for reproducing bug about null data rows in CheckboxTableViewer.getCheckedElements.
(In reply to comment #0) > Steps to Reproduce: > 1. Launch attached snippet. > 2. Click "Select/Deselect All" to select all rows, then click "Null Rows" and > message with number of rows with null data objects will be displayed. On my MS Windows 7 system I get a MessageDialog with "no null data" every time. Nonetheless your snippet does indicate the lack of a data-not-set check in the 'getCheckedElements' method. But this could be a platform specific issue; for example, the call TableItem#getChecked()sends SWT.SetData event for tableitems on my system. Prakash, could you please try to test and confirm the same on Mac. Thanks!!
(In reply to comment #2) > Prakash, could you please try to test and confirm the same on Mac. Thanks!! Yes, following the steps on Mac, it says about 10k rows have null data.
(In reply to comment #3) > > > Prakash, could you please try to test and confirm the same on Mac. Thanks!! > > Yes, following the steps on Mac, it says about 10k rows have null data. Thanks !! > But this could be a platform specific issue; for > example, the call TableItem#getChecked()sends SWT.SetData event for tableitems > on my system. Bug 319509 was about the call to Table#setChecked(boolean) snubbing off SWT.SetData events. And the attached snippet on this bug demonstrates that TableItem#getChecked() will fire the event on the same platform. Yet this is different on a different platform. Adding Felipe for comment. As for the viewer, I'll post a patch adding the data-not-set check in required places to prevent premature materialization of items.
Created attachment 174129 [details] Patch V01 Before releasing this one, I'd like to see if it covers all the susceptible methods. Ilya, let me know if it is possible for you to test this patch. Thanks.
(In reply to comment #5) > Before releasing this one, I'd like to see if it covers all the susceptible > methods. Ilya, let me know if it is possible for you to test this patch. > Thanks. Hitesh, unfortunately, I have never checked out Eclipse sources from VCS, patched and built it locally. So, probably, it will be faster to ask somebody who has environment adopted to work with Eclipse sources and developing it. But if you prepare a standalone snippet based on patched platform (if it is possible and reasonable, of course), I can test it easily. In any case, I would like to start working with patched platform as soon as patches for these bugs will appear. So I will appreciate if you give me advise or link with instructions of how to get patched Eclipse platform version. Thanks.
(In reply to comment #6) No problem. Prakash , another one <g> , if you could spare some time patching and running the same snippet again. Thanks.
(In reply to comment #7) > Prakash , another one <g> , if you could spare some time patching and running > the same snippet again. Thanks. No null data after applying the patch.
Thanks, Prakash. Patch applied to CVS HEAD; marking as fixed.