I am trying to develop an extension that will work similar to the Comment toolbar button in VS 2010, but I want to mark all text as Commented Out and put a comment above it.
Here's an example. I know it's simple, but it's just a lot easier. My idea is to have a number of additional toolbar buttons to mark code no longer used, mark code that has bugs ... and things like that... and this can be picked up in the Task window because it starts with TODO:
// TODO MARTIN CODE NO LONGER USED
/*if (myItem)
{
txtTest.Enabled = false;
txtTest1.Value = 0;
btnOk.Enabled = false;
}*/
I presume I need to use:
DTE.ActiveDocument
and:
(((TextDocument)myDoc).Selection.Text).
Then to write out the code again, what do I need to do?