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.

Share:
10,914

Related videos on Youtube

Eugene
Author by

Eugene

Updated on September 15, 2022

Comments

  • Eugene
    Eugene over 1 year

    Is there way to quickly find constructors of a particular class in IntelliJ IDEA?

    • SMBiggs
      SMBiggs about 5 years
      I 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
    Rocherlee almost 8 years
    Note: To see parameter of a constructor, need to place the cursor in the brackets, then Crtl+P
  • Jose Rui Santos
    Jose Rui Santos over 7 years
    I love IntelliJ, but in this matter Eclipse makes a better job, as it displays a C icon for constructors.
  • Rustem Zakiev
    Rustem Zakiev almost 6 years
    cmd + F12 on Mac. Works in PhpStorm (typescript) too
  • studgeek
    studgeek almost 5 years
    Yes, 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
    logbasex over 3 years
    constructor display on top of the popup list.