Spring Tool Suite
  1. Spring Tool Suite
  2. STS-2628

Content Assist (Code Complete) drops some of the first letters and duplicates fields

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 3.0.0.M1
    • Fix Version/s: 3.0.0.M2
    • Component/s: GRAILS, UI
    • Labels:
      None
    • Environment:

      eclipse.application=org.eclipse.ui.ide.workbench
      eclipse.buildId=2.9.1.201203221000-RELEASE
      eclipse.commands=-os
      linux
      -ws
      gtk
      -arch
      x86_64

      Description

      Create a domain class e.g. Champion Then create 3 properties on it: boolean monday, tuesday, wednesday

      modify the test to create a new instance of the domain: e.g. Champion c = new Champion() Position cursor in parentheses and hit ctrl+space

      properties in content assist are:

      wednesday
      ednesday
      tuesday
      uesday
      monday
      onday

      this isn't correct.

        Activity

        Martin Lippert (c) made changes -
        Field Original Value New Value
        Component/s GRAILS [ 10250 ]
        Andy Clement (c) made changes -
        Assignee Andrew Eisenberg [ aeisenberg ]
        Hide
        Andrew Eisenberg (c) added a comment -

        Yep. This is not correct. Most likely a Groovy-Eclipse bug.

        Show
        Andrew Eisenberg (c) added a comment - Yep. This is not correct. Most likely a Groovy-Eclipse bug.
        Hide
        Andrew Eisenberg (c) added a comment -

        This problem is happening because groovy-eclipse is incorrectly interpreting

        {getMonday}

        and

        {isMonday}

        as two separate properties. And our logic to convert from an isser method to a property name was incorrect.

        The fix is twofold:

        1. correctly create the property name from an isser method
        2. ensure that properties are not added twice (once for getter and once for isser)
        Show
        Andrew Eisenberg (c) added a comment - This problem is happening because groovy-eclipse is incorrectly interpreting {getMonday} and {isMonday} as two separate properties. And our logic to convert from an isser method to a property name was incorrect. The fix is twofold: correctly create the property name from an isser method ensure that properties are not added twice (once for getter and once for isser)
        Hide
        Andrew Eisenberg (c) added a comment -

        Pushed a fix. The next dev build of groovy-eclipse will be out in a few hours. Please upgrade and let me know if this fixes the problem for you.

        Thanks for reporting with a clear test case.

        Show
        Andrew Eisenberg (c) added a comment - Pushed a fix. The next dev build of groovy-eclipse will be out in a few hours. Please upgrade and let me know if this fixes the problem for you. Thanks for reporting with a clear test case.
        Andrew Eisenberg (c) made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.0.0.M2 [ 11806 ]
        Resolution Complete [ 13 ]
        Hide
        Andrew Eisenberg (c) added a comment -
        Show
        Andrew Eisenberg (c) added a comment - The snapshot update site is available here: http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.7/
        Hide
        Brian Bonner added a comment -

        I'll pull it down and give it a shot. Thanks for looking into it and getting back to me so quickly.

        Show
        Brian Bonner added a comment - I'll pull it down and give it a shot. Thanks for looking into it and getting back to me so quickly.
        Hide
        Brian Bonner added a comment -

        Ok, I updated with the snapshot update site. How can I verify I have the right code? I'm still seeing the error. Again, primitive boolean causes the problem. If I change to Boolean, code complete is correct. So I believe you've got it correct.

        Since it's 5/9 I'm guessing the code I have is wrong. It says I'm using:

        Groovy-Eclipse Feature 2.7.0.xx-20120504-1900-e37-RELEASE org.codehaus.groovy.eclipse.feature.feature.group Codehaus.org

        And for Groovy Compiler it's 1.8.6 same date.

        So I think it's not correct.

        Thanks.

        Show
        Brian Bonner added a comment - Ok, I updated with the snapshot update site. How can I verify I have the right code? I'm still seeing the error. Again, primitive boolean causes the problem. If I change to Boolean, code complete is correct. So I believe you've got it correct. Since it's 5/9 I'm guessing the code I have is wrong. It says I'm using: Groovy-Eclipse Feature 2.7.0.xx-20120504-1900-e37-RELEASE org.codehaus.groovy.eclipse.feature.feature.group Codehaus.org And for Groovy Compiler it's 1.8.6 same date. So I think it's not correct. Thanks.
        Hide
        Andrew Eisenberg (c) added a comment -

        Sorry, our CI server was not producing builds. I just pushed out the build that has the fix, so it should be available now.

        The plugin with the changes in it is the org.eclipse.jdt.groovy.core. This is the plugin that does the integration between the JDT compiler and the groovy compiler.

        Show
        Andrew Eisenberg (c) added a comment - Sorry, our CI server was not producing builds. I just pushed out the build that has the fix, so it should be available now. The plugin with the changes in it is the org.eclipse.jdt.groovy.core . This is the plugin that does the integration between the JDT compiler and the groovy compiler.
        Hide
        Brian Bonner added a comment -

        That explains why I couldn't find it Syncing up now.

        Show
        Brian Bonner added a comment - That explains why I couldn't find it Syncing up now.
        Hide
        Brian Bonner added a comment -

        That did the trick. It appears to code complete correctly now.

        Show
        Brian Bonner added a comment - That did the trick. It appears to code complete correctly now.
        Trevor Marshall (c) made changes -
        Workflow jira [ 44194 ] jira with Pivotal Tracker [ 64320 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        13h 42m 1 Andrew Eisenberg (c) 09/May/12 11:23 AM

          People

          • Assignee:
            Andrew Eisenberg (c)
            Reporter:
            Brian Bonner
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: