Community
Participate
Working Groups
GEF should be using ICU instead of java.text per http://wiki.eclipse.org/ICU4J. org.eclipse.gef is using java.text.MessageFormat and draw2d is using java.text.Bidi. I'll attach a patch that changes the imports to com.ibm.icu. The draw2d piece of the patch won't work until Eclipse upgrades to ICU 3.8. This is supposed to happen in M5. See bug 214406.
Created attachment 86560 [details] Patches org.eclipse.gef and org.eclipse.draw2d to use icu classes
We were supposed to already be ICU4J compliant, must have missed a few places.
We should be careful here. It's not always a simple case of changing the import statement. I know for a fact that the word iterators in JDK and ICU work quite differently, so changing the word iterator in the text example (TextFlowPart) to the ICU4J version introduced bugs in the word navigation behaviour. Similarly, changing the line iterator in FlowUtilities might have introduced a bug. Looking at http://wiki.eclipse.org/ICU4J, I don't see Bidi mentioned in there as a class that needs to be changed. If we do change it, we'd have to do sufficient testing to ensure that it didn't introduce any problems.
The change that is important to my product is the Bidi change. The only usage is the static method requiresBidi() which determines if a string needs to be Bidi processed. The Bidi class was not added to ICU until 3.8, which Eclipse is just adopting now. I suspect that is why it is not on the Eclipse/ICU page. It seems like we should be able to rely on the ICU testing of this single static method.
I verified this morning that the attached patch still works against what is in HEAD. the patch should just need to be reviewed and committed to CVS.
Missed M5, so moving to M6
Committed to HEAD, Also added the explicit bundle version dependency to draw2d and gef. com.ibm.icu;bundle-version="[3.8.0,4.0.0)"
(In reply to comment #7) > Also added the explicit bundle version dependency to draw2d and gef. > > com.ibm.icu;bundle-version="[3.8.0,4.0.0)" > I guess this was a bad idea. GEF originally used Import-Package: com.ibm.icu.text Given we fixed this bug, I changed this to explicitly require the 3.8.0 or newer bundle, since it depends on the new ICU. For whatever reason, this change broken the GMF build. For now I have put the import package back in the Manifest.MF