Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 (ctrl+space) fill in all method parameters. As long as my variables were named similarly to the method parameters, I never had a problem with this auto-complete. Is there a plugin or a native way to accomplish this in Intellij?

like image 886
user17854 Avatar asked Sep 18 '08 15:09

user17854


People also ask

How do I autocomplete in IntelliJ?

Start typing. By default, IntelliJ IDEA displays the code completion popup automatically as you type. If automatic completion is disabled, press Ctrl+Shift+Space or choose Code | Code Completion | Type-Matching from the main menu. If necessary, press Ctrl+Shift+Space once again.

Why Autocomplete is not working in IntelliJ?

I have tried the following according to this thread (Intellij IDEA CE 12 Android XML Code Completion not working): Go to File->Power Save Mode and disable it - it is off. Go to Preferences->Editor->Code Completion and check Autopopup code completion - this has been checked. Go to File->Invalidate Caches and restart.

What is autocomplete in IDE?

Autocompletion has to understand the syntax of a programming language to know how to provide smart suggestions. A handful of other important IDE features, such as finding references or jumping to a definition, are also language-dependent.

How do I show method arguments in IntelliJ?

In IDEA, clicks on the method name, press CTRL + Q to show the method signature on a pop up. Alternatively, press CTRL + P to show the available parameters.


1 Answers

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.

like image 143
Dmitry L Avatar answered Oct 01 '22 06:10

Dmitry L