当前位置:网站首页>【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())

边栏推荐
- It took half a month to finally make a collection of high-frequency interview questions of first-tier manufacturers
- 【Jprofile 11.0 安装】
- inter-process communication
- 我说MySQL联合索引遵循最左前缀匹配原则,面试官让我回去等通知
- 面了三十个人,说说真实感受
- 07-输入输出系统
- DocuWare平台——用于文档管理的内容服务和工作流自动化的平台(上)
- 【愚公系列】2022年07月 Go教学课程 028-函数小结案例(通讯录)
- Roslyn 在多开发框架让 msbuild 的 Target 仅运行一次
- MetaAI科学家解读最新模型:200+语言互译,扩充千倍翻译数据,全球元宇宙用户自由交流
猜你喜欢
随机推荐
不需要服务器,教你仅用30行代码搞定实时健康码识别
Pulsar消费者处理不当导致的消息积压问题
我说MySQL联合索引遵循最左前缀匹配原则,面试官让我回去等通知
测试零基础如何进入大厂?一场面试教会你(附面试题解析)
吴恩达机器学习[9]-神经网络学习
张乐:研发效能的黄金三角及需求与敏捷协作领域的实践
jasmine.any(Function) 的一个使用场景
Real-Time Rendering 4th related resource arrangement (no credit required)
A detailed explanation of what is software deployment
The electromagnetic compatibility EMC protection study notes
面了三十个人,说说真实感受
"Research Report on the Development of Global Unicorn Enterprises in the First Half of 2022" released - DEMO WORLD World Innovation Summit ended successfully
《2022 年上半年全球独角兽企业发展研究报告》发布——DEMO WORLD世界创新峰会圆满落幕
Projector reached the party benefits 】 【 beginners entry - brightness projection and curtain selection - from entry to the master
SAP HANA Schemas 和 HDI Containers
花 30 美金请 AI 画家弄了个 logo,网友:画得非常好,下次别画了!
dot net core 使用 usb
What is the difference between member variable and local variable
Xi'an Zongheng Information × JNPF: Adapt to the characteristics of Chinese enterprises, fully integrate the cost management and control system
游戏云服务器配置怎么选合理?









