How do I use IntelliJ to auto-complete method parameters?

后端 未结 4 1478
陌清茗
陌清茗 2020-12-08 01:53

A feature in Eclipse that I really miss is how you can auto-complete method parameters with currently in-scope variables. This feature will, with a single key combo (c

相关标签:
4条回答
  • 2020-12-08 02:31

    Control-Shift-Space (and the completion is based on type, not name)

    For more goodness: Help -> Default Keymap Reference

    0 讨论(0)
  • 2020-12-08 02:39

    There is also an IntelliJ plugin called 'kotlin-fill-class' that will fill in some default values automagically. Tested the latest snapshot version of the plugin with IntelliJ 2019.1 and it appears to be working.

    0 讨论(0)
  • 2020-12-08 02:44

    You might already know that IntelliJ IDEA has the CTRL+P shortcut (Windows) and CMD+P (OX X) that brings up a brief description of which parameters are passed to the method. It's very handy and saves a lot of time that otherwise would have been spent looking up the method declaration.

    0 讨论(0)
  • 2020-12-08 02:45

    IntelliJ IDEA 9 now supports what they call "super completion" which matches the behavior you are looking for and is available through their early access program.


    (source: jetbrains.com)

    IntelliJ IDEA 8 does not allow you to autocomplete more than one parameter at a time. You are forced to use Control-Shift-Space once for each parameter.

    0 讨论(0)
提交回复
热议问题