Task definition for automatically adding Eclipse tasks

Is there a way in eclipse to automatically add a TODO task, for example: - //TODO: TO BE TESTED at the beginning of a function or class so that I can easily track changes that have yet to be verified?

+4
source share
2 answers

Do you want to add TODO when creating methods / classes? Then you can use code templates for this. Like the // TODO Auto-generated method stub , when you create a method, you can put any other comment on top of the method. WindowPreferencesJavaCode StyleCode Templates

Or do you want to add TODO to all the methods / classes that currently exist? It's a little trickier, you can write a plugin that will do it for you: Eclipse JDT

If TODO should always be created when you modify a class or method, you can also write an eclipse plugin that controls CompilationUnit in the editor. See recordModifications() here

+8
source

You can edit the code templates and include a TODO comment there. Code templates are located in the settings dialog box.

Window> Settings> Java> Code Style> Code Templates

Unfortunately, this will only help new methods and classes.

+2
source

All Articles