Complete static methods and fields with the new IntelliJ IDEA 12 EAP build 122.29

Did you know how to quickly complete a static method call or a constant reference without writing the class name first? Just type some prefix and invoke Basic Code Completion (Ctrl+Space) twice (or Ctrl+Alt+Space once):

There are two problems though:

  1. The entire project is searched and there might be just plain too many completely unrelated suggestions, and it’s hard to search among them what you need.
  2. You may not remember the name of the member you want while knowing what it type should be.
Now we have a solution for these problems. It’s the plain old second SmartType Completion (Ctrl+Shift+Space). It now also scans the entire project for static methods and fields, but suggests only those whose type is suitable in the context:
This may be very handy with collection libraries like Guava:
You can try this in the new EAP: build 122.29. Of course, it contains other improvements as well: code completion has become faster in Java, Groovy extensions are now recognized in more cases, Extract Style refactoring for Android, etc. Simply download the build or “Check for updates” in the IDE itself.
This entry was posted in EAP Releases and tagged , . Bookmark the permalink.

10 Responses to Complete static methods and fields with the new IntelliJ IDEA 12 EAP build 122.29

  1. MuppetGate says:

    Just keeps getting better and better :-)

  2. Leda fun says:

    This update is broken Scala and Play plugins :(

  3. n0g00d says:

    Struts 2 bug (if my ActionClass extends ActionSupport and implements ServletRequestAware, ServletResponseAware, ServletContextAware, ApplicationAware)

    +

    SVN bug (update and/or commit)

  4. Peter Gromov says:

    The bug with class hierarchy (e.g. Struts 2) is found and will be fixed in the next EAP, sorry.
    As for the rest, please report that to YouTrack.

  5. Joseph says:

    Any Update on Playframework v2 support?

  6. someone says:

    Kotlin plugin does not works with this build.

  7. abreslav says:

    Kotlin update is coming soon.

  8. Eugen Martynov says:

    With new update I got all my projects in red.
    As example – IDEA complains about that java.lang.String is defined in two places.
    I’m developing for BlackBerry and I have dependency to RIM jar file and dependency to our core library.
    I could remove JSDK dependency and there are no complaints about duplicate class definition. But I have now issue with tests because I’m running them in JUnit and Mockito and it can’t be done without JSDK. If I add JSDK to unit test modules back I have now back complaints about duplicate modules.
    So I see only one solution – duplicate modules with same sources an different dependencies. And use one part of them in project edition and second part in unit test but I’s really big hassle. Any recommendations?

  9. Peter Gromov says:

    Eugen, please try a newer EAP, the problem should be fixed there

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">