title: Visual Studio UML 2010 code generation for methods or properties
body: <p>I set up a visual studio 2010 UML modeling project and created a class diagram with several classes. The code generation works fine (I am using the code generation template delivered within the Visualization and Modeling Feature Pack for Visual Studio).
  Whenever I click "Generate Code" on a class, I get a nice class stub including properties and method stubs for this class.</p>
  
  <p>Now I am trying to add some custom code into a method of a class. The idea is to have every time I generate the code for the class the method would already have some code written in it (By default, the content of each method is "throw new Sytem.NotImplementedException()"). As far as I understand I first need to create a tt / t4 template. Then I need to set up in the class designer in the properties of the method the text template bindings - they should point to the newly created template. I tried it, but I can't figure out how to get this working. Or do I misunderstand a concept here? Any ideas?</p>
  
  <p>And yes, I have read the msdn documentation about code generation and text templates, as well as Oleg Sych's blog. But neither of these did show me a way to solve this problem. </p>