Groovy
  1. Groovy
  2. GROOVY-5266

GroovyEngine not creating friendly script names for ant files

    Details

    • Type: Improvement Improvement
    • Status: 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

      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.

      1. GroovyEngine.patch
        2 kB
        Jochen Theodorou

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development