Bug 154884 - [ICU] Platform should adopt using ICU Collator using new APIs
Summary: [ICU] Platform should adopt using ICU Collator using new APIs
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.3 M2   Edit
Assignee: Karice McIntyre CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 154871
  Show dependency tree
 
Reported: 2006-08-23 12:57 EDT by Karice McIntyre CLA
Modified: 2006-09-19 13:35 EDT (History)
1 user (show)

See Also:


Attachments
apply patch to ui.workbench and ui.ide plug-ins (58.30 KB, patch)
2006-09-06 12:18 EDT, Karice McIntyre CLA
no flags Details | Diff
apply patch to org.eclipse.ui.workbench and org.eclipse.ui.ide (63.26 KB, patch)
2006-09-11 16:22 EDT, Karice McIntyre CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karice McIntyre CLA 2006-08-23 12:57:06 EDT
In order for the platform to fully adopt ICU4J, we should be using ICU's collator to sort in all of our viewers (see ViewerComparator) rather than the java.text collator used in ViewerSorter.  The easiest first step we can do is to change references to StructuredViewer#setSorter to use StructuredViewer#setComparator.  I found 45 references in the UI to setSorter().  In the IDE there are 16 references.    I believe we should only be changing references in the IDE (correct me if I am wrong).

In addition, perhaps we should look at changing any internal classes that subclass ViewerSorter (the UI has some) to sublcass ViewerComparator, if possible.
Comment 1 Karice McIntyre CLA 2006-09-06 12:17:32 EDT
Boris, I have made some changes to the UI that you may want to take a look at (about 40 classes are affected, just in the UI plug-ins) so that you can proceed on bug 154871.  I will attach the patch.
Comment 2 Karice McIntyre CLA 2006-09-06 12:18:15 EDT
Created attachment 49507 [details]
apply patch to ui.workbench and ui.ide plug-ins
Comment 3 Karice McIntyre CLA 2006-09-11 16:22:36 EDT
Created attachment 49874 [details]
apply patch to org.eclipse.ui.workbench and org.eclipse.ui.ide

New patch.  After doing another couple passes of the original patch, I renamed more *sorter method names to be *comparator and fixed more comments.  I haven't renamed the *Sorter classes yet, so that the changes to these classes are easier to spot using the patch.
Comment 4 Boris Bokowski CLA 2006-09-14 16:00:19 EDT
The patch looks good.  Just one comment:  WizardResourceImportPage.selectionGroup is an API field since it is protected, but the type it refers to is non-API.  It seems that there should be Javadoc on the field saying that it was made protected accidentally, and that subclasses should not access it directly.

Because if they did, they could be broken by the changes to ResourceTreeAndListGroup.
Comment 5 Karice McIntyre CLA 2006-09-14 18:23:23 EDT
thanks for checking this, Boris.  I added the suggested comment and released the patch to HEAD for build > 20060914.

I also refactored the clases that have *Sorter in the name to *Comparator after releasing this patch (there are 7 of them) and released those changes to HEAD (also for build > 20060914).  
Comment 6 Karice McIntyre CLA 2006-09-19 13:35:39 EDT
verified in I20060918-2000