Bug 157093 - [implementation] should adopt ICU Collator and use new APIs on StructuredViewer
Summary: [implementation] should adopt ICU Collator and use new APIs on StructuredViewer
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: 3.3 M2   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-12 15:27 EDT by Karice McIntyre CLA
Modified: 2006-09-20 06:17 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karice McIntyre CLA 2006-09-12 15:27:15 EDT
Since ICU4J provides more comprehensive support for internationalization and is now included as part of the Platform, we should be endorsing it by adopting use  of its APIs instead of using the default Java implementation.  

One widespread example of usage that should be migrated to is using ICU's collator to sort in all of our viewers (see ViewerComparator) rather than the java.text collator used in ViewerSorter.  This component was found to be  affected by at least one of the 3 following conditions that should be adopted:
1. change references to java.text.Collator to com.ibm.icu.Collator.  
CAVEAT: There may be cases where this is not possible if plug-ins can ship without the com.ibm.icu plug-in (example, JFace).

2. change references to StructuredViewer#setSorter to use StructuredViewer#setComparator and StructuredViewer#getSorter to StructuredViewer#setComparator. These are slated to be deprecated (see bug 154871). 

3. any classes that subclass ViewerSorter should now sublcass ViewerComparator, if possible (i.e. if the class is internal).

The UI component is in the process of completing this work (see bug 154884) and it is slated to be released for M2.
Comment 1 Dani Megert CLA 2006-09-14 12:19:50 EDT
1. has already been done for 3.2 (this was part of th ICU adoption work)
Comment 2 Dani Megert CLA 2006-09-14 12:32:51 EDT
Fixed in HEAD.
Available in builds > N20060914-0010.
Comment 3 Tom Hofmann CLA 2006-09-20 06:17:58 EDT
Verified that there are no remaining ViewerSorter subclasses or invocations of StructuredViewer::setSorter in ui.editors nor ui.workbench.texteditor.