Как создать конструктор в intellij idea

Обновлено: 06.05.2024

Создание и запуск первого Java-приложения (часть 1) Итак, установка JDK завершена, пакет создан, класс создан, время приступить к собственно написанию кода. После создания класса соответствующий ему файл HelloWorld.java открывается в редакторе. Обратите внимание на оператор пакета в начале файла, а также объявление класса. При создании класса, IntelliJ IDEA использует файл шаблона для класса Java. (IntelliJ IDEA предоставляет ряд предопределенных шаблонов для создания файлов различных типов. Дополнительные сведения см. в разделе File Templates в IntelliJ IDEA Help.) Также обратите внимание на желтую лампочку. Эта лампа указывает, что в IntelliJ IDEA есть предложения для текущего контекста. Нажмите на лампочку или ALT + ENTER, чтобы увидеть список доступных действий. В данный момент мы не собираемся выполнять действия, предложенные IntelliJ IDEA (такие действия называются intention actions - "действия-намерения", подробнее о них см. в разделе Intention Actions в IntelliJ IDEA Help.) Заметим, однако, что эта функция IntelliJ IDEA иногда может быть очень полезной. Наконец, есть маркеры сворачивания кода рядом с комментариями. Нажмите одну из них, чтобы свернуть соответствующий блок, если действительно не хотите видеть эту часть кода в данный момент. (Вы можете также поместить курсор в коде блока, а затем нажать сочетание клавиш CTRL + NumPad- или CTRL + NumPad+, чтобы свернуть или развернуть блок. Получить дополнительную информацию по сворачиванию кода можно в разделе Code Folding в IntelliJ IDEA Help.)

Написание кода для класса HelloWorld

Создание и запуск первого Java-приложения (часть 2) - 5

Итак, наконец этот момент настал. Код в конечном состоянии (как вы, наверное, знаете) будет выглядеть следующим образом: Объявление пакета и класса уже есть, теперь добавим недостающие пару строк. Поместите курсор в конец текущей строки, после знака <, и нажмите ENTER, чтобы начать новую строку (На самом деле, можно сделать проще: независимо от позиции курсора, нажатие клавиш SHIFT + ENTER начинает новую строку, сохраняя предыдущие строки без изменений).

Использование активного шаблона для метода Main()

Создание и запуск первого Java-приложения (часть 2) - 6

Строку: вполне можно и просто напечатать. Однако рекомендовал бы вам другой метод. Печатаем: psvm и нажимаем TAB. В результате получаем: В данном случае мы использовали активный шаблон генерации кода объекта. Активный шаблон имеет аббревиатуру- строку, определяющую шаблон (PSVM = public static void main в этом примере) и клавишу для вставки фрагмента в код (TAB в данном случае). Дополнительную информацию можно найти в разделе Live Templates в IntelliJ IDEA Help.

Использование автоматического завершения кода

Теперь пришло время добавить оставшиеся строки кода ( System.out.println ("Hello, World!"); ). Мы сделаем это с помощью операции автоматического завершения кода в IntelliJ IDEA. Печатаем: Sy Автоматическое завершение кода предлагает нам варианты: В данном случае вариант только один: System (java.lang) . Нажимаем ENTER, чтобы выбрать его. Печатаем точку и букву "о": .о Функция автоматического завершения кода снова предлагает нам варианты: Нажимаем ENTER, чтобы выбрать out. Печатаем: .printl Обратите внимание, как изменяется список вариантов в процессе ввода. Метод, который мы ищем — Println (String х) . Выбираем println(String x) . Код принимает следующий вид: Печатаем кавычки: " Как видите, вторые кавычки появляются автоматически, а курсор перемещается в место, где должен быть наш текст. Печатаем: Hello, World! Этап написания кода завершен.

Использование активного шаблона для Println ()

К слову, мы могли бы выполнить вызов Println() с помощью активного шаблона. Аббревиатура для соответствующего шаблона — Sout . а клавиша активации — TAB. Вы можете попробовать использовать этот шаблон в качестве дополнительного упражнения. (Если вы думаете, что с вас достаточно активных шаблоны, перейдите по созданию проекта). Удалите строку: Печатаем: sout и нажимаем TAB. Строка: добавляется автоматически, и курсор оказывается в скобках. Нам остается напечатать: Hello, World!

Строительство проекта

\out\production\ , в нашем случае, и папка

Создание и запуск первого Java-приложения (часть 2) - 17

и называются HelloWorld), вы увидите там структуру папок для пакета com.example.helloworld и HelloWorld.class файл в папке HelloWorld. Если вы хотите разобраться в строительстве приложения лучше, обратитесь к разделам IntelliJ IDEA Help: Build Process, Compilation Types, Configuring Module Compiler Output и Configuring Project Compiler Output.

IntelliJ IDEA provides multiple ways to generate common code constructs and recurring elements, which helps you increase productivity. These can be either file templates used when creating a new file, custom or predefined live templates that are applied differently based on the context, various wrappers, or automatic pairing of characters.

Additionally, IntelliJ IDEA provides code completion and Emmet support.

This topic describes ways to generate standard code constructs specific to Java: constructors, method overrides and implementations, getters and setters, and so on. From the main menu, select Code | Generate Alt+Insert to open the popup menu with available constructs that you can generate.

Here is a video that demonstrates how to generate various code constructs in IntelliJ IDEA:

Generate constructors

IntelliJ IDEA can generate a constructor that initializes specific class fields using values of corresponding arguments.

Generate a constructor for a class

On the Code menu, click Generate Alt+Insert .

In the Generate popup, click Constructor for Kotlin.

If the class contains fields, select the fields to be initialized by the constructor and click OK .

The following code fragment shows the result of generating a constructor for a class:

Generate delegation methods

IntelliJ IDEA can generate methods that delegate behavior to the fields or methods of your class. This approach makes it possible to give access to the data of a field or method without directly exposing this field or method.

Generate a delegation method for a class

On the Code menu, click Generate Alt+Insert .

In the Generate popup, click Delegate Methods .

Select the target field or method, and click OK .

Select the desired methods to be delegated and click OK .

The following code fragment shows the result of delegating the get(i) method of the Calendar class inside another class:

Generate equals() and hashCode() methods

The Java super class java.lang.Object provides two methods for comparing objects:

public boolean equals(Object obj) returns true if the object passed to it as the argument is equal to the object on which this method is invoked. By default, this means that two objects are stored in the same memory address.

public int hashCode() returns the hash code value of the object on which this method is invoked. The hash code must not change during one execution of the application but may change between executions.

It is generally necessary to override the hashCode() method if you override equals() because the contract for hashCode() is that it must produce the same result for objects that are equal. For more information, see the API specification for the Object class.

Generate equals() and hashCode() for a class

From the Code menu, click Generate Alt+Insert .

In the Generate popup, click equals() and hashCode() .

Select a velocity template from the Template list.

You can also click to open the Templates dialog, where you can select an existing template or create a custom template.

Select checkboxes if you want to accept subclasses and use getters during code generation.

Select the fields that should be used to determine equality, and click Next .

Select the fields to use for calculating the hash code value. You can choose only from fields that were selected on the previous step (for determining equality). Click Next .

Select the fields that contain non-null values. This optional step helps the generated code avoid checks for null and thus improves performance. Click Finish .

If the overrides for equals() and hashCode() methods already exist in the class, you will be prompted whether you want to delete them before generating new ones.

The following code fragment shows the result of overriding the equals() and hashCode() methods:

Generate getters and setters

IntelliJ IDEA can generate accessor and mutator methods ( getters and setters ) for the fields in your classes. Generated methods have only one argument, as required by the JavaBeans API.

The getter and setter method names are generated by IntelliJ IDEA according to your code generation naming preferences.

On the Code menu, click Generate Alt+Insert .

In the Generate popup, click one of the following:

Getter to generate accessor methods for getting the current values of class fields.

Setter to generate mutator methods for setting the values of class fields.

Getter and Setter to generate both accessor and mutator methods.

Select the fields to generate getters or setters for and click OK .

You can add a custom getter or setter method by clicking and accessing the Getter/Setter Templates dialog. If a field is not in the list, then the corresponding getter and setter methods are already defined for it.

The following code fragment shows the result of generating the getter and setter methods for a class with one field var :

Note for PHP

The following is only valid when the PHP plugin is installed and enabled.

In the PHP context, getters and setters are generated using the PHP Getter/Setter/Fluent setter file templates. By default, as specified in these templates, setters are generated with the set prefix, and getters with the is or get prefix according to the inferred property type – boolean or non-boolean . The prefix is the value of the $ variable in the default getter template. The templates are configured in the Code tab on the File and Code Templates.

Generate toString()

The toString() method of the Java super class java.lang.Object returns the string representation of the object. This method can be used to print any object to the standard output, for example, to quickly monitor the execution of your code. By default, toString() returns the name of the class followed by the hash code of the object. You can override it to return the values of the object's fields, for example, which can be more informative for your needs.

Override the toString() method for a class

On the Code menu, click Generate Alt+Insert .

In the Generate popup, click toString() .

Configure the following:

Select the template for generating the toString() method from the Template list.

Select the fields that you want to return in the generated toString() method. By default, all the available fields are selected. Click Select None to generate a toString() method that returns only the class name.

Select the Insert @Override checkbox if necessary.

Click the Settings button to open the toString() Generation Settings dialog. where you can tune the behavior and add custom templates.

If the toString() method is already defined in the class, by default, you will be prompted whether you would like to delete this method before proceeding. You can use the When method already exists group of options in the toString() Generation Settings dialog to change this behavior: either automatically replace existing method or generate a duplicating method.

The following code fragment shows the result of generating the toString() method for a class with several fields defined:

The following code inspections are related to the toString() method:

Class does not override 'toString()' method can be used to identify classes in which the toString() method is not defined. This inspection uses the exclude settings to ignore classes with fields that are not supposed to be dumped. An additional setting is to exclude certain classes using a regular expression matching their class name. As default, this is used to exclude any exception classes.

Field not used in 'toString()' method can be used to identify fields that are not dumped in the toString() method. For example, if you added new fields to a class, but forgot to add them to the toString() method. Change the severity of this inspection to show errors as warnings. This will highlight any unused fields in the editor and indicate their location as yellow markers on the scroll bar.

Custom code generation templates

Templates used for generating getters and setters, as well as equals() , hashCode() , and toString() methods are written in the Velocity template language. Although you can't modify predefined templates, you can add your own custom templates to implement necessary behavior.

IntelliJ IDEA provides the following variables for Velocity templates:

The following variables can be used in templates for generating getters and setters:

The current version of the Java Runtime Environment (JRE).

The current class.

Provides access to various code generation helper methods.

Provides the ability to format names according to the current code style.

Field for which getter or setter is generated.

The following variables can be used in templates for generating the toString() method:

The current version of the Java Runtime Environment (JRE).

The current class.

Provides access to various code generation helper methods.

Provides the ability to format names according to the current code style.

List of fields in the current class.

The following variables can be used in templates for generating the equals() method:

The current version of the Java Runtime Environment (JRE).

The current class.

Provides access to various code generation helper methods.

Provides the ability to format names according to the current code style.

List of fields in the current class.

Predefined name of the object on which the equals() method is called.

Predefined name of the equals() method parameter.

The name of the parameter in the equals() method of the superclass if applicable.

Option passed from the wizard.

Whether the superclass has equals() declared.

The following variables can be used in templates for generating the hashCode() method:

The current version of the Java Runtime Environment (JRE).

The current class.

Provides access to various code generation helper methods.

Provides the ability to format names according to the current code style.

List of fields in the current class.

Whether the superclass has hashCode() declared.

In IntelliJ IDEA Ultimate, the code completion popup is available for custom code generation template variables. Users of IntelliJ IDEA Community Edition can refer to the relevant source code.

Productivity tips

Use code completion

Depending on the current context, IntelliJ IDEA can suggest generating relevant code constructs in the code completion popup. For example, when the caret is inside a Java class, the completion popup will contain suggestions for adding getters, setters, equals() , hashCode() , and toString() methods.

We recommend putting IntelliJ IDEA into full screen to give you the maximum amount of space for your new Hello World project.

The project window shows all the directories and the files that make up our projects.

Project Window

Of course, you can use the mouse to navigate the Project window, but you can also use the arrow keys. You can also toggle the display of this tool window with Cmd+ 1 on macOS, or Alt+ 1 on Windows/Linux.

Creating Your Package and Class

Next, you're going to create the package and the class. Application packages are used to group together classes that belong to the same category or provide similar functionality. They are useful for organising large applications that might have hundreds of classes.

1) To create a new class, select the blue src folder and press Cmd+ N on macOS, or Alt+ Insert on Windows/Linux. Select Java Class from the popup.

New Java class

You can type a simple class name in here, but if you want to create a new class in a particular package, you can type the whole package path separated by dots, followed by the class name. For example com.example.helloworld.HelloWorld .

New package and class

Here, example might be your preferred domain and HelloWorld is the name of your Java class that IntelliJ IDEA will create.

When you press Enter IntelliJ IDEA will create the package you wanted, and the correct directory structure for this package that you specified. It has also created a new HelloWorld.java file and generated the basic contents of this class file. For example, the package statement and class declaration, the class has the same name as the file.

New project and class created in IntelliJ IDEA

Coding Your HelloWorld Class

1) You can move on to the next line in a class file by pressing Shift+ Enter. This moves the caret to the next line in the correct position and won't break the previous line.

2) To create the standard Java main method, type main . IntelliJ IDEA displays a live template that you can use to generate the full code construct and save a lot of time. You can also use Cmd+ J on macOS, or Ctrl+ J on Windows/Linux to see all the Live Templates in IntelliJ IDEA that are valid for the current context.

Note: Pressing Escape will always close a drop-down or dialogue without making any changes.

Main method live template

3) Press Enter to select it. IntelliJ IDEA will generate the rest of the code for you.

Main method created

4) Now, you need to call a method that prints some text to the standard system output.

IntelliJ IDEA offers you code completion. If you type Sy you will see a drop-down of likely classes you might want to call. You want System so you can press Control+ dot on the highlighted option.

System using code completion

Note: It's case-sensitive, typing in sy rather than Sy will give you different results!

5) Now type o IntelliJ IDEA will suggest you want to use out as the next function. IntelliJ IDEA is showing you a list of accessible fields and methods on the System class. Those that start with the letter o are listed first, followed by other methods and fields that contain the letter o .

6) press Control+dot and this time IntelliJ IDEA will suggest println . Press Enter to select it.

7) IntelliJ IDEA will also place the caret in the brackets, so you can provide the argument to the method. Type in a quote mark " and IntelliJ IDEA will close the quote mark for you. You can now type your text, Hello World in between the quotes.

Hello World statement

Note: Instead of the above steps, you can also type sout to see a live template that will create the code construct for you as well, however we wanted to show you code completion!

Congratulations, you've just created your first Java application! Java files like this one can be compiled into bytecode and run in IntelliJ IDEA. Let's take a look at that in the next step.

Создание проекта в IntelliJ IDEA - 1

IntelliJ IDEA и аналогичные ей среды разработки — одни из первых инструментов, которые нужно освоить начинающему программисту. В этом материале рассмотрим установку и настройку ПО, а также порядок создания проекта в IntelliJ IDEA.

Что такое IntelliJ IDEA

Условия использования IntelliJ IDEA

  • Community Edition
  • Ultimate Edition
  • JavaScript
  • TypeScript
  • SQL
  • CSS, LESS, Sass, Stylus
  • CoffeeScript
  • ActionScript
  • XSL, XPath
  • Ruby, JRuby (через плагин)
  • PHP (через плагин)
  • Go (через плагин)
  • Java
  • Groovy
  • Kotlin
  • Scala (через плагин)
  • Python, Jython (через плагин)
  • Dart (через плагин)
  • Erlang (через плагин)
  • XML, JSON, YAML
  • AsciiDoc, Markdown (через плагины)
  • Spring (Spring MVC, Spring Boot, Spring Integration, Spring Security and others)
  • Java EE (JSF, JAX-RS, CDI, JPA, etc)
  • Grails
  • GWT, Vaadin
  • Play (через плагин)
  • Thymeleaf, Freemarker, Velocity, Tapestry
  • Struts, AspectJ, JBoss Seam, OSGI
  • React
  • AngularJS (через плагин)
  • Node.js (через плагин)
  • Apache Flex, Adobe AIR
  • Rails, Ruby Motion (через плагин)
  • Django, Flask, Pyramid (через плагин)
  • Drupal, Wordpress, Laravel (через плагин)
  • Android (включает функциональность Android Studio)
  • Swing (incl. UI Designer)
  • JavaFX
  • Team Foundation Server
  • Perforce
  • Git, GitHub
  • Subversion
  • Mercurial
  • CVS
  • Tomcat
  • TomEE
  • Google App Engine and other clouds (через плагины)
  • GlassFish
  • JBoss, WildFly
  • WebLogic
  • WebSphere, Liberty
  • Geronimo
  • Resin
  • Jetty
  • Virgo
  • Kubernetes (через плагин)
  • Docker, Docker Compose
  • NPM (через плагин)
  • Webpack
  • Gulp
  • Grunt
  • Maven
  • Gradle
  • SBT
  • Ant
  • Gant
  • Ivy (через плагин)
  • Database Tools
  • Diagrams (UML, Dependencies, и т.д.)
  • Dependency Structure Matrix
  • Detecting Duplicates
  • Settings synchronization via JetBrains Account
  • REST Client
  • Darcula (темная тема)
  • Debugger
  • Decompiler
  • Bytecode Viewer
  • Unit Tests Runner (JUnit, TestNG, Spock; Cucumber, ScalaTest, spec2, etc)
  • Интеграция с баг-трекинговыми системами (YouTrack, JIRA, GitHub, TFS, Lighthouse, Pivotal Tracker, Redmine, Trac, и т.д)
  • Поддержка 24/7
  • Баг-трекинговая система и форумы

Преимущества InteliJ IDEA

Данная IDE помогает максимизировать эффективность разработчика. Забота об эргономике среды разработки прослеживается в каждом аспекте. Интерфейс среды спроектирован так, что большую часть времени разработчик видит только редактор кода: Кнопки, активирующие дополнительные инструменты, расположены на боковых и нижней панелях экрана. Каждый инструмент можно быстро отобразить или скрыть: В IntelliJ IDEA практически каждое действие можно выполнить через определенное сочетание клавиш. Разработчик может сам назначать новые и менять старые сочетания клавиш для частых действий. В интерфейсе IntelliJ IDEA в каждой древовидной структуре, списке или всплывающем окне, будь это дерево проекта или же окно настроек среды разработки, есть навигация и поиск. Достаточно сфокусироваться на нужном месте и начать вводить искомый текст: IntelliJ IDEA удобна при написании кода и его отладке. Дебаггер IDEA показывает значения переменных прямо в коде. И каждый раз, когда переменная изменяет свое значение, она подсвечивается дебаггером: В среде разработки есть несколько тем оформления. По умолчанию доступны две темы — светлая и темная. Начиная с версии 2019.1, темы оформления можно кастомизировать и загружать новые через плагин:

Инструменты для работы с кодом в IntelliJ IDEA

  • Поиск класса по имени
  • Поиск файла или директории по имени
  • Поиск по проекту
  • Поиск по модулю
  • Поиск по директории
  • Поиск по области, среди:
    • файлов проекта
    • тестовых файлов проекта
    • открытых файлов
    • недавно просмотренных файлов
    • недавно измененных файлов
    • и т. д.

    Недостатки среды разработки

    Все вышеперечисленное относится к плюсам IntelliJ IDEA. Однако, как и любой программный продукт, у нее есть и минусы. IntelliJ IDEA разрабатывается с 2001 года. У этого крупного программного продукта — большое количество исходного кода. Как следствие, при работе с IDEA можно наткнуться на баги. IntelliJ IDEA требовательна к ресурсам. По умолчанию она выделяет до 512 Мб на x86 и до 768 Мб на x64. Но порой, например, при крупном рефакторинге, даже этого может быть недостаточно. Стоит сказать, что эти значения могут быть увеличены. Однако при этом IDEA будет сжирать еще больше ресурсов системы. При работе с большими файлами, например, с классами в несколько тысяч строк кода IDEA может заметно подтормаживать. Компания JetBrains регулярно выпускает обновления к IntelliJ IDEA. Очень редко, при обновлении IDEA, может что-то поломаться.

    Idea hot keys - 1

    Обычно в таких постах люди берут документацию от JetBrains и просто вываливают все комбинации горячих клавиш без разбора. Да, я тоже хранил такие странички в закладках, и да я тоже их больше не открывал. Но мы пойдем своим путем. Я расскажу только о том, чем сам пользуюсь, расскажу чем они помогают. Некоторые банальны, возможно вы все это уже знаете, тогда просто ставь лайк =) Я начну с самых нужных мне комбинаций горячих клавиш и пойду к самым банальным, но используемым мною.

    Погнали:

    Alt + F8 — evaluate expression окно. Очень полезная вещь, как узнал про неё, пользовался всегда. Сейчас на работе за соседним столом, на мониторе, висит стикер, на котором написано «Alt+F8». В данном окошке можно выполнять все, что угодно. Например, если у вас есть проблемное место в коде и 10 вариантов как решить его. Вместо того, чтобы 10 раз запускать код, доходите до него в дебаге, открываете окно evaluate expression и прогоняете все варианты PROFIT.

    Ctrl + P — показывает вам список принимаемых методом параметров. Когда первый раз узнал про эту комбинацию, очень радовался т.к. приходилось переписывать вызов метода, чтобы увидеть список параметров. Так же если вы знаете все параметры и их много, это окошко постоянно выскакивает и мешает? Ctrl+P уберет его =)

    Idea hot keys - 3

    Ctrl + Q — во вложенном окне покажет документацию к методу, чтобы не бегать в исходный код. Помогает почитать про принимаемые параметры и про возвращаемое значение.

    Idea hot keys - 4

    В туже степь Ctrl + B — переход в исходный код класса\метода либо переход к объявлению переменной. Alt + F7 — покажет, где используется переменная\метод, альтернатива Ctrl+F. Пользуюсь редко, но сейчас вспомнил.

    Idea hot keys - 5

    Shift + Shift (Double Shift, 2 раза подряд быстро нажать shift) — поиск всего и везде (ищет классы и файлы но не методы). Когда ты помнишь, что где-то что-то видел и даже пару букв из названия помнишь. Это окошко поищет за тебя. При поиске классов можно указывать часть имени или только первые 2 буквы. Например, BuRe найдет BufferedReader.

    Ctrl + Shift + T – создание тестового класса. Если используется система сборки, то создаст класс в соответствии с правилами сборщика. Если не используется, то создаст рядом.

    Idea hot keys - 7

    Idea hot keys - 8

    Ctrl + Shift + Space – умный комплишен, предлагает вам варианты подстановки значений с учетом контекста. Какой бы умный ни был, я вроде сам неплохо контекст понимаю, но иногда выручает.

    Idea hot keys - 9

    Ctrl + Shift + A – поиск действия. Если вы вдруг забыли hot keys для действия, но помните его имя, можете его найти. Найти можно вообще любое действие и запустить, например дебаг.

    Оригинальные комбинации горячих клавиш закончились, сейчас пойдут банальные (причем без картинок): Ctrl + Alt + V – если вы написали, что-то и надо положить это в переменную, нажимаете эти клавиши и идея сама выведет тип + задаст стандартное имя. Очень помогает, когда ты запутался и не знаешь, какой тип переменной тебе нужен. Так же работает, если дописать в конец выражения ".var" и нажать Tab или Enter после нажатия Tab будет: Ctrl + Alt + M – вынесет выделенный кусок кода в отдельный метод, hot key для рефакторинга очень полезный. Alt + Enter – комплишен для решения любых проблем. На самом деле выручает почти всегда. Если есть какая-либо ошибка компиляции, если я не знаю точного решения, первым делом смотрю, что предложит идея. Alt + Insert – автогенерация всего и вся, методов, конструкторов, классов… (тут будет картинка, она снизу)

    Idea hot keys - 12

    Ctrl + O –переопределение методов родителя Ctrl + K – при работе с гитом – коммит Ctrl + Shift + K – при работе с гитом - пуш Ctrl + Alt + S – настройки IDEA Ctrl + Alt + Shit + S – настройки проекта На этом, пожалуй, все. Я не считаю, что мышка это зло и настоящий кодер пользуется только клавиатурой. Да наверно это иногда удобно. Но часто приходиться лезть в браузер, что-то искать и возвращаться. Если надо внести мелкие изменения или просто что-то посмотреть, лень тянуться к клаве, если мышка уже в руке. Но те, что я написал заменяют длинную последовательность действий на одно нажатие. Кстати для идеи есть плагин, которые поможет вам освоить hotkeys. Каждый раз, когда вы будете использовать мышку, он будет показывать надоедливую надпись. Там будет написано, какую комбинацию горячих клавиш надо было использовать и сколько раз вы пользовались мышкой. Мне он через неделю надоел =) Плагин называется Key Promoter X, найти можно в настройках идеи (вы же помните, как туда попасть?). Видео от JetBrains откуда я впервые узнал о некоторых комбинациях. Пересматривал несколько раз, за раз все не унесешь. И да последняя комбинация, которая пригодилась мне однажды. Ctrl + Shift + U - смена регистра у слова. Например, если переменная теперь константа, не переписывать имя, а использовать Ctrl + Shift + U

    Читайте также: