/[classpath]/gjdoc/src/gnu/classpath/tools/gjdoc/DocImpl.java
ViewVC logotype

Diff of /gjdoc/src/gnu/classpath/tools/gjdoc/DocImpl.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by julian, Tue Nov 23 12:49:55 2004 UTC revision 1.13 by julian, Tue Nov 23 15:45:04 2004 UTC
# Line 24  import com.sun.javadoc.*; Line 24  import com.sun.javadoc.*;
24  import java.util.*;  import java.util.*;
25  import java.text.*;  import java.text.*;
26  import java.io.File;  import java.io.File;
27    import javax.swing.text.Segment;
28    
29  /**  /**
30   *  Represents the least common denominator of all Javadoc   *  Represents the least common denominator of all Javadoc
# Line 190  public abstract class DocImpl implements Line 191  public abstract class DocImpl implements
191     private static int findEndOfSentence(char[] text, int startIndex,     private static int findEndOfSentence(char[] text, int startIndex,
192                                          int endIndex)                                          int endIndex)
193     {     {
194        while (startIndex < endIndex)        if (Main.getInstance().isUseBreakIterator()) {
195          {           Segment segment = new Segment(text, startIndex, endIndex - startIndex);
196            if (text[startIndex] == '.'           BreakIterator breakIterator = BreakIterator.getSentenceInstance(Main.getInstance().getLocale());
197              && (startIndex+1 == endIndex           breakIterator.setText(segment);
198                  || Character.isWhitespace(text[startIndex+1])           int result = breakIterator.next();
199                  || isHTMLBreakTag(text, startIndex+1, endIndex)))           if (BreakIterator.DONE == result) {
200              return startIndex;              return endIndex;
201             }
202             else {
203                return result;
204             }
205          }
206          else {
207             while (startIndex < endIndex) {
208                if (text[startIndex] == '.'
209                    && (startIndex+1 == endIndex
210                        || Character.isWhitespace(text[startIndex+1])
211                        || isHTMLBreakTag(text, startIndex+1, endIndex)))
212                   return startIndex;
213                
214              startIndex++;              startIndex++;
215          }           }
216        return endIndex;           return endIndex;
217          }
218     }     }
219    
220     /**     /**

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26