Bug 135787 - need to adopt ICU4J APIs
Summary: need to adopt ICU4J 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.2 RC1   Edit
Assignee: Karice McIntyre CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 127876
  Show dependency tree
 
Reported: 2006-04-09 23:24 EDT by Karice McIntyre CLA
Modified: 2006-04-25 15:39 EDT (History)
4 users (show)

See Also:


Attachments
archive of patches for affected ui projects (33.69 KB, application/zip)
2006-04-09 23:57 EDT, Karice McIntyre CLA
no flags Details
archive of revised ui patches (29.81 KB, application/zip)
2006-04-10 15:08 EDT, Karice McIntyre CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karice McIntyre CLA 2006-04-09 23:24:24 EDT
To complete the plan item to deliver ICU4J support in the Eclipse (see bug
127876) code must be migrated to use the com.ibm.icu.* classes in place of the
default java implementation.  This component is affected.  I will attach
patches with the changes required (only import changes at this point).  This
needs to be done for RC1.
Comment 1 Karice McIntyre CLA 2006-04-09 23:57:39 EDT
Created attachment 38119 [details]
archive of patches for affected ui projects

There is a patch file for each affected project, named accordingly.
Comment 2 Karice McIntyre CLA 2006-04-10 15:08:24 EDT
Created attachment 38198 [details]
archive of revised ui patches

I had to revise some of the workbench and ide changes to work with the new Comparator and to resolve some of the unchanged imports that should have been changed.  Boris double-checked these changes with me.
Comment 3 Karice McIntyre CLA 2006-04-10 15:13:17 EDT
fixed for builds > 20060410
Comment 4 Nick Edgar CLA 2006-04-17 13:52:21 EDT
This patch introduces a dependency on ICU4J from JFace (org.eclipse.jface).  I thought we were going to keep JFace independent of ICU4J in order to enable standalone SWT+JFace apps without requiring them to use ICU4J.

I talked to Karice about this.  The only dependencies appear to be for MessageFormat.  We originally kept JFace using MessageFormat instead of NLS to allow standalone SWT+JFace apps to work without the Eclipse runtime.  But now that the runtime has been refactored, it may make more sense to use NLS rather than MessageFormat.  Jeff, NLS is in the OSGi supplement bundle isn't it?
Comment 5 Nick Edgar CLA 2006-04-17 14:01:31 EDT
For more background on standalone SWT+JFace scenarios, see bug 49497 comment 55.
Comment 6 Karice McIntyre CLA 2006-04-17 14:59:21 EDT
In the JFace patch (this excludes JFace text and databindings plugins) we only are using MessageFormat.format(String, Object[]).  Keeping this in mind, there are several options we can persue at this point:

1. Remove the ICU references and revert back to using java.text.MessageFormat.  Doug tells me that if we are just passing an array of strings to MessageFormat.format(String, Object[]) then using ICU vs Java makes no difference.  This would not require any new dependencies in the standalone SWT/JFace configuration.

2. Change MessageFormat.format calls to use NLS.bind.  This would add a dependency on one of the osgi plugins when using JFace standalone with SWT.

3. Leave the code as it is now and communicate that if you are using JFace/SWT standalone that there is now a dependency on the ICU plugin - users could choose the ICU replacement plugin which is 100K in size or use the full ICU plugin.

Nick, which would you prefer?  
Comment 7 Jeff McAffer CLA 2006-04-17 15:27:25 EDT
door #1 seems like more fun.  Door #2 is potentially feasible as we *plan to* include the NLS code in the supplement bundle *but* we currently are not planning to have the supplement be part of 3.2.  Door #3 is disappointing especially if the regular Java behaviour for our use is fine.
Comment 8 Karice McIntyre CLA 2006-04-17 15:34:50 EDT
Nick, what would you like to do, based on this info?  I think I know the answer.
Comment 9 Nick Edgar CLA 2006-04-17 17:01:09 EDT
I'll pick door #1 then.  Cue the game show theme song...
Comment 10 Karice McIntyre CLA 2006-04-18 12:35:23 EDT
Reverted use of ICU4J in org.eclipse.jface project only (text and databinding references were not changed back).  released for build > 20060418
Comment 11 Karice McIntyre CLA 2006-04-25 15:39:05 EDT
Verified in N20060425-0010