GRECLIPSE
  1. GRECLIPSE
  2. GRECLIPSE-987

Code completion enters variable name based on the ClassName (like in java editor)

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.1Release
    • Fix Version/s: None
    • Component/s: Content Assist
    • Labels:
    • Number of attachments :
      0

      Description

      E.g. In java code completion:
      1.Str CTRL+SPACE => String and import (works most of the times in Groovy files :S )
      2.String CTRL+SPACE => string
      => endresult in String string

      If you do have it in the Java editor I expected it to be in the Groovy editor as well since it is such a nice feature!

        Issue Links

          Activity

          Andrew Eisenberg made changes -
          Field Original Value New Value
          Affects Version/s 2.1.1Release [ 16772 ]
          Andrew Eisenberg made changes -
          Assignee Andrew Eisenberg [ werdna ]
          Hide
          Andrew Eisenberg added a comment -

          Do you often name your variables of type String string? Or is there something more fundamental that you are trying to get at here?

          Show
          Andrew Eisenberg added a comment - Do you often name your variables of type String string? Or is there something more fundamental that you are trying to get at here?
          Hide
          Timothy Freyne added a comment -

          For String it is indeed strange but for project specific own classes it makes more sense.
          E.g.:
          Book book
          Customer customer
          Appointment appointment
          List<Customer> customers

          In Java editor this stuff all works great and is a joy to use it.

          Show
          Timothy Freyne added a comment - For String it is indeed strange but for project specific own classes it makes more sense. E.g.: Book book Customer customer Appointment appointment List<Customer> customers In Java editor this stuff all works great and is a joy to use it.
          Andrew Eisenberg made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          Andrew Eisenberg added a comment -

          Let's see what I can do here...

          Show
          Andrew Eisenberg added a comment - Let's see what I can do here...
          Hide
          Andrew Eisenberg added a comment -

          Now working for fields. I will see what I can do for variable declarations.

          Show
          Andrew Eisenberg added a comment - Now working for fields. I will see what I can do for variable declarations.
          Andrew Eisenberg made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          Andrew Eisenberg made changes -
          Labels wish
          Andrew Eisenberg made changes -
          Link This issue is duplicated by GRECLIPSE-1416 [ GRECLIPSE-1416 ]
          Hide
          Andrew Eisenberg added a comment -

          I'll try to get to this for 2.7.0.

          Show
          Andrew Eisenberg added a comment - I'll try to get to this for 2.7.0.
          Andrew Eisenberg made changes -
          Fix Version/s 2.7.0.Release [ 18349 ]
          Andrew Eisenberg made changes -
          Fix Version/s 2.7.1.Release [ 18617 ]
          Fix Version/s 2.7.0.Release [ 18349 ]
          Hide
          Mauro Molinari added a comment -

          Another use case:

          String my| <= CTRL + SPACE here
             => brings String myString
          ThreadLocal counter| <= CTRL + SPACE here
             => brings a dialog to choose between counterLocal and counterThreadLocal
          

          Once again, the examples do not reveal how useful this can be in real-world cases.

          Show
          Mauro Molinari added a comment - Another use case: String my| <= CTRL + SPACE here => brings String myString ThreadLocal counter| <= CTRL + SPACE here => brings a dialog to choose between counterLocal and counterThreadLocal Once again, the examples do not reveal how useful this can be in real-world cases.
          Hide
          Timothy Freyne added a comment -

          Mauro,
          In real world cases you have a complex business-model. Order, Customer, OrderItem, Book, Address,... Maybe a CustomerService and a CustomerRepository... You would type
          Customer | <= CTRL + SPACE here
          => brings Customer customer
          CustomerService | <= CTRL + SPACE here
          => brings a dialog to choose between customerService and service
          List<Customer> | <= CTRL + SPACE here
          => brings a dialog to choose between customers and customerList and list
          Check out how tyne Eclipse Java editor does this. Check out how IntelliJ does this for Groovy already. The added value and usefulness is in a larger context than proposed here in in this simple examples like: String | <= CTRL + SPACE here => brings String string

          Additionally the Java editor goes a bit further and does this:
          Customer | <= CTRL + SPACE here => brings Customer customer
          The further type = new | <= CTRL + SPACE brings up all the Constructors for the Customer =>
          resulting in final Customer customer = new Customer();

          Show
          Timothy Freyne added a comment - Mauro, In real world cases you have a complex business-model. Order, Customer, OrderItem, Book, Address,... Maybe a CustomerService and a CustomerRepository... You would type Customer | <= CTRL + SPACE here => brings Customer customer CustomerService | <= CTRL + SPACE here => brings a dialog to choose between customerService and service List<Customer> | <= CTRL + SPACE here => brings a dialog to choose between customers and customerList and list Check out how tyne Eclipse Java editor does this. Check out how IntelliJ does this for Groovy already. The added value and usefulness is in a larger context than proposed here in in this simple examples like: String | <= CTRL + SPACE here => brings String string Additionally the Java editor goes a bit further and does this: Customer | <= CTRL + SPACE here => brings Customer customer The further type = new | <= CTRL + SPACE brings up all the Constructors for the Customer => resulting in final Customer customer = new Customer();
          Andrew Eisenberg made changes -
          Fix Version/s 2.7.2.Release [ 18821 ]
          Fix Version/s 2.7.1.Release [ 18617 ]
          Andrew Eisenberg made changes -
          Fix Version/s 2.8.0.Release [ 18618 ]
          Fix Version/s 2.7.2.Release [ 18821 ]
          Andrew Eisenberg made changes -
          Fix Version/s 2.9.0.Release [ 19323 ]
          Fix Version/s 2.8.0.Release [ 18618 ]
          Kris De Volder made changes -
          Assignee Andrew Eisenberg [ werdna ]
          Kris De Volder made changes -
          Fix Version/s 2.9.0.Release [ 19323 ]
          Denis Murashev made changes -
          Labels wish triaged wish

            People

            • Assignee:
              Unassigned
              Reporter:
              Timothy Freyne
            • Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: