Dela via


Visualizing and Modeling Code with Feature Pack 2

Microsoft Visual Studio 2010 Feature Pack 2 includes the visualization and modeling capabilities in the Microsoft Visual Studio 2010 Visualization and Modeling Feature Pack. These capabilities expand the visualization and modeling tasks that you can perform in Visual Studio 2010 Ultimate as described in the following sections:

  • Generate Code from Models

  • Explore Existing Code

  • Use and Manage Model Elements

  • Create, Validate, and Extend Layer Diagrams

Important

If you already have Visual Studio 2010 Visualization and Modeling Feature Pack installed on your computer, make sure that you copy any custom templates from the extension folders under %LocalAppData% to a safe location before you install Visual Studio 2010 Feature Pack 2. Installing this feature pack uninstalls the Visualization and Modeling Feature Pack, removing it from the Visual Studio Extension Gallery and also any custom templates under %LocalAppData%. You will have to remap the templates for any code generation projects to the following location, where you can also find the extensions and DLLs that are required to use some of the visualization and modeling capabilities:

…\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\<InsertVisualStudioFeaturePackName>\<InsertVisualStudioFeaturePackVersionNumber>

For more information, see How to: Generate Code from UML Class Diagrams.

For more information about

See

Visual Studio 2010 feature pack downloads on MSDN

Visual Studio 2010 Feature Packs on MSDN

Requirements for the visualization and modeling capabilities in this feature pack

Requirements

Overview for Visual Studio feature packs

Visual Studio Feature Packs

Overview and documentation for the Visual Studio 2010 Ultimate visualization and modeling tools

Modeling the Application

Generate Code from Models

UML models can help you create code and tests and describe the architecture and requirements of a system.

New

For more information, see

Use the Generate Code command to generate skeleton code from elements on UML class diagrams. You can use the default transformations, or you can write custom transformations to translate UML types into code.

TipTip
If you want to generate other kinds of documents from UML or generate code that has a more indirect relationship between the UML elements and the generated result, then you can still write custom templates to read the model and generate the kind of artifact that you want. For more information, see How to: Generate Files from a UML Model.

How to: Generate Code from UML Class Diagrams

Explore Existing Code

Developers often spend more time understanding existing code than writing it. The code visualization tools in Visual Studio Ultimate can help you visualize major parts of the code, assess its flexibility, and identify problem areas. You can more easily assess the potential cost of proposed changes by tracing the dependencies between parts of the code.

New

For more information, see

Create UML class diagrams from existing code.

How to: Create UML Class Diagrams from Code

Explore the organization and relationships in C and C++ code by generating dependency graphs.

How to: Generate Dependency Graphs for C and C++ Code

Explore the organization and relationships in ASP.NET Web projects by generating dependency graphs.

How to: Generate Dependency Graphs for ASP.NET Web Projects

You can also explore .NET code by creating sequence diagrams, dependency graphs and layer diagrams. For more information, see Visualizing Existing Code.

For more information, see:

Use and Manage Model Elements

Import Model Elements from Other Modeling Tools

New

For more information, see

Import elements from UML sequence diagrams, class diagrams, and use case diagrams as XMI 2.1 files that are exported from other modeling tools.

How to: Import UML Model Elements from XMI Files

For more information, see:

Links between model elements and work items can help you track and monitor the progress of work on those elements, for example, on a particular activity or the tests for a use case.

Note

In Visual Studio 2010 Ultimate, you can create new work items or link to existing work items from model elements, but not in the other direction. For more information, see How to: Link from Model Elements to Work Items.

New

For more information, see

Create links and view links from work items to model elements.

How to: Link from Work Items to Model Elements

Create, Validate, and Extend Layer Diagrams

Layer diagrams help you visualize the logical dependency structure of your application. To make sure that structural changes are not introduced accidentally, you can validate code against the model on every check-in.

New

For more information, see

Create layer diagrams from C or C++ code and validate dependencies.

How to: Validate C and C++ Code Against Layer Diagrams

Write code to modify layer diagrams and to validate code against layer diagrams.

Creating Extensions for Layer Diagrams

For more information, see:

Requirements

For the most recent requirements and known issues, please see the ReadMe file. To use this feature pack, you must have Visual Studio 2010 Ultimate installed. To use the visualization and modeling capabilities of this feature pack, you must also have the following installed:

To enable

Make sure the following are installed

Support for C or C++ projects

Visual C# on Visual Studio

For more information, see:

Layer extensibility APIs

For more information, see Creating Extensions for Layer Diagrams.

Linking from work items

Model artifact link type on Team Foundation Server

For more information, see Requirements in How to: Link from Work Items to Model Elements.

External Resources

Blogs

Visual Studio Modeling Feature Pack Available!

Skinner’s Blog

Modeling Websites and Native Code

Visualization and Modeling Feature Pack

Videos

link to videoPDC 2009: Code Visualization, UML, and DSLs

link to videoChannel 9: Enabling Architects with Microsoft Visual Studio 2010

link to videoChannel 9: UML with Visual Studio 2010 Ultimate

link to videoChannel 9: Extensibility for Architecture & Modeling Tools in Visual Studio 2010 Ultimate

Forums

Visual Studio 2010 Visualization & Modeling Tools

Visual Studio 2010 Visualization & Modeling SDK (DSL Tools)

Other Sites

MSDN Architecture Center

See Also

Concepts

Visual Studio Feature Packs

Modeling the Application