当前位置:网站首页>【IDEA】idea配置
【IDEA】idea配置
2022-08-04 16:08:00 【Learn Forever】
1.设置类注释
打开idea,左上角找到Preference,在左侧导航栏中找到File and Code Templates。
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
/**
*
*@author username(自行修改)
*@date ${YEAR}/${MONTH}/${DAY}
**/
public class ${NAME} {
}
2.设置方法注释
1、File–>Settings–>Editor–>Live Templates
2.新建组:命名为userDefine
3.新建模板:命名为*
4.设置生成注释的快捷键
5.设置模板
*
* $param$
* $return$
* @author username(自行修改)
* @date $date$ $time$
**/
6.设置模板的应用场景
点击模板页面最下方的警告,来设置将模板应用于那些场景,一般选择EveryWhere–>Java即可
7.设置参数的获取方式
选择右侧的Edit variables按钮
其中params变量的内容为:
groovyScript("def result = '';def params = \"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList(); for(i = 0; i < params.size(); i++) {if(params[i] != '')result+='* @param ' + params[i] + ((i < params.size() - 1) ? '\\r\\n ' : '')}; return result == '' ? null : '\\r\\n ' + result", methodParameters())
其中return变量的内容为:
groovyScript("return \"${_1}\" == 'void' ? null : '@return ' + \"${_1}\"", methodReturnType())
边栏推荐
猜你喜欢
B站回应HR称核心用户是Loser;微博回应宕机原因;Go 1.19 正式发布|极客头条
现代 ABAP 编程语言中的正则表达式
Task Computing【动态规划_牛客】
What is the difference between ITSM software and a work order system?
线上一次JVM FullGC搞得整晚都没睡,彻底崩溃
An article to answer what is the product library of the DevOps platform
DocuWare平台——用于文档管理的内容服务和工作流自动化的平台(上)
勒索软件的原理
花 30 美金请 AI 画家弄了个 logo,网友:画得非常好,下次别画了!
AAAI‘22 推荐系统论文梳理
随机推荐
Tomato assistant downloading tomatoes
一文解答DevOps平台的制品库是什么
inter-process communication
微信小程序获取年月日周及早上、中午、晚上
C#命令行解析工具
JVM Tuning-GC Fundamentals and Tuning Key Analysis
跟我学 UML 系统建模
To ensure that the communication mechanism
Analysis of Http-Sumggling Cache Vulnerability
成员变量与局部变量的区别有哪些
dotnet core 添加 SublimeText 编译插件
B站回应HR称核心用户是Loser;微博回应宕机原因;Go 1.19 正式发布|极客头条
吴恩达机器学习[13]-支持向量机
录音文件识别
使用百度EasyDL实现森林火灾预警识别
【打卡】广告-信息流跨域ctr预估(待更新)
Typora收费?搭建VS Code MarkDown写作环境
云存储硬核技术内幕——(9) 相见时难别亦难
No server is required, teach you to get real-time health code recognition with only 30 lines of code
What are the useful IT asset management platforms?