Click here to Skip to main content
12,823,439 members (46,688 online)
Click here to Skip to main content
Add your own
alternative version


57 bookmarked
Posted 14 May 2001

ToDoList Add-on

, 20 Apr 2002 CPOL
Rate this:
Please Sign up or sign in to vote.
A Visual Studio add-in to help navigate to TODO:, TASK: etc comments, as well as showing STL containers in debug mode such as std::string, std::list etc

Add-on find dialog:

To-do cached add-on was designed to simplify developer’s tasks, like debugging and code management. As a result of my work a Visual Studio Add-on component was created. It makes some things easier.

Debugging Features

Main feature of Debugging is STL containers expanding. This add-on supports debugging of such STL containers:

  •      std::vector
  •      std::list
  •      std::map
  •      std::multimap
  •      std::set
  •      std::multiset

Also special debugging features were added they add support of very long strings to Visual C++ debugger. Add-on fixes Visual C++ Debugger limitation to string output. (Visual C++ debugger can show only 242 symbols of the string). This Add-on can expand very long strings (more than 65536 symbols):

  •      CString (MFC Class)
  •      std::string
  •      BSTR and WCHAR*
  •      bstr_t (COM support class)
  •      char *
  •      CComBSTR (ATL Class)

Add-on is also capable of showing XML long strings with user friendly formatting/indenting. It also supports quick find by simple string or RegExp (Regular Expressions). In Find Dialog any part of the string can be copied to the system clipboard for the future use of developer.

Code Management Features

Add-on has special features which can be used to manage Visual C++ project source code. In simple words it looks like:

Developer adds a comment with special signature, like:// TODO: after such keyword the task description could be written. Add-on can support as many keywords as developer wants. The main advantage of this Visual C++ add-on is that it parses comments. Add-on parses all comments in source code, checks commented strings for needed keywords and displays results. Add-on is capable of distinguishing comments of two types // - single line and /* - multi line comments. Each keyword used in Add-on must start from '//' or '/*' symbols - if you want to parse comments only, and from any other symbol if you want to parse full source code.

All Results of parsing are cached and updated when developer save changes to file. That is why add-on have name To-Do Cached. Results of its work are printed into Macro tab of output window. Find needed string in output window and make a double click on it to proceed to that string in your source code. Add-on also understands multi line comments written as a list of single line comments, example:

// TODO: -- start -- write code which do something special and with context and<br/> // and continue work -- end --

Add-on will interpret such comment as a long one comment and will display it by one line. Results of work can be sorted and filtered.

Toolbar look's like:

Show Results This is a first button in toolbar (direction from left to right). Press this button to display results of keywords search in Macro tab of output window. It’s a pity but I still don’t know how to set active Macro tab on button press. That is why after press you must change tab to Macro manually
Reparse Workspace

Press this button to free the cache of add-on. Needed only when there are too much files in workspace. Don’t open Option dialog after that– according to add-on logic, it will have to parse the workspace again to display statistics.

Options Dialog

Some of the add-on’s features can be configured using Option Dialog.

Tabify all files

On press add-on will automatically open all files in active project and change all spaces in files to tabs.

Untabify all files

Reverse process of Tabify action. Add-on will open all files of active project and change all tabs to spaces.

STL Debug Dialog

Open STL Debug Dialog of add-on. On button press add-on will try to locate variable in currently opened source file by selection or by cursor position.

Example of application tested with STL and C++ classes datatypes.

<!-- create more blocks of article text as needed separated --> <!-- with the

HTML tag --> <!-- start a block of source code -->

#pragma warning( disable : 4786 )

#include <string>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <queue>
#include <deque>
#include <stack>

#include <comutil.h>
#include <atlbase.h>

typedef std::string string;

// map types
typedef std::map<long, string>    TLongStr;
typedef std::map<string, string > TStrStr;
typedef std::map<long, long>      TLongLong;

// multimap types
typedef std::multimap<long, string>   TMLongStr;
typedef std::multimap<long, long>     TMLongLong;
typedef std::multimap<string, string> TMStrStr;

// vector types
typedef std::vector<string> TVStr;
typedef std::vector<long>   TVLong;

// list types
typedef std::list<string> TLStr;
typedef std::list<long>   TLLong;

// set
typedef std::set<long>        TSLong;
typedef std::set<string>      TSStr;
typedef std::multiset<long>   TMsLong;
typedef std::multiset<string> TMsStr;

#define STR_DEF_TEST  string( DEF_TEST_STRING )

int main( int argc, char* argv[] )
  char buffer[ 8192 ];
  // maps
  TLongLong   mapLL;  TLongStr    mapLS;  TStrStr     mapSS;
  TMLongLong  mmapLL; TMLongStr   mmapLS; TMStrStr    mmapSS;

  // list, vector
  TLLong      listL;  TLStr       listS;
  TVStr       vecS;   TVLong      vecL;

  // set, multiset
  TSLong      setL;   TSStr      setS;
  TMsLong     msetL;  TMsStr      msetS;

  string    strValue = DEF_TEST_STRING;

  for( int j=0; j<10; j++ )
    strValue += strValue;

  const char * czBuffTestLongVariableNamesWithSomething = strValue.c_str( );
  CString   cstrClass = czBuffTestLongVariableNamesWithSomething;
  CComBSTR  combstr = cstrClass;  
  BSTR      bstr = combstr;
  bstr_t    TBstr = bstr;

  for( long i = 0; i<4000; i++ )
    sprintf( buffer, "%04d - ABCDEFGHIJKLMNOPQRSTUVWXYZ" , i );
    string temp = buffer;

    mapLL.insert( TLongLong::value_type( i, i+1 ) );
    mapLS.insert( TLongStr::value_type( i, temp ) );
    mapSS.insert( TStrStr::value_type( temp, temp ) );

    mmapLL.insert( TMLongLong::value_type( i, i+1 ) );
    mmapLL.insert( TMLongLong::value_type( i, i ) );
    mmapLS.insert( TMLongStr::value_type( i, temp ) );
    mmapLS.insert( TMLongStr::value_type( i, temp ) );
    mmapSS.insert( TMStrStr::value_type( temp, temp ) );
    mmapSS.insert( TMStrStr::value_type( temp, temp ) );

    listL.push_back( i );
    listS.push_back( temp );
    vecL.push_back( i );
    vecS.push_back( temp );
    setL.insert( i );
    setS.insert( temp );
    msetL.insert( i );
    msetL.insert( i );

    msetS.insert( temp );
    msetS.insert( temp );

  return 0;


Date Posted: 17/Aug/2001
First article was posted to CodeProject
From that moment many things were changed and new functionality added.

Updated: 7/Sep/2001
Tons of changes.

Updated: 20/Jan/2002
More changes.

Updated: 21/Apr/2002
Updated download package


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Oleksandr Kucherenko
CEO ArtfulBits Inc.
Ukraine Ukraine
Name:Kucherenko Oleksandr

Born:September 20, 1979

Platforms: Win32, Linux; - well known and MS-DOS; Win16; OS/2 - old time not touched;

Hardware: IBM PC

Programming Languages: Assembler (for Intel 80386); Borland C/C++; Borland Pascal; Object Pascal; Borland C++Builder; Delphi; Perl; Java; Visual C++; Visual J++; UML; XML/XSL; C#; VB.NET; T-SQL; PL/SQL; and etc.

Development Environments: MS Visual Studio 2001-2008; MS Visual C++; Borland Delphi; Borland C++Builder; C/C++ any; Rational Rose; GDPro; Together and etc.

Libraries: STL, ATL, WTL, MFC, NuMega Driver Works, VCL; .NET 1.0, 1.1, 2.0, 3.5; and etc.

Technologies: Client/Server; COM; DirectX; DirectX Media; BDE; HTML/DHTML; ActiveX; Java Servlets; DCOM; COM+; ADO; CORBA; .NET; Windows Forms; GDI/GDI+; and etc.

Application Skills: Databases - design and maintain, support, programming; GUI Design; System Programming, Security; Business Software Development. Win/Web Services development and etc.

You may also be interested in...

Comments and Discussions

