Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij code completion, showing method/constructor parameter types and variable names

I find this extremely annoying that you often do not get help with figuring out the parameter signatures of methods and contructors when you have already written the first parameter.

Instead Intellij will show the variables available to you in your context. This is good, but not the first prio. I want to see the signature of the method/constructor as well.

This has the consequence that you always have to keep deleting and CTRL + SPACE to see the signature.

Is there a way around this issue?

like image 422
mjs Avatar asked Oct 29 '14 10:10

mjs


People also ask

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.

How do I enable autocomplete in IntelliJ?

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 is IntelliJ autocomplete not working?

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.

How do I list all methods in IntelliJ?

By default, IntelliJ IDEA shows all classes, methods, and other elements of the current file. To toggle the elements you want to show, click the corresponding buttons on the Structure tool window toolbar. to show class fields. to have protected class members shown in the tree.


2 Answers

You don't have to press Ctrl+P, you can configure IDEA to always show this information:

Go to Settings > Editor > General > Code Completion

Select the Show full signatures and Autopopup in (ms:) boxes.

Intellij Idea - Configure-Editor-Code-Completion

like image 160
Software Engineer Avatar answered Oct 06 '22 00:10

Software Engineer


You can press Ctrl+P to show the signature(s) of the method/constructor, see this link for more details:

https://www.jetbrains.com/idea/webhelp/viewing-method-parameter-information.html

like image 36
Bohuslav Burghardt Avatar answered Oct 06 '22 00:10

Bohuslav Burghardt