idea annotation template settings

1. idea class annotation

   打开:file->setting->Editor->Filr and Code Templates->Includes->File Header 

        Class annotation template:

   /**  
    * @Title: ${file_name}
    * @Package ${package_name}
    * @Description: $ {all}
    * @author ceshi
    * @date ${DATE}${TIME}
    */

         

2. Method annotation

    Open file->setting->Editor->LiveTemplates, click the green + sign on the upper right, select Template Group and double-click, then a window will pop up, add a name at will, I added MyGroup here and click OK 

    Method annotation template:  

  /**
  * @Description: ${todo}
  * @param ${tags} 
  * @return ${return_type} 
  * @throws
  * @author ceshi
  * @date $date$ $time$ 
  */

   

  Next, configure as shown in the screenshot

 

click this

 Then select Everywhere

Finally, click the Edit variables button in the lower right corner, and then a window will pop up as shown in the screenshot

The annotation of the class method is to type the name you defined above the method of the class. Mine is add and then press tab, and the annotation will come out.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325525408&siteId=291194637