如何修复或更正“默认文件模板”? IntelliJ Idea中的警告 [英] How do I fix or correct the "Default File Template" warning in IntelliJ Idea

查看:322
本文介绍了如何修复或更正“默认文件模板”? IntelliJ Idea中的警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

IntelliJ Idea:2016.1
Windows 10 Pro

IntelliJ Idea: 2016.1 Windows 10 Pro

当我在新项目中创建新项目或新类时,IntelliJ有用地包含一个默认标题包含我的姓名和日期。但是,它还会突出显示代码并使用默认文件模板显示有关文件的警告。它提出了两种纠正代码的方法。通过编辑模板或将其替换为实际的文件模板。但是,两种选择都不满足警告;也不会手动替换标题的内容。我无法找到摆脱它的方法。

When I create a new project or a new class in a new project, IntelliJ helpfully includes a default header containing my name and the date. However, it also highlights the code and displays a warning about the file using a "Default File Template". It suggests two ways to correct the code. Either by editing the template or by replacing it with an actual file template. However, neither option satisfies the warning; nor does manually replacing the contents of the header. I can't figure out a way to get rid of it.

我知道我可以取消警告,但我更愿意更正或修正它。

I know that I can suppress the warning, but I would prefer to actually correct or fix it.

任何想法?

推荐答案

只需在具有名称和日期的默认模板语句后添加一个新行。
Intellij将新行视为文档的一部分,然后停止投诉。

更新

Just add a new line after Default Template statement which has name and date. Intellij considers that new line as part of documentation, and then stops complaining.
Update

赞这个:

/**
 * Created by YourName on 2017/06/11.
 * THIS LINE
 */

这篇关于如何修复或更正“默认文件模板”? IntelliJ Idea中的警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