GRECLIPSE
  1. GRECLIPSE
  2. GRECLIPSE-1139

Content assist for closure arguments

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.1Release
    • Fix Version/s: 2.5.2.Release
    • Component/s: Content Assist
    • Labels:
      None
    • Number of attachments :
      0

      Description

      It would be nice to be able to get content assist for the closure's arguments at the invocation point f(1,2) in the following example:

      def f = { int x, int y -> }
      
      f(1,2) // Content assist arguments
      

        Issue Links

          Activity

          Hide
          Andrew Eisenberg added a comment -

          It is a different thing if the target closure of the content assist is a field or a local variable.

          Show
          Andrew Eisenberg added a comment - It is a different thing if the target closure of the content assist is a field or a local variable.
          Hide
          Andrew Eisenberg added a comment -

          I have a solution that works for field proposals, but not for local variable proposals. I am going to write up some tests, close this issue and open a new one for local variable proposals.

          That one will be harder since at the point of proposing, we don't have inferred type information for local variables.

          Show
          Andrew Eisenberg added a comment - I have a solution that works for field proposals, but not for local variable proposals. I am going to write up some tests, close this issue and open a new one for local variable proposals. That one will be harder since at the point of proposing, we don't have inferred type information for local variables.
          Hide
          Bob Tiernay added a comment -

          Awesome! Great work Andrew

          Show
          Bob Tiernay added a comment - Awesome! Great work Andrew
          Hide
          Andrew Eisenberg added a comment -

          This issue is specifically about local variables and closures.

          Show
          Andrew Eisenberg added a comment - This issue is specifically about local variables and closures.
          Hide
          Bob Tiernay added a comment -

          In the following example:

          new C().c(i)
          
          class C {
             def c = { int i ->
                println i
             } 
          }
          

          The type of c is not inferred, but it has content assist for the argument i. It would be nice if type inferencing could detect the fact that it is a Closure since content assist seems to already know this.

          Show
          Bob Tiernay added a comment - In the following example: new C().c(i) class C { def c = { int i -> println i } } The type of c is not inferred, but it has content assist for the argument i . It would be nice if type inferencing could detect the fact that it is a Closure since content assist seems to already know this.
          Hide
          Bob Tiernay added a comment -

          In the following example:

          new C().c(i)
          
          class C {
             def c = { int i ->
                println i
             } 
          }
          

          The type of c is not inferred, but it has content assist for the argument i. It would be nice if type inferencing could detect the fact that it is a Closure since content assist seems to already know this.

          Show
          Bob Tiernay added a comment - In the following example: new C().c(i) class C { def c = { int i -> println i } } The type of c is not inferred, but it has content assist for the argument i . It would be nice if type inferencing could detect the fact that it is a Closure since content assist seems to already know this.
          Hide
          Andrew Eisenberg added a comment -

          Created GRECLIPSE-1170 because this is a more general issue and might be solvable in a different way.

          Show
          Andrew Eisenberg added a comment - Created GRECLIPSE-1170 because this is a more general issue and might be solvable in a different way.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: