Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7049

Groovysh: Completion should suggest field notation rather than bean accessors

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.0-beta-4
    • Component/s: Groovysh
    • Labels:
      None

      Description

      currently for bean accessors, groovysh completion will rather suggest the accessors than the field type notation:
      groovy:000> class Foo

      {boolean foo}

      groovy:000> f = new Foo()
      groovy:000> f.<tab>
      getFoo() isFoo() setFoo(
      groovy:000> f.

      While this is a matter of programming taste, completion could aditionally offer foo in this case. This would also reduce visual clutter for classes with many such bean accessors.

      If the user has provided a prefix, such as:
      groovy:000> f.ge<tab>
      the getters should still appear

      Will try to make a PR so this can be tested inpractice.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tkruse Thibault Kruse
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: