Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4644224

BreakIterator should allow use for programming languages

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 1.4.0
    • core-libs
    • b34
    • generic
    • generic

      Name: nl37777 Date: 02/27/2002

      The class description for java.text.BreakIterator says:
      "BreakIterator is intended for use with natural languages only. Do not
      use this class to tokenize a programming language."

      This seems like an unnecessary limitation. It would be correct to say
      that the various get*Instance methods of the class can only return break
      iterators for natural languages because they take a Locale argument, and
      locales can only specify natural languages. However, there seems to be
      no reason why the BreakIterator interface couldn't also be implemented
      to provide breaking information for a programming language. Such a break
      iterator would be very useful, for example, in the implementation of a
      program editor based on the Swing text components.

      The class description should be changed to remove this limitation.
      ======================================================================
      ###@###.### 11/2/04 18:34 GMT

            nlindenbsunw Norbert Lindenberg (Inactive)
            nlindenbsunw Norbert Lindenberg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: