Monday, July 7, 2008

How to add a menuitem to your dsl diagram

On the codegeneration conference in one of the BOF sessions somebody (I forgot his name, Swedish guy working at Sony Ericson) had a problem to add a menuitem to his diagram.
In the past I always added my menuitem through the guidance package that was using my dsl. I was playing with the idea to keep everything separated and not integrate everything in our guidance package. So I was afraid I had to deal with same problem the other had.

This is the result of my research:

In the book of Steve Cook and co there was a chapter that explained it perfectly, but that was for the system used in VS2005.
So I had to look a little bit further and found what I was looking for in the sample database enclosed with VS2008 SDK. It is a good start but didn't gave me everything what I needed. I found on the MSDN Code Gallery in the Menu Commands Reference Deep Dive document.
It gave me the overall idea how to do it and after several hours I had my solution.

If anyone wants to have the code how to do it exactly, leave a comment on this post and I post it ASAP (I am still struggling to post samples without tweaking my post for more then an hour to post it in a proper format).

No comments: