diff org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultTextDoubleClickStrategy.d @ 92:ebefa5c2eab4

moving ICU bindings to com.ibm.icu
author Frank Benoit <benoit@tionex.de>
date Sun, 19 Apr 2009 13:49:38 +0200
parents dbfb303e8fb0
children
line wrap: on
line diff
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultTextDoubleClickStrategy.d	Sun Apr 19 12:22:47 2009 +0200
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultTextDoubleClickStrategy.d	Sun Apr 19 13:49:38 2009 +0200
@@ -160,19 +160,19 @@
 
 import java.text.CharacterIterator;
 
-import java.mangoicu.UBreakIterator;
+import com.ibm.icu.text.BreakIterator;
 
 /**
  * Standard implementation of
  * {@link org.eclipse.jface.text.ITextDoubleClickStrategy}.
  * <p>
- * Selects words using <code>java.text.UBreakIterator</code> for the default
+ * Selects words using <code>java.text.BreakIterator</code> for the default
  * locale.</p>
  * <p>
  * This class is not intended to be subclassed.
  * </p>
  *
- * @see java.text.UBreakIterator
+ * @see java.text.BreakIterator
  * @noextend This class is not intended to be subclassed by clients.
  */
 public class DefaultTextDoubleClickStrategy : ITextDoubleClickStrategy {
@@ -342,19 +342,17 @@
             if (position is line.getOffset() + line.getLength())
                 return;
 
-            //mangoicu
-//             fDocIter.setDocument(document, line);
-            String strLine = document.get( line.getOffset(), line.getLength() );
-            UBreakIterator breakIter= UBreakIterator.openWordIterator( ULocale.Default, strLine/+fDocIter+/ );
+            fDocIter.setDocument(document, line);
 
+            BreakIterator breakIter= BreakIterator.getWordInstance();
+            breakIter.setText(fDocIter);
 
-            //int start= breakIter.preceding(position);
-            int start= breakIter.previous(position); // mangoicu
-            if (start is UBreakIterator.DONE)
+            int start= breakIter.preceding(position);
+            if (start is BreakIterator.DONE)
                 start= line.getOffset();
 
             int end= breakIter.following(position);
-            if (end is UBreakIterator.DONE)
+            if (end is BreakIterator.DONE)
                 end= line.getOffset() + line.getLength();
 
             if (breakIter.isBoundary(position)) {