SlickEdit Product Discussion > SlickEdit User Macros

ToDo List Toolbar (Updated for SE2022)

(1/14) > >>

Current version: 1.2
Author: Marty Lewis

Important Note:
This feature has been modified to work with SlickEdit 27 and up, but appears to work okay back to SlickEdit 14. Back up your SlickEdit configuration directory prior to loading this module in case some kind of conflict occurs. Bug reports or additional feature requests can be posted in this thread.

This module implements a toolbar and methods for tracking "TODO:" statements in source code comments. It uses SlickEdit's search functionality to quickly parse through relevant code. It also makes use of several SlickEdit APIs to present a toolbar interface that attempts to match the look and feel of your existing SlickEdit interface. After loading, right-click in the toolbar to see the commands and options.

The following commands can be bound to keys or run from the SlickEdit command line:

--- Code: ---// This command begins the process of searching all the source files in your
// workspace for TODO: statements.
// This is also in the right-click menu as Generate TODO List
_command void ToDo_GenerateList();

// This command takes the existing TODO: data and sorts it by project then filename.
// Future calls to ToDo_GenerateList() will default to this sort.
// This is also in the right-click menu under Sort By > Project
_command void ToDo_SortByProject();

// This command takes the existing TODO: data and sorts it just by filename.
// Future calls to ToDo_GenerateList() will default to this sort.
// This is also in the right-click menu under Sort By > File
_command void ToDo_SortByFile();

// This command toggles the TDML parsing on or off.
// This is also in the right-click menu under TDML > Use TDML
_command void ToDo_ToggleTDML();

// This command toggles the alternate TDML parsing on or off.
// This is also in the right-click menu under TDML > Use Alternate TDML
_command void ToDo_ToggleAltTDML();

// This command will take you to the file or todo statement currently selected
// in the toolbar. It opens an editor window containing the source file. If a
// todo statement was selected then it places the cursor on the correct line
// and column.
// This is also in the right-click menu as Goto TODO
// This can also be invoked by double-clicking an entry in the list
_command void ToDo_ViewSource();

--- End code ---

One of the added values in this toolbar is the introduction of a simple syntax for setting the importance and/or name for a particular TODO statement. A single character indicates above average importance or high importance. Anything else before the colon indicates the title. For example:

--- Code: ---// TODO! Really Important Task:
// TODO^ Fairly Important Task:

--- End code ---
Those two items would show up in the toolbar with different icons indicating the importance level. The rest of the text preceding the colon would also show up in the toolbar as a name you specified by which to reference the particular TODO item.

If you turn on Alternate TDML parsing, the name text is pulled from the other side of the colon to the end of the line. For example:

--- Code: ---// TODO: Important task
//           The rest of my description about this todo task

--- End code ---

This would result in the name being "Important task". Alternate TDML parsing is likely to produce some strange TODO name's as most people will not have taken this into account when writing TODO statements.


--- Code: ---Version 1.2:
  2022 compatibility - fixed compilation error for potential Slick-C lang regression with imports

Version 1.1:
  2017 compatibility - Handle boolean > bool change, handle deprecated maybe_quote_filename, handle naming change to _pic_ut_package_failure and _pic_ut_package_notrun - should still be backwards compatible

Version 1.0:
  Work around SlickEdit RegEx bug.

Version 0.9:
  Support for new tool window infrastructure in SE2015-SE2016.

Version 0.8:
  Be less picky about how a user starts their ToDo descriptions. Don't require alphanumeric.

Version 0.7:
  Fix for Shelku, error when executing ToDo_GenerateList outside of the toolbar context.

Version 0.6:
  Courtesy of Sandra, updated to work with SlickEdit 16

Version 0.5:
  Fixed an error that would occur when ToDo_GenerateList() was run while the toolbar was not visible
  Merged vivitron's Message List changes

Version 0.4:
  Made a minor code change to allow the module to load in SlickEdit 14

Version 0.3:
  Support for alternate TODO style (listing comment after TODO:)

Version 0.2:
  Support for Visual Studio projects
  Fixed a platform bug where I was using an explicit Windows path separator

Version 0.1:
  Initial release

--- End code ---

This feature is based on a request found in the SlickEdit forum:
Special thanks to ehab for testing the toolbar in ways that I had not considered.
Extra thanks to vivitron for implementing an integration with the SlickEdit Message List toolbar to insert todo information.
Even more thanks to SlickEdit's Sandra for updating the macro to work with SlickEdit 16.

(Over 400 downloads!)

Very cool! One super-minor bug: if a user were to be *very* degenerate (not that I'd ever try to do anything like this) and call ToDo-GenerateList while the toolbar wasn't open, it results in a SlickC stack.

There is a new version that fixes that bug and adds the ability for the list to appear in the SE Message List window as well..

See this thread:

vivitron makes a very good point. I suppose that I need to update this thread.

Hi Marty,

Thanks for this macros, very useful, 

but can you consider to update it so it can run with the latest version 16 (It seems that in their newer version they change some of the function call)




[0] Message Index

[#] Next page

Go to full version