QuestionVS2008 Pin
SajeeshCheviry25-Nov-13 19:58
professionalSajeeshCheviry25-Nov-13 19:58 
QuestionCan i use this extension in Pin
CobaltD10-May-06 1:30
memberCobaltD10-May-06 1:30 
AnswerRe: Can i use this extension in Pin
Alex Kucherenko10-May-06 1:47
memberAlex Kucherenko10-May-06 1:47 
GeneralRe: Can i use this extension in Pin
CobaltD10-May-06 2:10
memberCobaltD10-May-06 2:10 
AnswerRe: Can i use this extension in Pin
Alex Kucherenko10-May-06 2:17
memberAlex Kucherenko10-May-06 2:17 
GeneralRe: Can i use this extension in Pin
CobaltD10-May-06 2:20
memberCobaltD10-May-06 2:20 
GeneralCannot call commit on this transaction object because the calling application did not initiate the transaction Pin
Aleksan10-Mar-05 21:38
memberAleksan10-Mar-05 21:38 
GeneralCompile error with Dinkumware, Ltd. STL Pin
Aleksan9-Mar-05 0:07
memberAleksan9-Mar-05 0:07 
GeneralDo not work with Dinkumware, Ltd. STL Pin
Aleksan3-Mar-05 20:42
memberAleksan3-Mar-05 20:42 
GeneralRe: Do not work with Dinkumware, Ltd. STL Pin
Alex Kucherenko3-Mar-05 22:17
memberAlex Kucherenko3-Mar-05 22:17 
GeneralMyClass Pin
Anonymous24-Oct-04 4:22
sussAnonymous24-Oct-04 4:22 
GeneralRe: MyClass Pin
Portatofe2-Oct-08 7:13
memberPortatofe2-Oct-08 7:13 
QuestionHow to install Pin
Polushin19-Aug-04 7:30
memberPolushin19-Aug-04 7:30 
General&quot;.exe&quot; didn't get written. Pin
WREY29-Feb-04 8:34
memberWREY29-Feb-04 8:34 
GeneralRe: &quot;.exe&quot; didn't get written. Pin
Alex Kucherenko29-Feb-04 22:26
memberAlex Kucherenko29-Feb-04 22:26 
GeneralRe: &quot;.exe&quot; didn't get written. Pin
WREY1-Mar-04 3:27
memberWREY1-Mar-04 3:27 
GeneralRe: &quot;.exe&quot; didn't get written. Pin
Alex Kucherenko1-Mar-04 3:59
memberAlex Kucherenko1-Mar-04 3:59 
Generaldebugger question Pin
Anonymous22-Oct-03 11:29
sussAnonymous22-Oct-03 11:29 

I'm extending the Add-on to suit my project. In my project I have couple of my own data structures which are effectively wrappers around the std map, vector etc. I have a parent class to all of them, which has a virtual function that can identify the type the data structures. All the children class override this function to return their own type. I would like the debugger to evaluate this virtual function and based on the return type i can call the appropriate expression for the debugger to evaluate. I'm pasting a snippet of my code.

typedef enum ID { MyDataStruct_aID = 0, MyDataStruct_bID, MyDataStruct_cID } Class_ID;

class ParentStruct
virtual Class_ID GetType() =0;

class MyDataStruct_a : public ParentStruct
virtual Class_ID GetType() {return MyDataStruct_aID;};
std::map data;

//similarly for the other classes

I would like to get the Class_ID from the debugger by evaluating the virtual function. Currently, I could get the vftable pointer by calling "(ParentStruct *)(addr).__vfptr" expression. But, the returned string is something like: "0x12234a3 const MyDataStruct_a::`vftable". I'm not sure how to use this return address part to access the vftable entries. If any of you could throw some light on this that would be great.

Generalquestion on _Simplify() function in CStdMap Pin
John_Galt18-Sep-03 7:05
memberJohn_Galt18-Sep-03 7:05 
GeneralRe: question on _Simplify() function in CStdMap Pin
Alex Kucherenko18-Sep-03 22:31
memberAlex Kucherenko18-Sep-03 22:31 
Generalsomething "better" :-O Pin
Srivatsan Raghavan8-Aug-02 19:00
sussSrivatsan Raghavan8-Aug-02 19:00 
GeneralRe: something "better" :-O Pin
Alex Kucherenko8-Aug-02 22:47
memberAlex Kucherenko8-Aug-02 22:47 
GeneralWatching 2-level variables Pin
Anonymous24-May-02 4:21
memberAnonymous24-May-02 4:21 
GeneralRe: Watching 2-level variables Pin
Alex Kucherenko17-Jun-02 5:41
memberAlex Kucherenko17-Jun-02 5:41 
GeneralAny Chance of a .NET Version Pin
Stone Free22-Apr-02 1:00
memberStone Free22-Apr-02 1:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170308.1 | Last Updated 21 Apr 2002
Article Copyright 2001 by Oleksandr Kucherenko
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid