CLion 2019.2 Help

Generate Menu

The Generate menu helps you quickly create standard code constructs in your code. Depending on the current context, the caret position, or selected code, CLion gives you a list of constructs to be generated.

In a *.cpp or header file, one can generate constructor or destructor, accessors, override or implement functions.

Create code constructs using the Generate menu

  1. Open the file where you are going to generate code and place the caret at the corresponding position, e.g. in the implementation of a class.

  2. Do one of the following:
    • On the main menu, choose Code | Generate.

    • Right-click the editor and choose Generate on the context menu.

    • Press Alt+Insert.

  3. In the Generate menu that is displayed in the editor, select the desired construct.

    Depending on the selected item, CLion either inserts the construct immediately or shows a dialog for additional input.

Last modified: 22 August 2019

See Also