Bug 135785 - need to adopt ICU4J APIs
Summary: need to adopt ICU4J APIs
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.2 RC1   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 127876
  Show dependency tree
 
Reported: 2006-04-09 23:15 EDT by Karice McIntyre CLA
Modified: 2006-04-11 15:52 EDT (History)
0 users

See Also:


Attachments
archive of patches for affected core resources projects (5.21 KB, application/zip)
2006-04-09 23:22 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:15:15 EDT
 
Comment 1 Karice McIntyre CLA 2006-04-09 23:15:51 EDT
Oops - hit the commit button before all the info was in!

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 2 Karice McIntyre CLA 2006-04-09 23:22:48 EDT
Created attachment 38111 [details]
archive of patches for affected core resources projects

There is a patch file for each affected project, named accordingly.

I noticed that in the org.eclipse.core.resources patch that ICU is imported but not actually used, because the one occurrence found where it could be used was deemed to not be usable (see comment in the code) in that case.  Please verify if that assessment was correct.
Comment 3 John Arthorne CLA 2006-04-10 16:52:11 EDT
The core.resources patch seems to have no effect other than adding the import-package for com.ibm.icu.text and messing with the imports.  When I re-organize imports using core conventions all the changes to .java files in the patch go away.  I wonder if it is necessary to add the import package considering nothing from that package is currently being used.

I am not able to apply the patch to org.eclipse.core.jobs - perhaps the files have changed too much since the patch was created.  Could you recreate that patch against HEAD?

FYI, all the org.eclipse.core.* and equinox.* plugins use the organize imports convention: Number of imports needed for .*: 3.  If you use the same convention you'll minimize the noise in the patches.
Comment 4 Karice McIntyre CLA 2006-04-10 17:39:39 EDT
core.resources patch:
I thought I weeded out all the patches where Doug just did a re-org of imports: that will make it easier to find references in the future to classes that will need to be updated.  Can you check the import change in Policy where Doug commented:
// can't use ICU, used by ant
and verify if this is true or not.  If ICU indeed can't be used then that comment is the only change that is required.  

core.jobs patch:
This worked ok for me yesterday.  Was someone releasing lots of changes last night or something ;)  I will look at it again.

Comment 5 Karice McIntyre CLA 2006-04-10 18:25:32 EDT
Hmm, I think I am going to see your core.jobs patch.  I don't have any problems applying this to the HEAD stream.  The last version of this project was 0327 so I am not quite sure why the patch doesn't work for you.
Comment 6 John Arthorne CLA 2006-04-11 15:52:12 EDT
Ok, I have reviewed both patches.  In the resources plugin, I have only released the comment in the Ant Policy class to indicate that ICU should not be used.

In the jobs plugin, the only change was in a date format that is only used in a debugging method (JobManager.debug(String)). I have decided not to apply this patch, because it creates an unnecessary dependency on ICU4J.  I know there are clients using the jobs API in standalone programs, and in small head Equinox applications where ICU4J isn't otherwise needed.  I don't want to force these clients into a dependency on ICU4J for no good reason.  I have added a comment next to the java.text import to indicate this.