Copying Using UML Modeling Visual Studio 2010

I am currently browsing my way through all the new features added to the Visual Studio 2010 Beta 1 development environment, and I have found a feature that I hope will be very useful to me. UML modeling tool in an architecture editor. I wanted to create a new test project, nothing special. I started by creating only a standard UML boolean diagram. Then, after I finished, I wanted to export my diagram to C # code with class stubs, but I could not figure out how to do this. Therefore, of course, I consulted with MSDN, but I could not find links to the design approach from top to bottom and seemingly refused it. Then I ended up on Channel 9, and I watch the video from top to bottom, and they refer to the ability of Visual Studio 2010 to complete this task.

So, I think my question is, can Visual Studio 2010 take a logical class diagram and generate code stubs?

I am currently using Visual Studio 2010 Beta 1 Team System on Windows 7 (if that helps anyone).

thanks

+4
source share
3 answers

Try the following topics from RC documents:

  • How to create files from a UML model

    From the UML model, you can generate program code, schemes, documents, resources and other artifacts of any kind. One convenient way to create text files from a UML model is to use text templates. They allow you to embed program code in the text that you want to generate.

  • Customize your model with profiles and stereotypes

    You can adapt the standard elements of the UML model, such as classes and components, to customize them for specific purposes. You can apply a stereotype to a model element that can change the list of element properties. Stereotypes are defined in collections called profiles.

You can also read this Tim Fisher blog post, which helps: " How to create code from Team System UML diagrams in VS 2010 Team System Beta 2 (update 4) "

Here is the first piece of code on how to generate code from UML diagrams using T4 text templates. alt text
(source: msdn.com )

Here is another message from Oleg Sych: UML modeling and code generation in Visual Studio 2010

Assuming that the reader is already familiar with UML, he focuses on UML user profiles, an extensibility mechanism that can be used to adapt UML models to a specific problem area. Readers will see an example of such a profile that extends UML class diagrams for database modeling. Finally, the article shows how you can generate code from UML models using T4 text templates.

I have posted more links in my profile for more information.

+4
source

You are responsible for Visualization and Modeling Feature Pack . This package gives you everything you need to create code from Visual Studio 2010 modeling tools, etc.

+2
source

According to MSFT, the answer is no. At least it is not built in by default, although it can be delivered by extension. See here

+1
source

All Articles