Replacing/Extending Visual Studio's Generate Stub in Visual Studio 2010

Posted by devoured elysium on Stack Overflow See other posts from Stack Overflow or by devoured elysium
Published on 2010-05-16T20:52:57Z Indexed on 2010/05/16 21:00 UTC
Read the original article Hit count: 407

When we write the name of a method that doesn't exist, Visual Studio 2010 asks us if we'd like to generate a method stub with that name. What I'd like to know if is it possible to replace that same code stub generating command with one made by myself. I never did any kind of extensibility programming for Visual Studio so I have a couple of questions:

  1. How hard is it? Is it something I can learn in a couple of nights, or is it something that'll make me "lose" a lot of time?

  2. It seems to me that there isn't a lot of support for that kind of programming, as generally people are not that interested in developing solutions that extend the Visual Studio IDE. I searched on SO and it doesn't appear to have many threads about extending Visual Studio.

  3. I don't know how the generate method stub thing works in Visual Studio, but I just wanted to turn it into something a bit more flexible and useful. Has anyone dealt with these kind of things before, that can give me a pointer to where to start? I know of MS VSX site but that has a lot of resources and can be overwhelming for someone new to the subject as I am.
  4. What technology will I need to use? T4? Maybe I'll need to know a lot about the code, like Visual Studio does, so I can know other method's type arguments, names, etc. Is that what T4 is for?

Thanks

© Stack Overflow or respective owner

Related posts about visual-studio

Related posts about visual-studio-2010