groovy
  1. groovy
  2. GROOVY-5266

GroovyEngine not creating friendly script names for ant files

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.4
    • Fix Version/s: 1.8.6, 2.0-beta-3
    • Component/s: Ant integration
    • Labels:
      None
    • Number of attachments :
      1

      Description

      See this thread: http://groovy-eclipse-plugin.42567.n3.nabble.com/Eclipse-Debugging-Ant-and-Groovy-td3689281.html

      GroovyEngine is not creating script names that are understandable by the java debugger. It is basing the generated script name off of the name passed to it by the BSFManager. The only way that the Java debugger can link a compiled script to its source is if the script name matches the name of the source file.

      In this case, scriptdef_ is prepended to the script name and breakpoints will not be reached inside of scripts loaded by BSFManager (ie- all scripts loaded by ant tasks).

      The solution is simple. Change the logic of org.codehaus.groovy.bsf.GroovyEngine.convertToValidJavaClassname(String) so that it checks the name passed in to see if it starts with scriptdef_. If so, then remove it.

        Activity

        Hide
        Paul King added a comment -

        Ant is looking at a 1.8.3 release shortly but I don't believe have got a code freeze yet - there might be a small window of opportunity to get a fix relatively quickly.

        Show
        Paul King added a comment - Ant is looking at a 1.8.3 release shortly but I don't believe have got a code freeze yet - there might be a small window of opportunity to get a fix relatively quickly.
        Hide
        blackdrag blackdrag added a comment -

        I propose this patch including a little test

        Show
        blackdrag blackdrag added a comment - I propose this patch including a little test
        Hide
        Guillaume Laforge added a comment -

        Patch looking good to me.

        Show
        Guillaume Laforge added a comment - Patch looking good to me.
        Hide
        Andrew Eisenberg added a comment -

        Fine with me.

        Show
        Andrew Eisenberg added a comment - Fine with me.
        Hide
        blackdrag blackdrag added a comment -

        fixed

        Show
        blackdrag blackdrag added a comment - fixed

          People

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

            Dates

            • Created:
              Updated:
              Resolved: