I'd like a mechanism to throw a compile-time warning manually. I'm using it to flag unfinished code so I can't possibly forget about it later. @Deprecated is close but warns at caller site, not at creation site. I'm using eclipse. Something like #Warning in C#.
Why not just add a flag in the source code like //TODO:
or something? And then just search for all occurances of TODO
in the file? You could even have some special flag too like FINISHME
or something.
If you have hundreds of TODOs in your project from the team, you can filter by a string e.g. your initials in the Task pane's top-right menus.
A lot better than using the deprecated annotation in my humble opinion the suppresswarnings annotation.
@SuppressWarnings("XXX")
can be annotated almost everywhere and as long as XXX is not a valid warning you will get a warning from eclipse about that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With