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

[Control] Unexpected accelerator parsing in TextBinding

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 8u20
    • None
    • javafx
    • None

    Description

      I notice this while working on https://javafx-jira.kenai.com/browse/RT-36570

      One can set
      Button b = new Button("butto_n1@a");
      and that displays "button1"

      the "_" being removed is fine (as parseMneumonic is true)
      But the "@a" being removed is not expected, that happens to the accelerator parsing code in TextBinding.
      This seems old code that should be removed.
      Note that new Button("butto_n1@Ctrl+a"); fails because of the token.toUpperCase(Locale.ROOT) in line 350 of TextBinding#parseAcceleratorText(). Which is further indication the code is left in a bad state.
      Furthermore, TextBinding#getAcceleratorText() and TextBinding#getAccelerator() are not used. Again, proving this is legacy code...

      Attachments

        Activity

          People

            jgiles Jonathan Giles
            fheidric Felipe Heidrich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported: