Something like the #warning directive for Java?

In my project, I have something like final boolean Debug.USE_DEBUG_MODE, and I always forget to switch it back to false. I wonder if I can put something similar to the #warningC ++ directive , so I do not forget to change the code back.

+5
source share
1 answer

You can use the task tag //TODO Change this laterin eclipse and configure Eclipse to display a compile-time warning for all TODOs.

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.

Please note that there are others, for example FIXME, XXX. By default, the priority of the tag TODO NORMAL, and << 24> - HIGH.

enter image description here

+9