6

I am writing a small Visual Studio addin to let the user use more features of the comment tokens (TODO, HACK, etc.). For this I want to extend Visual Studio with new commands (such as TODISCUSS, TODELETE, FIXME, TESTME, etc.). I'd like to do this programmatically when my addin starts.

I already found out how to do this manually: http://msdn.microsoft.com/en-us/library/ekwz6akh%28v=vs.80%29.aspx

Does anyone have an idea how this could be done via the API?

Any ideas or suggestions would be appreciated!

5
  • In case you are not aware, Resharper already has functionality to do this, as well as much, much more useful stuff besides.
    – nateirvin
    Commented Nov 20, 2013 at 16:38
  • Did you see the "Community Addition" added in 2010 at the link you mentioned? AFAIUY that answers your question, unless there is an indirect API that then updates the registry for you.
    – Mark Hurd
    Commented Nov 21, 2013 at 5:26
  • Also this would be a duplicate except you've been specific to 2012.
    – Mark Hurd
    Commented Nov 21, 2013 at 6:24
  • @nateirvin Yes, I am but I want to go beyond Resharper's functionality in my small university project.
    – casaout
    Commented Nov 21, 2013 at 7:26
  • @Mark Hurd: Yes, thanks. But I couldn't find it in the registry ... & Unfortunately, this is in Visual Basic don't know - nevertheless, thanks for pointing out this thread. I'll try to figure it out in C# ...
    – casaout
    Commented Nov 21, 2013 at 7:28

1 Answer 1

0

Edit :

See this MSDN Link perhaps digging around in TaskList will get you somewhere.

Original Post :

It's not very clear (to me :) what exactly you want to do. Is it: find, edit, or refactor the tokens and then do something else with the sources? I can suggest this article on Code Project (NRefactory).

Using NRefactory you can do anything and everything with the source files including locating the tokens you want and doing stuff with them. You will also know the files you found them in, line numbers etc.

Perhaps you will be able to use Nrefactory to do all the heavy lifting as far as sources are concerned.

2
  • hi Alex. Thanks for your answer. I don't want to refactor anything. I want to extend the possible comment tokens available in Visual Studio. Currently, there are only TODO, FIXME and BUG available. I want to add for example HACK, TOCREATE, etc. programmatically (and not manually via the settings). Any ideas? Thanks!
    – casaout
    Commented Dec 14, 2013 at 8:37
  • 1
    Hey C. I'm afraid I can't help you there. See my last edit...I hope it helps.
    – Alex
    Commented Dec 16, 2013 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.