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

Peter Gromov

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.
Comments below can no longer be edited.

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

  1. MuppetGate says:

    August 9, 2012

    Just keeps getting better and better 🙂

  2. Leda fun says:

    August 9, 2012

    This update is broken Scala and Play plugins 🙁

  3. n0g00d says:

    August 10, 2012

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


    SVN bug (update and/or commit)

  4. Peter Gromov says:

    August 10, 2012

    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:

    August 10, 2012

    Any Update on Playframework v2 support?

  6. someone says:

    August 11, 2012

    Kotlin plugin does not works with this build.

  7. abreslav says:

    August 13, 2012

    Kotlin update is coming soon.

  8. Eugen Martynov says:

    August 16, 2012

    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:

    August 27, 2012

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


Subscribe for updates