Community
Participate
Working Groups
The following 3 classes in the ui should be changed to be subclasses of ViewerComparator: ResourceSorter WorkbenchViewerSorter FileViewerSorter This will involve deprecating old classes and methods, and adding new classes and methods for each of these classes and to classes that reference these sorter classes in their API.
If we implement the suggested solution for bug 158118 then this will not be necessary.
*** Bug 158156 has been marked as a duplicate of this bug. ***
Created attachment 51261 [details] apply patch to org.eclipse.ui.ide and org.eclipse.ui.workbench Patch to change the 3 mentioned classes, and related APIs. Boris, since some of the changes involve adding API could you please check this patch? Can you confirm whether or not the API addition to IResourceNavigator is allowed (the comment says the class is not intended to be implemented by clients)? I marked all API additions as experimental, for now.
I would prefer removing the EXPERIMENTAL warnings. From a client's perspective, what do you do if the old API is deprecated, but the new API is still experimental? I think we should just use @since 3.3 to mark the new API. See also http://wiki.eclipse.org/index.php/Provisional_API_Guidelines#Javadoc
Guidelines noted - I think I misunderstood them initially. I will remove the experimental tags.
The changes in ResourceNavigator are problematic. You call initResourceSorter and then initResourceComparator. The latter calls viewer.setComparator, which removes the sorter set by initResourceSorter.
Oops, I didn't look closely enough at this one. The call to initResourceSorter() can be safely removed and replaced with initResourceComparator(). If someone happens to call the public method ResourceNavigator#setSorter(ResourceSorter), rather then #setComparator(ResourceComparator), the result will simply be that the client will be using a java.text.Collator instead of an ICU Collator in their ResourceNavigator.
released to HEAD for build > 20061010
Minor nit: In the ide plugin there is method org.eclipse.ui.views.markers.internal.TableSortDialog.getSorter(). It returns a comparator so the method should probably be renamed to getComparator(). Otherwise, verified in I20061031-0656.