Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Blog post
 

Blog post

Hi,

for those interested: http://ajdotnet.wordpress.com/2006/12/02/got-gat/

Regards,

AlexanderJ  Monday, December 04, 2006 9:07 AM
Hi Alexander,

Mmm... I'm still not sure if I'm following you here. If you're referring to the built-in "Implement Interface" menu entry then I can't see what's the advantage of using this command when you're coding an addin than when you're coding a guidance package. You could easily add a menu entry to the menu that appears when right clicking on the code editor (this should take no code but only adding the proper GUID:ID pair to the <CommandBar> element in the <HostData> for your recipe). But again, maybe I'm not getting right the differences you're talking about.

thanks,
-Victor.
vga  Friday, January 12, 2007 5:28 AM
Hi Alexander,

Nice post!!

I've only a few comments to the "What cant be done" section:
  • No way to react on anything but menu entries, especially not on other Visual Studio events, say starting a recipe automatically when saving a file. To accomplish that you’ll have to build a regularaddin the hardcore way.

    [vga] I agree that this can't be easily achieved using GAX today and an addin seems like a more 'natural' fit here. However, Clarius is releasing a toolkit soon, which adds this capability to GAX, so you will be able to attach recipes to VS events and even consume the event info from the recipe

  • No way to use the actions somewhere else, in paritular no way to leverage them within the build process. MSBuild support or some command line tool would be more suited to that need.

  • [vga] Agreed; a couple of requests for reusing GAX actions and other assets from msbuild has been received already, and this is something you can't really do today.

  • GAT is also not exactly suited to work “withinâ€?a file, i.e. provide recipes that modifies a part of an existing code file, available depending on the current cursor location. Something like â€?em>Implement Interfaceâ€?or â€?em>Encapsulate Fieldâ€? in the context menu depending on whether you are at the location of an interface or a field. Again this would be better done within a regular addin. (Fortunatelly someone within Microsoft allready thought of the examples I just mentionedâ€?
[vga] I've to disagree with this one. I don't see an advantage of addins over GAX here, for example, if you use CodeModel to modify a code file you'll need to write the same code no matter if its run from an addin or GAX action and the "Implement Interface" and "Encapsulate Field" could be fired also from both, an addin or GAX action, using the same DTE automation code in both cases. Where is the edge of addins over GAX that you're seeing in this particular case?

thanks,
-Victor.
vga  Tuesday, December 05, 2006 12:40 AM

Hi,

nice to get feedback from (presumably) one of the authors :-)

Regarding the last point: The point is not that you don't have access to the code model, I agree that you do. What you lack is the context information, i.e. the cursor position. With an addin you could do something like right-click on a class, select the "implement interface" menu entry, and be done with it. With GAT you could only right-click on the solution item of the respective file, then you would need a wizard to select the class to work on... not exactly the natural way to do this. That's why I used the words "not exactly suited". Please correct me if I miss something here.

Regards,
Alexander

AlexanderJ  Monday, January 08, 2007 6:58 AM
Hi Alexander,

Mmm... I'm still not sure if I'm following you here. If you're referring to the built-in "Implement Interface" menu entry then I can't see what's the advantage of using this command when you're coding an addin than when you're coding a guidance package. You could easily add a menu entry to the menu that appears when right clicking on the code editor (this should take no code but only adding the proper GUID:ID pair to the <CommandBar> element in the <HostData> for your recipe). But again, maybe I'm not getting right the differences you're talking about.

thanks,
-Victor.
vga  Friday, January 12, 2007 5:28 AM

Hi,

You could easily add a menu entry to the menu that appears when right clicking on the code editor (this should take no code but only adding the proper GUID:ID pair to the <CommandBar> element in the <HostData> for your recipe).

That was probably the part I have missed so far... . My problem was to add a recipe to the contextmenu of my code window.And finding the right GUID should take less than a day .

Regards,
Alexander

AlexanderJ  Monday, January 15, 2007 12:17 PM
I totally agree with you that finding GUID:ID pairs is just incredible hard today. We're working on offering a cool user experience in the Clarius SFT (http://softwarefactoriestoolkit.net), which would allow you to add menus to custom DSLs, Distributed System Designers (AD, SD, etc) or any other part of VS as easy as using a Wizard and a few clicks... hopefully we should be able to get this into our January 2007 CTP drop.

-Victor.
vga  Tuesday, January 16, 2007 4:39 AM

You can use google to search for other answers

Custom Search

More Threads

• Is it a well-known bug?
• GAT/GAX Automated build for TFS
• Register Guidance Package Problem
• GAT Wrapper
• DAL
• Modification of a SplitAndAddItemsFromString action
• Problem with Package Building (2 projects included as .vstemplate, but references not being resolved)
• Registering Guidance Package in visual studio express editions
• Getting the path of the solution
• wizard appearance