How to quickly find constructor(s) in IntelliJ IDEA?
10,914
Solution 1
You can use ctrl + F12. This will show all members of the current class in a popup window, then you can select the constructor easily.
Command + F12 on Mac
Solution 2
I generally use the "Parameter Info" Keymap to show all options for a constructor.
If you type out the initial skeleton (new ConstructorClass()) and place the cursor in the brackets, the Parameter Info command will show all possible parameters for all overloaded constructors. This also works for overloaded methods.
N.B. My IntelliJ settings have Ctrl+p as the keymap for "Parameter Info". You will have to check your settings for your mapping.
Related videos on Youtube
Author by
Eugene
Updated on September 15, 2022Comments
-
Eugene over 1 year
Is there way to quickly find constructors of a particular class in IntelliJ IDEA?
-
SMBiggs about 5 yearsI want to do this all the time! But sadly, if the two answers here are all we have, then we really don't have a solution (the given answers provide way more info than just the constructors, sigh).
-
-
Rocherlee almost 8 yearsNote: To see parameter of a constructor, need to place the cursor in the brackets, then Crtl+P
-
Jose Rui Santos over 7 yearsI love IntelliJ, but in this matter Eclipse makes a better job, as it displays a C icon for constructors.
-
Rustem Zakiev almost 6 yearscmd + F12 on Mac. Works in PhpStorm (typescript) too
-
studgeek almost 5 yearsYes, CLion needs to improve on providing C++ type info. It is missing several aspects that IntelliJ has for Java. There is a whole bunch of related feature requests here you can vote up - youtrack.jetbrains.com/issue/CPP-2884.
-
logbasex over 3 yearsconstructor display on top of the popup list.