The Problem: As you can see from the sample screenshot that many people added their own TODOs and FIXMEs. Imagine this for a big project, this will be in hundreds. The point of adding TODOs and FIXMEs right in the source code is that it can be seen more often such that we will be constantly reminded about the unfinished. But when everybody adds, it becomes a problem to keep track of your own Tasks and we may start ignoring them like spam mail. Having control is the key to using this feature, just like e-mail.
The Solution: Fortunately there's a very simple solution to this problem with a little effort. You can create and configure filters, just like you can create filters for your e-mails in Gmail. On the Tasks View you will see the button using which you can create filters. See below:
The rest of the filter configuration work is simple. The Filters dialog pops up and it's very intuitive as what all you can do with it. I typically create filter that contains the string "(srikanths): " in its description. And when I write my TODOs and FIXMEs, I make sure I prefix them with that description. You can come up with your own standard within your team and follow that.
The tasks that I write in the code typically look like this:
// TODO(srikanths): Srikanth should come back to complete this.
// FIXME(srikanths): Srikanth should fix this ASAP or he is dead.
Happy coding!
Srikanth
8 comments:
Hmm, either this is missing from Ganymede, or the Mylyn plugin overrides it. This would be really nice, if I could figure out how to enable it in my Eclipse!
Oh, it does work, it's in view menu -> configure contents, and you need to ensure you change it to "on any element" if you want to match your name as you have indicated. Thanks for the screenshots, I probably wouldn't have figured out the correct setting for the radios without them!
Ben,
Glad you figured out!
I haven't touched Eclipse in a long time now, when I come back and don't find it, I'll ask you :P
Thanks Srikanth - I've been looking for this for ages. Ganymede has done a really good job of hiding the menu!
For anyone who was confused like me - the view menu is the little triangle near where the filter button should be in Ganymede.
I tried doing this and mostly it works. But for some reason there are a couple todos that aren't being found. They show up in the regular todo list but they don't show any of the text after "@todo".
I put "@todo(name) blah blah" but all that shows up in the tasks window is "@todo".
"For anyone who was confused like me - the view menu is the little triangle near where the filter button should be in Ganymede."
Thanks, that was the missing piece of the puzzle for me! Found it now! :)
Does anyone know how to do these in a custom task view with filters (programmatically)
Post a Comment