IntelliJ idea for MAC shortcut set rollup

Source: Internet
Author: User

Add Comment

To add comments to the Java code in IntelliJ idea, you first need to configure the comment template, and then use the template shortcut to generate the comment.

The following sections are described in [configuration template], [template use]

--------------------------------------------Gorgeous split-line--------------------------------------------

Configure templates

First find the place to configure the template preperences->live Templates

The next thing to do is create a template.

1 click [Right Plus] Select second item, create Group, group name MyGroup

2 Click [Right Plus] Select the first item, add the template to the group, add

Template content

Template Text fill in the following content

/** * * $params $* @Author: tianminghai* @Date: $time $ $date $ */

Click Edit variables to configure the variable

Params Configuration Expression Code snippet

Groovyscript ("Def result="; def params=\ "${_1}\". ReplaceAll (' [\\\\[|\\\\]|\\\\s] ', '). Split (', '). ToList (); for (i = 0; i < params.size (); i++) {result+= ' * @Param ' + params[i] + ((I < Params.size ()-1)? ' \\n\\b ': ')}; return result ", Methodparameters ())

This is the template creation complete

--------------------------------------------Gorgeous split-line--------------------------------------------

Template use

Enter add inside the function or outside the class, and then click Tab (Note that the Add input location is within the method and the parameter is displayed)

The effect is as follows

PS: The upper margin just can input method introduction

IntelliJ idea for MAC shortcut set rollup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.