Extending theTask List

 

The Visual Studio Task List lets users add custom programming tasks, view task comments that link to lines in the code, and create and view custom categories for task messages.

Tasks are handled through a service named SVsTaskList, which implements IVsTaskList and IVsTaskList2. To use basic Task List functionality, you must create a task provider by implementing IVsTaskProvider.

Register your task provider with the SVsTaskList service by calling RegisterTaskProvider, which returns a cookie value that must be used to uniquely identify the task provider in all subsequent transactions.

Every task provider implementation is responsible for maintaining an internal list of tasks. The task provider can call RefreshTasks on Task List to update the displayed list of tasks. When this occurs:

  1. The service calls back into the task provider by using the EnumTaskItems method.

  2. The task provider implementation of EnumTaskItems returns an IVsEnumTaskItems object.

  3. The IVsEnumTaskItems object iterates over a collection of IVsTaskItem objects.

  4. The SVsTaskList service then updates the Task List display.

Additional functionality is available. The IVsTaskProvider3 interface enables every task provider to supply its own custom set of columns.

The following code example shows an implementation of a task provider.

No code example is currently available or this language may not be supported.
Show: