Managing TODOs in your source code

  • Thread starter Thread starter probashi
  • Start date Start date
P

probashi

Hi,

In my code I have TODOs all over the solution/projects (like the
following)

//TODO: Refactor to Factory Pattern
_service = new ServiceStub();

These are the target of my refactoring as the first cut is done (i.e.
all the tests are passed).

Is these any easy way to manage these TODOs?

I am relying on Ctrl+F now.


Thanks
 
probashi said:
In my code I have TODOs all over the solution/projects (like the
following)

//TODO: Refactor to Factory Pattern
_service = new ServiceStub();

These are the target of my refactoring as the first cut is done (i.e.
all the tests are passed).

Is these any easy way to manage these TODOs?
Sure is. My friend, I direct your attention to Visual Studio's "Task List"
feature, who's very raison d'être is exactly keeping track of comments like
these, and which even comes preconfigured with a "TODO" tag.

View -> Task List. Switch it to "Comments", and there you go.
 
probashiwrote:




Sure is. My friend, I direct your attention to Visual Studio's "Task List"
feature, who's very raison d'être is exactly keeping track of comments like
these, and which even comes preconfigured with a "TODO" tag.

View -> Task List. Switch it to "Comments", and there you go.

This is really cool man!

You can also create custom comment tokens!

Give me some more Secrets Man ..
 
Sure is. My friend, I direct your attention to Visual Studio's "Task List"
feature, who's very raison d'être is exactly keeping track of comments like
these, and which even comes preconfigured with a "TODO" tag.

View -> Task List. Switch it to "Comments", and there you go.

However, at least in VS2005 those nice task list entries are only
shown when the file containing the entry is currently opened in the
editor... if you want to know about TODOs in other files you still
need Ctrl+Shift+F, even if they are members of a project.
 
I get TODOs (at least in VB 2005) in my task list regardless of whether the
file is open or not. Even in multi-project solutions.

Must be a special VB feature then. I just checked again, and VC#
definitely doesn't show comment TODOs unless the file is open.
 
Chris Nahr said:
Must be a special VB feature then. I just checked again, and VC#
definitely doesn't show comment TODOs unless the file is open.
--


It is (was) the same with C++. This is the reason I don't use it.

If there is a way to get tasks to show up for ALL files in a solution,
PLEASE share the secret!
 
BobF said:
It is (was) the same with C++. This is the reason I don't use it.

If there is a way to get tasks to show up for ALL files in a solution,
PLEASE share the secret!

When things like this that have annoyed me in the past come up, I sometimes
go exploring.

What I discovered this time is a work-around. (VS2005 - I don't know about
VS2008)

If you add Task List Shortcuts in the editor, these -will- show up for files
that aren't open. So a way to do this is:

1. Add a descriptive comment (optional)
2. Add a Task List Shortcut to the line
3. Choose 'Shortcuts' in the Task List category selector ((NOTE: This
category won't be available until at least one Task List Shortcut exists in
the solution))

Task List Shortcuts for ALL files will be displayed in the Task List window,
along with whatever text is in the line with the shortcut whether it is
code, comment, or whitespace ...

It's too bad multiple steps are required to get this result, but it might be
worth it for some.
 
If you add Task List Shortcuts in the editor, these -will- show up for files
that aren't open. So a way to do this is:

Wow, thanks for this tip! I've been using VS2003 and VS2005 since
they were released and I've never even heard of task list shortcuts.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top