Code completion for static imports

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Code completion for static imports

Jayet, Patrick
Hi all,

I noticed that code completion is not available for static methods imported statically in a Groovy script or class. Here is an example.

I define the following class Foo with a static method in its own file:

  class Foo {
    static void doIt() {println "do it!"}
  }

I then define a script Bar.groovy as follows:

  import static Foo.*

  // script content

In the script content, the method doIt() from Foo is not available as proposal when I press on ctrl + space(or if I type 'd' + ctrl + space). The same applies for a Groovy class within a method.

Is this a bug?

Thanks in advance.
Cheers,

Patrick


P.S. Anyone from Greclipse coming to the Eclipse Summit Europe next week in Germany? I'll be there.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Code completion for static imports

Andrew Eisenberg
That's correct.  This is not yet supported.  See:

http://jira.codehaus.org/browse/GRECLIPSE-832

On Fri, Oct 29, 2010 at 8:18 AM, Jayet, Patrick <[hidden email]> wrote:

> Hi all,
>
> I noticed that code completion is not available for static methods imported statically in a Groovy script or class. Here is an example.
>
> I define the following class Foo with a static method in its own file:
>
>  class Foo {
>    static void doIt() {println "do it!"}
>  }
>
> I then define a script Bar.groovy as follows:
>
>  import static Foo.*
>
>  // script content
>
> In the script content, the method doIt() from Foo is not available as proposal when I press on ctrl + space(or if I type 'd' + ctrl + space). The same applies for a Groovy class within a method.
>
> Is this a bug?
>
> Thanks in advance.
> Cheers,
>
> Patrick
>
>
> P.S. Anyone from Greclipse coming to the Eclipse Summit Europe next week in Germany? I'll be there.
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email