All blog entries are the opinions of the author and do not necessarily reflect the opinions of their employer. All the code presented is for explanation and demonstration purposes only. Any damages incurred to your site and/or data are not the responsibility of the author. Every effort is taken to ensure the code properly compiles, however sometimes there are some hiccups and you might be required to do your own debugging.

TechTidBits (Blog)

How do you ///todo?

Sep11

Written by:Thursday, September 11, 2008 8:44 PM

From yesterday's blog, I hope you noticed I'm a fan of the ///todo tag! I raised one caveat, you cannot see all your solution's or project's ///todo tags for unopened files. So how can you fix this you ask? Great question! It's actually quite simple, but you'll need to get your hands dirty with a bit of code. We're all code-heads here right? So this shouldn't be too foreign?! Let's dive in!

If you're reading this now, you're a fan of VS' ///todo tags and want to find out how to see ALL the ///todo tags in your solution/project, even no files are open.

I learned this trick from ShaharY on a blog on Dev102 (they have some great tips'n'tricks over there, check'em out!). What they do is add a command to the Tools|External Tools menu option where you can easily "Show All Todo Tasks." Then once you select that menu option, your code is interrogated for all the "///todo" tags and listed there. Then you can double click them to jump to the right place in code to edit them! Beautiful!

But I'm letting my excitement get a head of me, let's install and configure this to work for you on your computer.

First, download the source zip file. Open up the solution in VS and then compile it. Make sure you know where the exe is created cause you're going to need it next. Goto Tools|External Tools menu option and enter the following data.

Ensure you have the proper directory location and exe for the Command parameter. The parameters for the Arguments and Initial directory are the magic pieces here to make this work properly. Also make sure the Use Output window is checked.

Once that is done, the tool is installed and configured (see, not so hard?! :>). Next we're going to try it out. Open up the solution you created to test out the ///todo from yesterday's blog. Didn't great one, no probs, just whip one up now, or open up another solution and put a few ///todos in there now. Once you've done that, goto Tools|Show All Todo Tasks.

After you click that option, VS will start chugging away (don't worry, it's only sniffing out the ///todo tags in your code). Once it's done, you'll see the Output window.

Next you can double click any of the lines and BINGO, you're on that line of code. Looking for an improvement? Try placing an ampersand in front of the letter in the External Tools dialog so you can use the Alt keys to get faster access to the menu option.

Notes: I've made some small tweaks to the code from the source code on Dev102 to make it work better for me. If you find more improvements, please drop me a line and let me know what you found worked for you! :> I've love to read about it!

Thanks Rene, I liked your idea so much, I did another post, put the code on SVN and am replying again! hhhhmmmmm I need to get back to my other work! :>

Here's the link, http://www.pchenry.com/Default.aspx?TabId=36&EntryID=28. Have a good night! :>

Grab a coffee and get coding! :>

By phenry on Monday, February 23, 2009 9:44 PM

Re: How do you ///todo?

Hey Peter,

your tool (after modifying für c++) is one of my most used external tools today, i like it!!!and - oh shit - my first contact with C# :-D

thanks and good night! Rene

By Rene on Tuesday, February 24, 2009 5:07 PM

Re: How do you ///todo?

Fantastic! Thanks for coming back and letting me know, that's what I love to read! :> Very cool Rene! :> I hope you return again to read some more (I could use another reader :> haha LOL! :>).

If you see any updates, please let me know (or continue since you've already done that! :>). Thanks again and have a good one! :>

re fürDo you mind me asking if you're visiting from Germany? Very cool! Take care and have a good day! :>

By phenry on Tuesday, February 24, 2009 9:12 PM

Re: How do you ///todo?

Hi Peter, You really rock with this solution !! Hats off to you ...Thanks

By Phool Singh on Monday, April 13, 2009 8:32 AM

Re: How do you ///todo?

Thank you Phool, but the real credit goes to the guys over at Dev 102, they created the first version and I just tweaked it a bit. Thank you for leaving a comment and I'm really glad you enjoy it! :> Very cool! :>