[英]Something like #warning directive for Java?
In my project I have something like final boolean Debug.USE_DEBUG_MODE
and I'm then always forgetting to switch it back to false
. 在我的项目中,我有类似于final boolean Debug.USE_DEBUG_MODE
东西,然后我总是忘记将其切换回false
。 I wonder if I can put something similar to the #warning
C++ directive so I don't forget to change the code back. 我想知道我是否可以添加类似于#warning
C ++指令的内容,所以我不会忘记更改代码。
You can use the //TODO Change this later
Task Tag in eclipse and configure Eclipse to display a compile-time warning for all TODO
s. 您可以使用//TODO Change this later
在eclipse中//TODO Change this later
任务标记,并配置Eclipse以显示所有TODO
的编译时警告。
public static void main(String[] args) {
//TODO Change this line before final build.
String mode = "DEV"
}
You can see all such Task Tags collectively, in one place by doing Window > Show View > Markers
. 您可以通过“ Window > Show View > Markers
在一个位置集中查看所有此类任务Window > Show View > Markers
。
Note that there are others too, like FIXME
, XXX
. 请注意,还有其他一些,如FIXME
, XXX
。 By default the priority of a TODO
tag is NORMAL
and that of FIXME
is a HIGH
. 默认情况下, TODO
标记的优先级为NORMAL
, FIXME
的优先级为HIGH
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.