GRECLIPSE
  1. GRECLIPSE
  2. GRECLIPSE-1203

Syntax highlight for slashed strings

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.1Release
    • Fix Version/s: 2.6.1.Release
    • Component/s: Editor
    • Labels:
      None
    • Environment:
      Eclipse 3.7, 32 bit
    • Number of attachments :
      0

      Description

      Syntax highlight doesn't work for slashed strings with $ at end (for example /^\s+$/) - everything after $/ is highlighted as String

        Issue Links

          Activity

          Hide
          Andrew Eisenberg added a comment -

          Groovy 1.8 introduced the Dollar slashy string: http://docs.codehaus.org/display/GROOVY/Groovy+1.8+release+notes#Groovy1.8releasenotes-Dollarslashystrings

          Somewhere in your groovy file after the /^s+$/, you must have a /$. Since syntax highlighting of strings is based on regular expressions, I have not yet found an easy way to support both dollar slashy strings and the corner case that you have described.

          But, since this is not the first time your problem has come up, it is worth looking into more deeply.

          Show
          Andrew Eisenberg added a comment - Groovy 1.8 introduced the Dollar slashy string: http://docs.codehaus.org/display/GROOVY/Groovy+1.8+release+notes#Groovy1.8releasenotes-Dollarslashystrings Somewhere in your groovy file after the /^s+$/, you must have a /$. Since syntax highlighting of strings is based on regular expressions, I have not yet found an easy way to support both dollar slashy strings and the corner case that you have described. But, since this is not the first time your problem has come up, it is worth looking into more deeply.
          Hide
          Croesus added a comment -

          plz fix very frustrating when working with strings containing unixy directories

          Show
          Croesus added a comment - plz fix very frustrating when working with strings containing unixy directories
          Hide
          Andrew Eisenberg added a comment -

          The best fix I can think of would be to have a preference to disable slashy string syntax highlighting. There would be a checkbox somewhere in Preferences -> Groovy -> Editor. Unchecking it would stop this highlighting. Would that be sufficient for you?

          Show
          Andrew Eisenberg added a comment - The best fix I can think of would be to have a preference to disable slashy string syntax highlighting. There would be a checkbox somewhere in Preferences -> Groovy -> Editor. Unchecking it would stop this highlighting. Would that be sufficient for you?
          Hide
          Croesus added a comment -

          That works fine - thanks

          Show
          Croesus added a comment - That works fine - thanks
          Hide
          Andrew Eisenberg added a comment -

          I'll get this done for 2.6.1.

          Show
          Andrew Eisenberg added a comment - I'll get this done for 2.6.1.
          Hide
          Andrew Eisenberg added a comment -

          There is now an option at the bottom of the Preferences -> Groovy -> Editor page where you can disable dollar slashy strings.

          Show
          Andrew Eisenberg added a comment - There is now an option at the bottom of the Preferences -> Groovy -> Editor page where you can disable dollar slashy strings.

            People

            • Assignee:
              Andrew Eisenberg
              Reporter:
              Alexey T
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: