Cross project code generation  
Author Message
Wilke Jansoone





PostPosted: Visual Studio Extensibility, Cross project code generation Top

Hi,

I'm very new to actually working with DSL and software factories, so the questions can seem a bit dumb.

Here it goes:

  • If I create a new DSL and an acommpanying custom tool, I can generate code by walking over the diagram. Is there a way that the generated code can be split accross existing projects in a Visual Studio 2005 solution
  • Would referencing artefacts that belong to other projects in a diagram (e.g. a diagram in a data access layer project has a reference to a business component in another project) be a good and allowable practice

That's it for now

Any help or feedback is highly appreciated.

Regards,

W. Jansoone




Visual Studio18  
 
 
gerbenvl





PostPosted: Visual Studio Extensibility, Cross project code generation Top

The things you're mentioning are possible, although not 'out of the box'.

Code gen: It's possible if you start the template engine yourself in code:

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=19584&SiteID=1

You can add the generated file to the project you like using this approach:

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=231534&SiteID=1

Referencing artefacts in other diagrams:

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=526708&SiteID=1

Hope it helps,

Gerben.


 
 
gerbenvl





PostPosted: Visual Studio Extensibility, Cross project code generation Top

Does this answer your question Can you mark the topic as answerred if so

Thanks,

Gerben.


 
 
W. Jansoone





PostPosted: Visual Studio Extensibility, Cross project code generation Top

Hi Gerben,

Thanks for waking me up;) No seriously I'm working on this but I'm currently struggling with the concept of packages and how they will interact with the development environment of the actual user of the DSL. I see different examples on how to get hold of the DTE but sometimes it is DTE sometimes it is DTE2, also the way to retrieve the services is not too clear. (actually if you can point me to a good place to get more information on how Visual Studio exposes different services and what their purpose is please let me know, this is a pain point for several years, I can manage to build something using DTE but honestly have to say I do not really understand how it works).

Thanks for your feedback.

Regards,

W. Jansoone