GRECLIPSE
  1. GRECLIPSE
  2. GRECLIPSE-1252

Convert to multi-line string quick assist

    Details

    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      This quick-assist will convert from a single-line string to a multiline string.

      Eg-

      'hello'
      

      becomes

      '''hello'''
      

      and

      "hello"
      

      becomes

      """hello"""
      

        Activity

        Hide
        Nick Sawadsky added a comment -

        Hi Andrew,

        Here is the patch I created! Seems to work, let me know what you think. Thanks again for all your help.

        Nick

        Show
        Nick Sawadsky added a comment - Hi Andrew, Here is the patch I created! Seems to work, let me know what you think. Thanks again for all your help. Nick
        Hide
        Andrew Eisenberg added a comment -

        Thanks for the patch. I'm still going through it. I had to make one change. You were using Arrays.copyOfRange. However, Groovy-Eclipse must support the Java 5 JDK, so I changed it to System.arrayCopy.

        I'm also considering removing escapes, so things like \n will be converted into actual newlines. Are you interested in doing this yourself?

        Show
        Andrew Eisenberg added a comment - Thanks for the patch. I'm still going through it. I had to make one change. You were using Arrays.copyOfRange . However, Groovy-Eclipse must support the Java 5 JDK, so I changed it to System.arrayCopy . I'm also considering removing escapes, so things like \n will be converted into actual newlines. Are you interested in doing this yourself?
        Hide
        Andrew Eisenberg added a comment -

        Committed the patch. Added support for escaping characters and added regression tests.

        Show
        Andrew Eisenberg added a comment - Committed the patch. Added support for escaping characters and added regression tests.

          People

          • Assignee:
            Andrew Eisenberg
            Reporter:
            Andrew Eisenberg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: