Idea2018 generation method annotation shortcut key settings (with annotation template)

Click on File -"settings -" Editor -"LiveTemplates -" on the top, click the plus sign on the right, select the template group to create a new template group, and then left click to select the template group you created (the template group is called java here) and click the plus sign on the right to select template-"then as shown below

1. Custom shortcut key q

2. Click on the blue font defined at the bottom, and then check all, or only check the class, because the comment is in the java class, click change to modify it if it is not selected

3. Enter the following in

**
*@Description $description$
*@Param $params$
*@Return $returns$
*@Author Mr.Ren
*@Date $date$
*@Time $time$
*/

4. Click , in Expression, check the following options (the input by yourself is useless)

5. The results are shown as follows, click apply -》ok

6. Place the cursor on the method line, and /+q+Tab can generate method comments (the template abbreviation I set here is q)

The effect is as follows (Enter the description of the method after the description, otherwise it will prompt you what)

Guess you like

Origin blog.csdn.net/JavaCoder_juejue/article/details/82730819