Home
MDG Link for Visual Studio.NET User Guide
Contents
1. 1998 2008 Sparx Systems Pty Ltd Software Product License Agreement 7 Windows Windows NT Windows ME Windows XP and Windows 2000 are trademarks of Microsoft GOVERNING LAW This agreement shall be construed in accordance with the laws of the Commonwealth of AUSTRALIA 1998 2008 Sparx Systems Pty Ltd 8 MDG Link for Visual Studio NET User Guide 1 4 Acknowledgement of Trademarks Trademarks of Microsoft e Microsoft Visual Studio NET e Windows Registered Trademarks of OMG e CORBA e the OMG Object Management Group logo e The Information Brokerage e CORBA Academy e IlOP e XMIG Trademarks of OMG e OMG e Object Management Group e The CORBA logo e ORB e Object Request Broker e The CORBA Academy design e OMG Interface Definition Language e IDL e CORBAservices e CORBATacilities e CORBAmed e CORBAnet e Unified Modeling Language e UML e The UML Cube logo e MOF e CWM e Model Driven Architecture e MDA e OMG Model Driven Architecture e OMG MDA 1998 2008 Sparx Systems Pty Ltd Support 9 1 5 Support Technical support for MDG Link for Visual Studio NET is available to registered users Responses to support queries are sent by email Sparx Systems endeavors to provide a rapid response to all product related questions or concerns Registered users can lodge a support request by visiting
2. The Merge Project dialog displays Merge Project CodeSamples Synchronize Select Type Forward i C Ignore locked files Export O TestPackage Class3 O TestPackage Class4 O TestPackage Class5 Sr E 2 Inthe Synchronize panel of the dialog select Forward to update Classes contained in the code from corresponding elements contained in the model 3 The items in the Export section apply to elements that currently exist in the model but do not exist in the code Select the checkbox against each Class to export into the code or click on the All button to select all the Classes 4 Click on the Go button to forward engineer the code If the forward engineer includes new Classes Enterprise Architect prompts you to assign a filename for the new Classes For more information on assigning new Classes see the Assign Classes to Files for Export 424 topic 1998 2008 Sparx Systems Pty Ltd 42 MDG Link for Visual Studio NET User Guide 3 6 3 3 Assign Classes to Files for Export When a new Class is created in Enterprise Architect and a merge is performed you can assign the filename for the Classes to allow multiple Classes to be assigned to the same filename The Assign classes to files for export dialog enables you to select the Classes to add into files e 511 classes to files for export Glassiabrany2 O LibCheck1 LibCheck1 cs O LibCheck2 LibCheck2 cs O Libcheck3 Libcheck3 cs Select All Assign
3. public ClassLib ClassLib OLE pass lt summary gt 1998 2008 Sparx Systems Pty Ltd 22 MDG Link for Visual Studio NET User Guide 3 2 Build Project It is possible to build and execute a Visual Studio NET project from within Enterprise Architect Building the project from within Enterprise Architect enables you to make changes to the code from the model and to determine if the changes to the code have been successful Selecting the Build Project option gives you the choice of building the project and executing the project 3 2 1 Build and Run a Project To build a Visual Studio NET project from within Enterprise Architect select the Add Ins Build Project menu option The Build Visual Studio Project dialog displays em itd fia studio Project p Build Errors a A When the build is successful the Progress field displays the message Build Successful If any errors have been encountered the errors are listed in the Build Errors panel For more information relating to build errors see the Build Project Errors 231 topic To execute the project immediately after the build click on the Execute button For the other options available on this dialog see the Build Dialog Options 23 topic To execute a project from Enterprise Architect select the Add Ins Run menu option Merge with Visual Studio Build Project Disconnect from Visual Studio Visual Studio p
4. Visual Studio NET MDG Link MDG Link for Visual Studio NET User Guide Welcome to the MDG Link for Visual Studio NET The MDG Link for Visual Studio NET enables you to work simultaneously with both Enterprise Architect and Visual Studio NET and merge the changes with minimal effort Sf 4ex SYSTEMS Copyright 1998 2008 Sparx Systems Pty Ltd MDG Link for Visual Studio NET User Guide 1998 2008 Sparx Systems Pty Ltd All rights reserved No parts of this work may be reproduced in any form or by any means graphic electronic or mechanical including photocopying recording taping or information storage and retrieval systems without the written permission of the publisher Products that are referred to in this document may be either trademarks and or registered trademarks of the respective owners The publisher and the author make no claim to these trademarks While every precaution has been taken in the preparation of this document the publisher and the author assume no responsibility for errors or omissions or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document Printed May 2008 Special thanks to Publisher All the people
5. http www sparxsystems com registered reg support html Trial users can contact Sparx Systems with questions regarding their evaluation at support sparxsystems com An online user forum is also available for your questions and perusal at http www sparxsystems com cgi bin yabb YaBB cgi 1998 2008 Sparx Systems Pty Ltd 10 MDG Link for Visual Studio NET User Guide 1 6 System Requirements The following software must be installed to use the MDG Link for Visual Studio NET Operating System e Windows XP Professional SP2 or later e Windows XP Home Edition SP2 or later e Windows XP Media Center Edition SP2 or later e Windows XP Tablet PC Edition SP2 or later e Windows 2000 Professional SP5 or later required for installation Enterprise Architect e Enterprise Architect Version 7 1 Professional Edition or e Enterprise Architect Version 7 1 Corporate Edition Visual Studio e Visual Studio NET version 2003 or higher Other e Sun JDK 1 5 1998 2008 Sparx Systems Pty Ltd Order MDG Link for Visual Studio NET 11 1 7 Order MDG Link for Visual Studio NET MDG Link for Visual Studio NET is designed built and published by Sparx Systems and is available from Sparx Systems The latest information on pricing and purchasing is available at Soarx Systems Purchase Pricing Website For more information contact sales sparxsystems com 1998 2008 Sparx Systems Pty Ltd
6. 12 MDG Link for Visual Studio NET User Guide 2 1 Register the MDG Link for Visual Studio NET To activate the MDG Link for Visual Studio NET follow the steps below 1 Purchase one or more licenses When you have paid for a licensed version of the MDG Link for Visual Studio NET you receive via email or other suitable means e alicense key or keys e the address of the web site from which to download the full version 2 Save the license key and download the latest full install package from the address supplied 3 Run the setup program to install the full version If this is the first time that the MDG Link for Visual Studio NET has been installed the MDG Link for Visual Studio NET dialog prompts you to enter the registration key or to continue the trial POG Eire for Visual studio NEI MDG link v for Visual Studio NET MDG Link for Visual Studio NET Trial Version 21 days remaining 4 To enter the new key click on the Enter Key button The License Management dialog displays Dieses Management Use the Add Key button to enter a new registration key Currently Registered Keys Key 5 Click on the Add Key button The Add Registration Key dialog displays 1998 2008 Sparx Systems Pty Ltd Register the MDG Link for Visual Studio NET 13 uldd pisos tration ay Enter Private Key Get Shared Key Copy registration key into space below then press OK button 6 Cop
7. Priority Test Name sl E mm Ces Defaults OK Cancel y A Work Item Type Click on the drop down arrow and select the type of work item to configure Don t create Elements for this work Select this checkbox to prevent MDG Link for Visual Studio NET item type from creating an Enterprise Architect element if the query returns a work item of the specified type UML Element If MDG Link for Visual Studio NET is to create an element click on the drop down arrow and select the type of element to create Element Stereotype If required click on the drop down arrow and select the stereotype to apply to the element Work Item Field If required click on a work item field against which to configure an Enterprise Architect property 1998 2008 Sparx Systems Pty Ltd Import and Synchronize TFS Work Items 49 Configure Click on this button to select an Enterprise Architect property to configure against the selected work item field Clear the currently selected mapping Default Apply the default mapping for this work item type 1998 2008 Sparx Systems Pty Ltd 50 MDG Link for Visual Studio NET User Guide Index A Acknowledgement Of Trademarks 8 Activate MDG Link For Visual Studio NET 12 Add In Menu Access 18 Options 18 Assign Class To File For Export To Code 42 Association Between Classes Find 32 Attribute Edit 30 Edit Code In Visual Studio NET 2
8. lt param narme memoryCancelParam c pararm size abstract static void nC SCALE out bool memoryCancelParam end ClassLib 3 3 1 Create Class With the MDG Link for Visual Studio NET it is possible to create a Class either in Visual Studio NET or in Enterprise Architect To create a Class in Enterprise Architect select the Enterprise Architect UML Toolbox and click on the More tools Class menu option The Toolbox pages for a Class diagram display 1998 2008 Sparx Systems Pty Ltd Classes Interface Enumeration Table Signal Association Class Relationships Associate i EZ 3 Generalize Compose Aggregate Association Class Assembly Realize ue ADWNN Nesting ni ul Package Merge 7 Package Import i Common Note Constraint ll 1 Document Artifact Requirement ku N Issue Change amp J E Pf E l5 Boundary Dependency Realize ZI Un 4 8 Trace yt Information Flow Note Link 27 In the Class page click on the Class element icon and drag it onto a diagram from the current package When you release the mouse button the Class Properties dialog dis not right click on the element in the diagram and select the Properti menu option Use this to set the properties of the Class Ey Glass GlassLib General Details Require Constraints Links Scenario Files plays if es Name ClassLib Ste
9. 2008 Sparx Systems Pty Ltd Classes 31 General Details Require Constraints Links Scenario Files i SC Concurrenc Cardinality Visibility Sequential Guarded O Active Attributes Synchronous Operations Collection Classes Templates Type v Parameter Type Default Arguments To set the attributes of a Class click on the Attributes button for more information on the options related to editing attributes go to the Attributes topic To set the operations of a Class click on the Operations button for more information on the options related to editing operations go to the Operations topic 3 3 5 Add Inheritance to Classes Adding inheritance between Classes in the MDG Link for Visual Studio NET from Enterprise Architect is a simple procedure To achieve this follow the steps below 1 On a diagram locate the Class or Classes involved in the operation 2 Select the Generalize connection from the Toolbox 3 Connect the child Class to the parent Class 4 Select the Element Advanced Overrides amp Implementations menu option The Override Operations Interfaces dialog displays 5 Select the operations interfaces to override implement 1998 2008 Sparx Systems Pty Ltd 32 MDG Link for Visual Studio NET User Guide Ojsypids operanons u iter fie ss Select operations interfaces to override implemen
10. Debug M e f Dynamic View Sekton Explorer eg ClassLib cs 8 Class Model Zi Class Model 2 ClassLib Iv E Class867868 od Solution ClassLibrary1 1 project public class ClassLib B ClassLib 4 Solution Items gt Finalize Gei ga Classlibrary2 private int m delivery Dam delivery H Ga mcm public int memory S memory amp AssemblyInfo cs gt memoryCancel mm Gj References d i memoryMinus ublic ClassLib 4 ig Account SQL P d y memoryPlus e Classi cs gt memoryRecall SI Class13 cs E Account DI Classa67868 cs ZE Account Si Emm ClassLib D Basket Si Protocols cs E BilingAddress E DeliveryAddress E order public virtual void Dispose Order 49 Billingaddress Basket DeliveryAddress public void finalize REQO34 Create S E Component view e dl Use Case View gS Work public void memoryCancel t al Deployment View S B Timing Y S E Documentation m Use Case Model w B Old state 7 public void memoryMinus 1 D I Activity Example Lil eessen S i3 MindMapping 4 a HI nen i E 3 1 4 Edit Operations The Project Browser enables you to easily access the operations of a Class so that you can edit the operations directly from Enterprise Architect or in Visual Studio NET To select a specific operation follow the steps below 1 Inthe Project Browser locate and expand the details of the required Class 2 Locate the required operation and right c
11. Manage dd Ins 1998 2008 Sparx Systems Pty Ltd Build Project 23 3 2 2 Build Dialog Options The Build lt projectname gt dialog enables you to build and execute a Visual Studio NET project from within Enterprise Architect Progress Start Build Build Errors File Name Invalid token T in class struct or interface member declaration ClassLib cs Identifier expected ClassLib cs Class struct or interface method must have a return type ClassLib cs expected Protocols cs The namespace global namespace already contains a definition for Class867868 Class867868 cs D E Feld Description CdS Displays the current status of the build process Build Errors Displays information on any errors that have occurred during a build This information includes an error description and the filename associated with the error Button Description Execute Executes the project View Error Displays the line of code with the error in Visual Studio NET this button is available only when the Build has encountered errors 23 ee osesmeWebenstrmsopemo SSCS 3 2 3 Build Project Errors When building a project if errors have been encountered they are listed in the Build Errors panel This panel shows a description of the error and the name of the Class in the File name column To inspect the error in Visual Studio NET click on the Class name in the Build Errors panel and click on
12. Test 1 You can display the Notes text Unit Not Run Test 2 of Responsibilities Tests and Gonstaints here using Tagged This is some Notes text It is formatted Values to show the SSS H On the Notes field of the Properties descriptions dialog Ee Inthe Notes compartment of the In the Motes window element and Gassiibraryi ileresefe Visual Studio Eusing System Kies System Collections Generic using System Text ClassLibrary1 S E Project References H mscorlib o namespace ClassLibraryi 3 System System Data public class Classi System vm El Description gj Task List 5 Pending Checkins To get started now see Getting Started 14 See Also e License Agreement 54 e Copyright Notice 44 1998 2008 Sparx Systems Pty Ltd 4 MDG Link for Visual Studio NET User Guide 1 2 Copyright Notice Copyright 1998 2008 Sparx Systems Pty Ltd All rights reserved The software contains proprietary information of Sparx Systems Pty Ltd It is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law Reverse engineering of the software is prohibited Please read the license agreement 5 for full details Due to continued product development this information may change without notice The information and intellectual property contained herein is confi
13. Visual Studio NET User Guide 3 1 Add In Options from the Project Browser The Project Browser enables you to navigate through the Enterprise Architect project space It displays packages diagrams elements and element properties You can drag and drop elements between folders or even drop elements from the Project Browser directly into the current diagram With the MDG Link for Visual Studio NET additional functionality is given to the Project Browser This includes the ability to access the Add In menu locate Class diagrams and provide the direct link to editing both Classes and methods in Visual Studio NET 3 1 1 Add In Menu Items To access the Add In menu from the Project Browser right click on an object to display the context menu The Add In menu option is the first entry select it to display the following submenu Merge with Visual Studio Build Project Run Visual Studio VW The Add In menu offers the following options Displays the Merge Project 38 dialog to provide merging options m EES Disconnect from Visual Studio Disconnects the Enterprise Architect package from the Visual Studio Net project to free that package so that it can be connected to other solutions Visual Studio Provides two further options e Display the Visual Studio Connections 157 dialog with details of the Visual Studio NET connections e Import and synchronize work items from Team Foundation Server 48 3 1 2 Loca
14. the View Error button alternatively double click on the Class name 1998 2008 Sparx Systems Pty Ltd 24 MDG Link for Visual Studio NET User Guide Progress Start Build 5 errors encountered Build Errors File Name Invalid token in class struct or interface member declaration ClassLib cs Identifier expected ClassLib cs Class struct or interface method must have a return type ClassLib cs expected Protocols cs The namespace global namespace already contains a definition for Class867868 Class867868 cs TT H 1998 2008 Sparx Systems Pty Ltd Classes 25 3 3 Classes The MDG Link for Visual Studio NET enables flexible creation 2 editing 28 and UML modeling of Class diagrams In UML a Class is represented by a rectangle with at least three separate compartments The upper compartment shows the name of the Class and if it has one the stereotype of the Class The middle compartment displays the attributes of the Class and the final compartment details the methods or operations that are available for the Class An example of a UML Class is shown below input element m_delvery int Property memory amp int CisssLib CisssLib Dispose void finslize void memoryCancel void memoryMinus void memoryPlus void memoryRecall void Li e Events memoryCancel amp boo l void responsibilit
15. the required element in the Project Browser and select the 1998 2008 Sparx Systems Pty Ltd Import and Synchronize TFS Work Items 47 Add In Visual Studio Team Foundation Server Maintain Work Items context menu option _ EA Work Items X h a xc2dg JP mp Work Item Assigned To Created By Priority Title 34 Requirement Alistair Lesli Alistair Lesli 2 Web Site Title web Site Type operational D m Classification Area path fALH Requirements Fw Iteration path DE Status Assgnedto Alistair Lesie Hughes zl gedeg be d Priority f v state Proposed zs Triage Triaged Reason investigation Complete Committed Io S Description analysis subject Matter Experts History Links attachments Details Description The web site Needs to look pretty The EA Work Items tab has a toolbar The functions provided by the toolbar icons are from left to right e Add New Work Item create a new work item linked to the currently selected element e Save Save all changes to the current work item selected from the panel underneath the toolbar e Link Link one or more work items to the selected element e Remove unlink selected work items from the selected element e Properties Define the current Team Foundation Server connection properties displays the Link Properties 4 dia
16. 0 Edit Properties in Enterprise Architect 20 B Build Project Dialog Options 23 Errors 23 Within Enterprise Architect 22 C Class Add Inheritance 31 Add Related Elements 32 Assign To File For Export To Code 42 Attributes Edit 30 Code In Visual Studio NET 25 Create 26 Edit Attibutes And Operations 30 Edit Code In Visual Studio NET 18 Edit In Enterprise Architect 28 Edit Properties in Enterprise Architect 18 Edit Switch To Visual Studio NET 29 Element In Enterprise Architect 25 Find Associations 32 Generate Code From In Enterprise Architect 40 Generate Code From Via MDG Link Merge Locate In Project Browser 18 Operations Edit 30 Properties 26 Toolbox Page 26 Code Add Comments To 35 Assign Class To File For Export To 42 Edit in Visual Studio NET 34 Edit Introduction 34 Generate From Class Element 40 Generate From Class Element Via MDG Link Merge 41 Generation 40 Synchronize With Model 44 Comments Add To Code 35 Compiled April 28 2008 2 Connect To TFS 46 Connection Properties 46 To TFS Configure 46 Copyright 4 Create Model From Visual Studio NET Code 17 Visual Studio NET Code From Model 17 D Diagrams Automatic Layout 37 Format 37 UML 37 Disconnect From TFS 46 ye Edit Attribute Code In Visual Studio NET 20 Attribute Properties in Enterprise Architect 20 Class Attributes 30 Class Code In Visual Studio NET 18 Class in Enterprise Architect 28 Class Operations 30 Class Propert
17. C Ignore locked files None Forward Export Reverse s C Controls Classi Both C Controls Class2 O Controls Class3 aC O Click on the drop down arrow and select one of the four options for merging None select to not perform synchronization Forward select to generate code from the Enterprise Architect model into Visual Studio NET Reverse select to bring code out of Visual Studio NET into the Enterprise Architect model Both select to perform the operation of forward engineering and then the operation of reverse engineering which fully synchronizes the model and the code Note Synchronization only applies to Classes that appear in both the model and the source code in Visual Studio NET Ignore Locked files Select to ignore locked files in the import or export Lists Classes that are present only within the model and that are not currently included in the code in Visual Studio NET You select Classes from this list for export if a Class is not selected it is not included in the export Click on the All button to select all of the Classes in the list Click on the None button to clear all selections in the list Lists Classes that are present only within the code in Visual Studio NET and that are not currently included in the model You select Classes from this list for import If a Class is not selected it is not included in the import 1998 2008 Sparx Systems Pty Ltd 40 MDG Link fo
18. E GB public class ClassLib private int m delivery public int memory public ClassLib ClassLib public virtual void Dispose public void finalize public void memoryCancel D public void memoryMinus public void memoryP lus public void memoryRecall D lt summary gt This is the memoryCancel operation lt summary gt lt param name memoryCancelParam gt lt param gt public abstract static void memoryCancel out bool memoryCancelParam end ClassLib 3 4 2 Add Code Comments To add comments to code from Enterprise Architect follow the steps below 1 On a diagram right click on the Class or in the Project Browser right click on the Class or method Select the Properties context menu option The appropriate Properties dialog displays 2 In the Note field type the comments x ClassLibrary1 Microsoft Visual Studio General Details Require Constraints Links Scenario Files Edit View Refactor Project Build Debug Data Tools Window Community Help H zl LGS Ho A am 4 PD oD Name ClassLib Stereotype Ld il sFinalize Author Suzanne Pearson amp Status a d Scope Public Complexity summary Alias Language This is some lt i gt Notes lt i gt lt b gt lt b gt text It is formatted Persistence Keywords ul p li On the lt b gt Notes lt b gt field of the lt font Phase Vi J e
19. M Work Item Field E Property Title State Rev Changed By Issue State Change Date Activated Date Activated By Resolved Date Reason Resolved By Assigned To Work Item Type Closed Date Closed By Priority Test Name sl Configure Clear Defaults Work Item Type Click on the drop down arrow and select the type of work item to configure Don t create Elements for this work Select this checkbox to prevent MDG Link for Visual Studio NET item type from creating an Enterprise Architect element if the query returns a work item of the specified type UML Element If MDG Link for Visual Studio NET is to create an element click on the drop down arrow and select the type of element to create Element Stereotype If required click on the drop down arrow and select the stereotype to apply to the element Work Item Field If required click on a work item field against which to configure an Enterprise Architect property Configure Click on this button to select an Enterprise Architect property to configure against the selected work item field Clear the currently selected mapping Default Apply the default mapping for this work item type 3 7 1 Maintain Work Items The EA Work Items tab enables you to add and update work items against a selected element configure the connection to the Team Foundation Server and connect to or disconnect from the server To display the EA Work Items tab right click on
20. My work Items O All work Items C Product Requirements O Blocked Work Items O Resolved Bugs I Change Requests O Reviews O Corrective Actions O Risks Customer Requirements O Custom Requirements CJ Development Tasks Select All Select None Link Selected Queries to Package DK Cancel E 2 Click on the checkbox against each query for which to import work items from Team Foundation Server 3 Click on the Link Selected Queries to Package checkbox 4 Click on the OK button The work items in the selected queries are imported and if the Link Selected Queries to Package checkbox is selected the queries are stored against the package You can return to this dialog to add and remove queries for a package Synchronize With TFS When a package has stored queries against it new elements are automatically added and existing elements updated based on each query Note Elements are never deleted To manage the mapped fields for a work item linked against a UML element right click on the required package in the Project Explorer and select the Add In Visual Studio Team Foundation Server Manage Mapped Fields context menu option The Configure Field Mappings dialog displays 1998 2008 Sparx Systems Pty Ltd 46 MDG Link for Visual Studio NET User Guide Configure Field Mappings x Work ltem Type 7 Dont create Elements for this work item type UML Element Action Element Stereotype
21. Selected to File Select None Reset Default Names To assign a filename to a Class follow the steps below 1 Click on the Class to assign a filename to or press Ctrl and click on a number of Classes 2 To assign the file name click on the Assign Selected to File button Enterprise Architect prompts you for a file path for the Class to be saved B Assign selected to the following files OO5 Projects ClassLibrary1 ClassLibrary2 LibCheck1 cs ke 3 Overtype the path name or use the Browse button to search for a file location Click on the OK button to assign the file 4 To cancel the assigned filename and return to the previous filename click on the Reset Default Names button 5 When you have finished assigning the filenames click on the OK button The Merge Progress window displays with status messages as the merge proceeds If a Class is not assigned a Save As dialog displays to prompt you for a file location 3 6 4 Reverse Engineering Reverse engineering creates or updates the UML model from the Visual Studio NET source code This action enables you to convert a legacy system to a model to examine the architecture of the existing code When updating or synchronizing an existing model from code you update the data that differs between the code and model you do not recreate the entire model You can reverse engineer code to a model in several ways with the MDG Link for Visual Studio NET in Enterprise A
22. d Vie CH E Class867868 Import s Header s Help This dialog enables you to define e The Path where the source is to be generated Click on the Browse button to display a file browser dialog which defaults to the path of the current Visual Studio NET Solution e The Target language for generation select the language to generate this becomes the permanent option for that Class so change it back if you only want to do one pass in another language e Advanced settings note that the settings you make here only apply to the current Class e Import statements two areas in which to define import statements or includes defines and macros in Visual C For Visual C this area is placed in the header file e Generate click on this button to generate your source code a Progress dialog displays messages as the 1998 2008 Sparx Systems Pty Ltd Round Trip Engineering 41 generation proceeds e View click on this button to view the generated source code in Visual Studio NET 3 6 3 2 Forward Engineer with a Merge To generate code with a merge once a link has been created 15 to a Visual Studio NET Project follow the steps below 1 Select the Add In Merge with Visual Studio context menu option uj Ust Vase TU Clacc Madal Build Project Properties Run Package Control Disconnect from Visual Studio Add Visual Studio Linked Document Ctri Alt D
23. dential between Sparx Systems and the client and remains the exclusive property of Sparx Systems If you find any problems in the documentation please report them to us in writing Sparx Systems does not warrant that this document is error free No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or by any means electronic mechanical photocopying recording or otherwise without the prior written permission of Sparx Systems Licensed users are granted the right to print a single hardcopy of the user manual per licensed copy of the software but may not sell distribute or otherwise dispose of the hardcopy without written consent of Sparx Systems Sparx Systems Pty Ltd 7 Curtis St Creswick Victoria 3363 AUSTRALIA Phone 61 3 5345 1140 Fax 61 3 5345 1104 Support Email support sparxsystems com Sales Email sales sparxsystems com Website www sparxsystems com 1998 2008 Sparx Systems Pty Ltd Software Product License Agreement 5 1 3 Software Product License Agreement MDG Link for Visual Studio NET Copyright C 1998 2008 Sparx Systems Pty Lid All Rights Reserved IMPORTANT READ CAREFULLY This End User License Agreement EULA is a legal agreement between YOU as Licensee and SPARX for the SOFTWARE PRODUCT identified above By installing copying or otherwise using the SOFTWARE PRODUCT YOU agree to be bound by the terms of this EULA If YOU do
24. e From Element 46 Synchronize 45 TFS 45 TFS Maintain 46 1998 2008 Sparx Systems Pty Ltd 53 1998 2008 Sparx Systems Pty Ltd MDG Link for Visual Studio NET User Guide www sparxsystems com
25. e functionality of your Classes but instead creates a more readable diagram A facility is provided by Enterprise Architect to layout diagrams automatically This creates a reasonable tree based structure from the Class diagram elements and relationships in a diagram Owing to the complexity of many Class diagrams the results might require some manual tweaking To format your UML Class diagram follow the steps below 1 Select a diagram 2 Select the Diagram Layout Diagram menu option For more information on the options for laying out a UML Class diagram see the Layout a Diagram topic 1998 2008 Sparx Systems Pty Ltd 38 MDG Link for Visual Studio NET User Guide 3 6 Round Trip Engineering The MDG Link for Visual Studio NET round trip engineering process enables you to model your application in UML 2 1 notation then generate forward engineer 40 the code elements to Visual Studio NET based on the model perform modifications and implement the code as necessary and then reverse engineer 42 that code back into the Enterprise Architect model This results in consistency between the model and the external code base and can be achieved with a merge at the touch of a button The MDG Link for Visual Studio NET also enables you to merge the project The merge options include the option to both forward and reverse engineer Classes at the same time to completely synchronize the code and the model 44 3 6 1 M
26. erge Options Merging enables you to reverse engineer code from a Visual Studio NET project or to generate code from an Enterprise Architect model into a Visual Studio NET project Merging interrupts the normal processes involved in forward and reverse engineering enabling a greater level of control than is available in the standard versions of Enterprise Architect Performing a merge enables you to e Choose the filename 4 for new Classes created in Enterprise Architect to assign more than one Class to the same file name e Export 4 selected Classes to export code only on selected Classes e Import 43 selected Classes to import code only on selected Classes e Synchronize the Modell 44 and the source code in one simple step a synchronized merge forward engineers the model from Enterprise Architect into Visual Studio NET and then reverse engineers the code from Visual Studio NET into the Enterprise Architect model in one simple step enabling the model and the code to accurately represent each other e Optionally ignore locked files 3 6 2 Merge Project Dialog Options To perform a merge you select the Add Ins Merge with Visual Studio menu option The Merge Project dialog displays The Merge Project dialog enables you to connect to and disconnect from a single Visual Studio Net project 1998 2008 Sparx Systems Pty Ltd Round Trip Engineering 39 Merge Project Godesamples Synchronize Select Type
27. g an Enterprise Architect model that has already been configured on another machine you must still tell the MDG Link where the solution lies To do this open the solution through Visual Studio NET and click on any of the menu items 1998 2008 Sparx Systems Pty Ltd Merge for the First Time 17 2 4 Merge for the First Time Merging for the first time enables you to reverse engineer code from a Visual Studio NET project or to generate code from an Enterprise Architect model into a Visual Studio NET project Merging the model is a simple task once a link has been created 15 to Visual Studio NET you can then perform a merge from the Project Browser or from the Add Ins Connect External Project Visual Studio menu option on the Enterprise Architect menu bar Settings Window Help l Visual Studio Visual Studio D Manage Add Ins To perform a merge from the Project Browser select an item from the hierarchy and right click on the connected package The context menu displays for the item Select the Add In Merge with Visual Studio menu option mp mg ust Vase muut GE Fe EE BI Build Project A Properties Run Package Control Disconnect from Visual Studio Add Visual Studio e Linked Document Ctri Alt D For more information on the options that are available for merging see the Merge Project Dialog Options 38 topic 1998 2008 Sparx Systems Pty Ltd 18 MDG Link for
28. he package that is to represent the Visual Studio project 4 Right click on the package to display its context menu and select the Add In Connect External Project Visual Studio menu option The Visual Studio Connections dialog displays VisnalsStodio Connechons Enterprise Architect Packages nn Package Visual Studio Project Class Model ClassLibrary1 E t Browse Active Visual Studio Projects Solution ProjectName Project Guid C Documents and Settings rchester ClassLibraryl 2493E6E8 1 CBB 43F2 9704 591CC47C43 The Visual Studio Connections dialog enables you to review and configure connections to Visual Studio Net from this project Fied Beserpion Cd Enterprise Architect Shows the Enterprise Architect packages in the current model that Packages are connected to Visual Studio net projects Selected If the currently selected package in the Enterprise Architect Project Browser has a new screen Active Visual Studio The Visual Studio NET projects that you can connect to Projects Button Description CS Connect Connect the Enterprise Architect package to the selected Visual Studio project Browse Locate and select a Visual Studio solution via Windows Explorer Once selected the solution and its projects appear in the Active Visual Studio Projects list 1998 2008 Sparx Systems Pty Ltd 16 MDG Link for Visual Studio NET User Guide Note If you are usin
29. ided by SPARX including advice on usage of MDG Link for Visual Studio NET investigation of bugs fixes repairs of models if and when appropriate and general product support e SPARX support engineers means employees of SPARX who provide on line support services e Trial edition of MDG Link for Visual Studio NET means the edition of the SOFTWARE PRODUCT which is available free of charge for evaluation purposes for a period of 30 days GRANT OF LICENSE In accordance with the terms of this EULA YOU are granted the following rights a To install and use one copy of the SOFTWARE PRODUCT or in its place any prior version for the same operating system on a single computer As the primary user of the computer on which the SOFTWARE PRODUCT is installed YOU may make a second copy for your exclusive use on either a home or portable computer b To store or install a copy of the SOFTWARE PRODUCT on a storage device such as a network server used only to install or run the SOFTWARE PRODUCT over an internal network If YOU want to increase the number of users entitled to concurrently access the SOFTWARE PRODUCT YOU must notify SPARX and agree to pay an additional fee c To make copies of the SOFTWARE PRODUCT for backup and archival purposes EVALUATION LICENSE The Trial version of MDG Link for Visual Studio NET is not free software Subject to the terms of this agreement YOU are hereby licensed to use this software for evaluation purposes wi
30. ies Requirement 1 test scripts Unit Pass Test 1 Unit Not Run Test 2 notes This is some Motes text It is formatted On the Notes field of the Properties dialog In the Notes compartment of the element and In the Motes window The C code that corresponds to this Enterprise Architect Class displays in Visual Studio Net for this Class as in the diagram below 1998 2008 Sparx Systems Pty Ltd 26 MDG Link for Visual Studio NET User Guide _ ClassLib cs 772 lt summary gt m This is some lt i gt Notes lt i gt lt b gt lt b gt text It is formatted lt ul gt lt li gt On the lt b gt Notes lt b gt field of the lt font color ff0000 gt lt i gt Properties lt i gt lt font gt dialog lt 1li gt lt li gt In the lt b gt Notes lt b gt compartment of the element and lt li gt lt li gt In the lt font color ff0000 gt lt i gt Notes lt i gt lt font gt window lt 1i gt c ul gt summary y gt Sids class ClassLib private int m delivery public int memory public ClassLib ClassLib public virtual void Dispose public void finalize public void memoryCancel DI public void memoryMinus ol d t2 public void memoryPlus public void memoryRecall S E lt summary gt This is the memoryCancel operation CJ summar y gt r
31. ies in Enterprise Architect 18 Class Switch To Visual Studio NET 29 Code In Visual Studio NET 34 Operation Code In Visual Studio NET 19 Operation Properties in Enterprise Architect 19 Engineering Forward 40 Reverse 42 Round Trip 38 Execute Project Within Enterprise Architect 22 1998 2008 Sparx Systems Pty Ltd SFe Forward Engineering 40 From Enterprise Architect Via MDG Link Merge 41 G Generate Code From Class Element In Enterprise Architect 40 Code From Class Element Via MDG Link Merge 41 Import TFS Work Items Inheritance Add To Class Initial Merge 17 L License 5 Link Package To Visual Studio NET Project Manage Mapped Work Item Fields Mapped Fields Manage 48 MDG Link For Visual Studio NET Activate 12 Copyright 4 Features 2 License 5 License Keys 12 Link Package To Visual Studio NET Project 15 Order 11 Register 12 SetUp 14 Support 9 System Requirements Trademarks 8 User Forum 9 Welcome 2 40 45 31 15 48 10 Index 51 Merge Code And Model 38 44 Code Into Model 43 Code To Create Model In Enterprise Architect 17 Dialog 38 Facilities 38 Initial 17 Model Into Code 41 Model To Generate Code In Visual Studio NET 17 Options 38 Model Generation 42 Synchronize With Code 44 Navigation Of Project 18 ocate Element In Project Browser 18 Operation Edit 30 Edit Code In Visual Studio NET 19 Edit Properties in Enterprise Archi
32. is to be implemented in for example 1 1 1 2 0 The version of the Class 3 3 2 Edit Class With the MDG Link for Visual Studio NET you can edit the Class from within Enterprise Architect or from Visual Studio NET When editing the Class in Enterprise Architect you can add and delete both attributes and operations as well as define inheritance Class dependencies and uses For more information on adding inheritance to Classes see the Add Inheritance to Classes 31 topic To access the Class in Enterprise Architect and perform editing in Visual Studio NET see the Edit Class Switch to Visual Studio NET 297 topic To edit the properties of a Class in Enterprise Architect follow the steps below 1 Select the Class to modify from either a Class diagram or the Project Browser 2 Right click on the Class The context menu displays 1998 2008 Sparx Systems Pty Ltd Classes 29 Add Ins D Advanced D Create Linked Document Ctrl Alt D Add gt Find D Transform Ctrl H Embedded Elements D Attributes Operations al Feature Visibility Ctrl Shift Generate Code F11 Synchronize with Code F7 view Source Code F12 Create Workbench Instance Ctrl Shift J Lock Element Selectable Appearance b Z Order gt UML Help 3X Delete ClassLib Ctrl D 3 Select the Properties menu item or press Alt Enter to display the Class Properties dialog which has a series of optio
33. lick on it to display its context menu e Select the Operation Properties option to display the operation Properties dialog within Enterprise Architect e Select the View Source Code option to edit the operation in Visual Studio NET this displays the operation in the code 1998 2008 Sparx Systems Pty Ltd 20 MDG Link for Visual Studio NET User Guide CF a uiergaui c Sub File Edit View Refactor Project Build Debug Data Tools Window Community Help ly ay OF Ma Ap a Gb eb z _ ClassLib cs ClassLib gY memoryCancel out bool memoryCancelParam void memoryCancel t void memoryMinus void memoryPlus void memoryRecall lt summary gt This is the memory Cancel operation wmar y gt am name memoryCancelParam gt lt param gt L end ClassLib 3 1 5 Edit Attributes public abstract static void memoryCancel out bool memoryCancelParam Development Model i Dynamic View n 68 Class Model 3 Class Model E Class867868 o Ej ClassLib Q ClassLib Q Finalize 9 m delivery Q memory wt ANS Ay ClassLib Q Dispose 4 memoryCancel amp bool Q memoryCancel Q memoryMinus Q memoryPlus Q memoryRecall 8 Account Am Account E Basket A Bilingaddress A DeliveryAddress E order Order Q BilingAddress Basket DeliveryAddress REQ034 Create Order 9 Component View a a Use Case View The Project Bro
34. lity correctness accuracy reliability correspondence with any description or sample meeting your or any other requirements uninterrupted use compliance with any relevant legislation and being error or virus free are excluded Where any legislation implies in this EULA any term and that legislation avoids or prohibits provisions in a contract excluding or modifying such a term such term shall be deemed to be included in this EULA However the liability of SPARX for any breach of such term shall if permitted by legislation be limited at SPARX s option to any one or more of the following upon return of the SOFTWARE PRODUCT and a copy of the receipt e lf the breach relates to the SOFTWARE PRODUCT e the replacement of the SOFTWARE PRODUCT or the supply of an equivalent SOFTWARE PRODUCT e the repair of such SOFTWARE PRODUCT e the payment of the cost of replacing the SOFTWARE PRODUCT or of acquiring an equivalent SOFTWARE PRODUCT or e the payment of the cost of having the SOFTWARE PRODUCT repaired e lf the breach relates to services in relation to the SOFTWARE PRODUCT e the supplying of the services again or e the payment of the cost of having the services supplied again TRADEMARKS All names of products and companies used in this EULA the SOFTWARE PRODUCT or the enclosed documentation may be trademarks of their corresponding owners Their use in this EULA is intended to be in compliance with the respective guidelines and licenses
35. log e Connect Connect to the Team Foundation Server e Disconnect Disconnect from the Team Foundation Server Connection Properties The Link Properties dialog enables you to configure the connection to the Team Foundation Server Link Properties xj Please select a project for storing work items Team Foundation Server Team System Project Make Selected Project the Default Cancel 1998 2008 Sparx Systems Pty Ltd 48 MDG Link for Visual Studio NET User Guide In the Team Foundation Server field type the name of the server to connect to In the Team System Project field type or select the name of the project to connect to Select the Make Selected Project the Default checkbox to make the specified project the default Click on the OK button Pe NS 3 7 2 Manage Mapped Fields To manage the mapped fields for a work item linked against a UML element right click on the required package in the Project Explorer and select the Add In Visual Studio Team Foundation Server Manage Mapped Fields context menu option Configure Field Mappings x Work ltem Type Dont create Elements for this work item type UML Element Action Element Stereotype Work Item Field E Property Title State Rev Changed By Issue State Change Date Activated Date Activated By Resolved Date Reason Resolved By Assigned To Work Item Type Closed Date Closed By
36. not agree to the terms of this EULA promptly return the unused SOFTWARE PRODUCT to the place of purchase for a full refund The copyright in the SOFTWARE PRODUCT and its documentation is owned by Sparx Systems Pty Ltd A B N 38 085 034 546 Subject to the terms of this EULA YOU are granted a non exclusive right for the duration of the EULA to use the SOFTWARE PRODUCT YOU do not acquire ownership of copyright or other intellectual property rights in any part of the SOFTWARE PRODUCT by virtue of this EULA Your use of this software indicates your acceptance of this EULA and warranty DEFINITIONS In this End User License Agreement unless the contrary intention appears e ACADEMIC EDITION means an edition of the Software Product purchased for educational purposes at an academic discount price e EULA means this End User License Agreement e SPARX means Sparx Systems Pty Ltd A B N 38 085 034 546 e Licensee means YOU or the organization if any on whose behalf YOU are taking the EULA e Registered Edition of MDG Link for Visual Studio NET means the edition of the SOFTWARE PRODUCT which is available for purchase from the web site lt http Awww sparxsystems com ea_purchase htm gt e SOFTWARE PRODUCT or SOFTWARE means MDG Link for Visual Studio NET which includes computer software and associated media and printed materials and may include online or electronic documentation e Support Services means email based support prov
37. ns as detailed in the Create Class 27 topic The Class Properties dialog also gives you access to the Class attributes and operations To edit these items see the Edit Class Attributes and Operations 30 topic 3 3 3 Edit Class Switch to Visual Studio NET To edit a Class in Visual Studio NET from Enterprise Architect follow the steps below 1 Select the Class from a diagram 2 Right click on the Class The context menu displays 1998 2008 Sparx Systems Pty Ltd 20 MDG Link for Visual Studio NET User Guide Add Ins D amp f Properties Alt Enter Advanced D E Create Linked Document Ctrl Alt D Add gt Find gt Transform Ctrl H Embedded Elements D Attributes Operations GA Feature Visibility Ctrl Shift Es Generate Code Fil SL Synchronize with Code F7 Create Workbench Instance Ctrl Shift J AA Lock Element Selectable Appearance b 2 Order D UML Help 3X Delete ClassLib Ctrl D 3 Select the View Source Code menu option or alternatively press F12 Visual Studio NET opens displaying the Class at the start of the code ready for editing 3 3 4 Edit Class Attributes and Operations It is possible to edit the attributes and operations of a Class from within Enterprise Architect 1 Access the Class Properties dialog following the steps outlined in the Edit Class 25 topic Click on the Detail tab The dialog displays as shown below 1998
38. ocate Elements 18 gel EC 18 Edit Operations e 19 EdgzAHrtbuleg IE EI 20 Bund PROJ ie e EE 22 Build and RUN a Project EEE 22 Build Dialog Options csssssssessesessensenseessenseesseeseeeseeneeseenseeseseeeesaeeneesseenaeeseeneesaseneessesnasesaenaeesasennenagens 23 Build Project Errors ssssscsssssssseseesessensenseesenseessenseesseeseeseeseeeseseseesaeeneessesnaeeseenseesaeeneessesnaessaenaeeseaennenaaens 23 EE 25 Create ei ET 26 2 Te EE 28 Edit Class Switch to Visual Studio NET 29 Edit Class Attributes and Operations eese r Lee Lee see scene esee tna nn ntn a tna tn atn ates tna teams ananas anenee 30 Add Inheritance to Classes Lone etre noinen san c naaa pa poa aaa EY Y 2p aao daa aipeanna ada anaana aana inaa CE CR a Ge 31 Add Class and Find Association Links eeeeeeeeece eese e esee nennen nnne nen n nnne n nente nnns ans s nnns nnnm n anas nsns nnn 32 enn ME M 34 Ed eres PEDE E G MH 34 Add Code Comments 35 IN el 37 Format a Diagram ssccssccsessesscsseseesseesseesenseeseeseenseeneenseenessaeeseesaeeneesseeneeeseenaeseaeeneesaesneenseenaeesaenseeeaeensenaaes 37 Round Trip Engineering 2 s ecccesceeceseeseeeeeeeseeeeeeeesneeeeeessneesee
39. ols ListColumn O Controls ListColumns o antros List tem O Controls Listltems O Controls ListSubltem PICe Zeckt hltana a 8 3 Inthe Select Type field click on the drop down arrow and select Reverse to update elements contained in the model from Classes contained in the code 1998 2008 Sparx Systems Pty Ltd 44 MDG Link for Visual Studio NET User Guide 4 The items in the Import section are elements that currently exist in the model but do not exist in the code Select the checkbox against each element to be imported into the code or click on the All button to select all of the elements 5 Click on the Go button to reverse engineer the code A Merge Status window displays showing a series of status messages as the merge progresses This window automatically closes when the merge is complete 3 6 5 Synchronize Code and Model Synchronizing the code with the model is a simple task once a link has been created 15 to a Visual Studio NET Project You can perform a merge at any time by following the steps below 1 Right click on the connected package in the Enterprise Architect Project Browser window The context menu for the package displays 2 Select the Add In Merge with Visual Studio menu option The Merge Project dialog displays Merge Project Glassiibrany2 Synchronize Select Type Ect C Ignore locked files Export Import 3 Inthe Select Type field click on the dro
40. p down arrow and select Both 4 If there are new Classes listed in the Export and or Import panels select the checkbox against each Class to add to the model or code as required 5 Click on the Go button If you selected new Classes to be exported from the model to code the Assign classes to files for export dialog displays Assign the Classes 421 as appropriate 6 The Merge Progress screen displays showing messages as the forward engineering export and reverse engineering import are performed This screen automatically closes when the merge is complete 1998 2008 Sparx Systems Pty Ltd Import and Synchronize TFS Work Items 45 3 7 Import and Synchronize TFS Work Items MDG Link for Visual Studio NET enables you to import and synchronize work items from Team Foundation Server It also enables you to add view edit and unlink work items 46 that have been linked against a UML element and to map work item fields 485 against Enterprise Architect elements and element properties Import Work Items To import work items follow the steps below 1 Inthe Project Explorer right click on the required package and select the Add In Visual Studio Team Foundation Server Import Work Items context menu option The Select Queries dialog displays Select Queries Custom Requirements x O Active Bugs O Issues O All My Team Project Work Items Mitigation Action Status O All Tasks D
41. po Ex color f 0000 gt lt i gt Properties lt i gt lt font gt dialog lt 1i gt Notes li In the lt b gt Notes lt b gt compartment of the element and lt li gt E7 rwv li In the font color f f0000 gt lt i gt Notes lt i gt lt font gt window lt 1li gt This is some Notestext t is formatted M nd Onthe Notes field of the Properties dialog lt summary gt Inthe Notes compartment of the element and g public class ClassLib Inthe Notes window private int m delivery L e J me sl me 1998 2008 Sparx Systems Pty Ltd 36 MDG Link for Visual Studio NET User Guide 3 Click on the Apply and OK buttons then click on the Class or method and press either F7 Synchronize with code or F11 Generate code to update the code with the changes Note Comments in the Enterprise Architect Notes fields can be formatted using Rich Text Notes formatting commands These commands display in text in the comment code in Visual Studio NET 1998 2008 Sparx Systems Pty Ltd Diagrams 37 3 5 Diagrams UML Diagrams are collections of project elements laid out and inter connected as required Enterprise Architect supports several kinds of UML diagrams as well as custom extensions For full details see UML Diagrams 3 5 1 Format a Diagram Formatting a UML Class diagram does not change th
42. r Visual Studio NET User Guide Fed Deseriptiom ooo Click on the All button to select all of the Classes in the list Click on the None button to clear all selections in the list Buttons Description o Go Executes tne merae o Help o Opens the help file 3 6 3 Forward Engineering Code Generation forward engineering generates and updates code from the UML model and places it into Visual Studio NET When used to generate a Class created purely in Enterprise Architect the code that is created in Visual Studio NET consists of constructors and destructors as well as get and set methods This leaves generation of the business operations of the code up to you When updating or synchronizing existing code from the model you update the data that differs between the code and model you do not regenerate all the code You can generate code in several ways with the Enterprise Architect MDG Link for Visual Studio NET using the Merge option on the Add Ins menu as well as from the context menu of a Class 3 6 3 1 Forward Engineer from a Class The Generate Code dialog enables you to control how your source code is generated Normally you access this dialog from the context menu of a single Class or interface Right click on the Class or interface and select the Generate Code context menu option Alternatively select the Class or interface and press F11 Path C NEANEA TeststuffNClass857858 cs Target language Details
43. rchitect from a Merge operation or from the context menu of a Class 1998 2008 Sparx Systems Pty Ltd Round Trip Engineering 43 3 6 4 1 Reverse Engineer from a Visual Studio NET Source Class ee reverse engineer import Visual Studio NET source code into an existing model Class follow the steps elow 1 In the diagram or the Project Browser window right click on the Class to be updated from the code The context menu displays 2 Select the Synchronize with code menu option or press F7 Enterprise Architect automatically updates the model Class from the Visual Studio NET code 3 6 4 2 Reverse Engineer with a Merge To generate code with a merge once a link has been created 15 to a Visual Studio NET Project follow the steps below 1 Right click on the required package for the linked Visual Studio NET project 2 Select the Add In Merge with Visual Studio menu option uy Ust asc Tu mW et Maal Build Project d Build Projec f Properties Run Package Control Disconnect From Visual Studio Add Visual Studio Linked Document Ctri Alt D The Merge Project dialog displays Merge Project CodeSamples Synchronize Select Type v C Ignore locked files Export O Business Process Model ClassTest O Class1 C Controls BaseComboBox C Controls FocusChangeE vent amp rgs O Controls IListColumnE numerator I Controls IListltemE numerator O Controls IListSubltemE numerator O Contr
44. reotype GJ C Abstract Author Frederick Walter Status Proposed Scope Public Complexity Easy Alias Language C Persistence Keywords Phase 1 0 Version 1 0 Notes Advanced SE x X O E a This is some Notestext tt is formatted Onthe Notes field of the Properties dialog Inthe Notes compartment of the element and Inthe Notes window 2 Apr du This dialog offers a range of options The following options are availa the General tab Hed Description Name The name of the Class Stereotype Stereotypes are based on certain existing types or Classes in the meta model They can extend the semantics but not the structure of pre existing types and Classes Select to set the Class as an abstract Class deselect to set the Class as a concrete Class Author The name of the user who created the Class Status Flags the status of the Class ble on 1998 2008 Sparx Systems Pty Ltd 28 MDG Link for Visual Studio NET User Guide Field Description Cd Scope Determines the visibility of the Class public private protected or package Complexity Used for project estimation easy medium hard alas Domes an aterata dspiay name tor ne oea typically used for items such as keywords or context information Phase Indicates the phase this element
45. ssneeseesesneesesesaneesesssneeeeeeesnees 38 L U 3 0 0 Ji 38 Merge Project Dialog Options 1 neeeee esee e esee e eeee eene e enne nnne n nnn nn anna tna tna sna sna tha seats assa ss assa ns sn snas snas 38 Forward Engineering Rz trrrrrr 40 Forward Engineer from a Class 40 Forward Engineer with a Merge nnne tnnt tnnt nnne nn nnn tnnt nre 41 1998 2008 Sparx Systems Pty Ltd H MDG Link for Visual Studio NET User Guide Assign Classes to Files for Export 42 Reverse Engineering ssscsssssssesssssssessseseessesseseesensecssesesesaesassasnaenesneeseeseesesseeseeaeeateaesasessassassaseaseaess 42 Reverse Engineer from a Visual Studio NET Source Class 43 Reverse Engineer with a Merge nennen nnne nnn nenne tnnt nnn nnne nnn nnns 43 Synchronize Code and Model eerie eee Lees ene seese esee nne tn anna tease anna tna tn anna sns nn anna sesta sns ennen 44 Import and Synchronize TFS Work Items sseeseeeeeeeeeseeeee nennen nennen nnne 45 Maintain Work Items 46 Manage Mapped Field AA A A A A A A A A A A A A 48 Index 50 1998 2008 Sparx Systems Pty Ltd Foreword 1 Foreword MDG Link for Visual St
46. sual Studio NET enables flexible creation 2 editing 28 and UML modeling of Class diagrams 3 4 1 Edit Code The MDG Link for Visual Studio NET adds extra functionality to the code generation abilities of Enterprise Architect In addition to generation of code 40 forward engineering and synchronization of code 44 reverse engineering the MDG Link for Visual Studio NET enables you to quickly edit the source code in Visual Studio NET To edit code follow the steps below 1 In the Diagram View right click on the Class to edit The context menu displays Add Ins gt amp f Properties Alt Enter Advanced gt e Create Linked Document Ctrl Alt D Add gt Find Transform Ctrl H Embedded Elements b Q attributes Operations fa Feature Visibility Ctrl Shift y Generate Code Fil SL Synchronize with Code F7 Create Workbench Instance Ctrl Shift J Ba Lock Element Selectable Appearance b 2 Order D UML Help 5 Delete ClassLib Ctrl D Select the View Source Code menu item or press F12 to open Visual Studio NET to edit the Class code You can also edit from the Project Browser by right clicking the required item which can be a Class attribute or operation to display its context menu then pressing F12 or selecting the View Source Code menu option to edit the code 1998 2008 Sparx Systems Pty Ltd Code 35 ClassLib cs Rg ClassLib
47. t Form1 Dispose Boolean Form1 Form1_Load System Object System EventArgs 6 To update the model to the source code follow the steps outlined in Synchronize Code and Model 44 3 3 6 Add Class and Find Association Links One of the powerful options available in MDG Link for Visual Studio NET is the ability to add one Class to a diagram and to find the relationships between Classes that link to the original Class To achieve this follow the steps below 1 Create a new diagram and in the Project Browser find the Class that you are interested in 2 Drag this Class onto the diagram workspace and paste it as a Simple Link 3 Right click on the Class to display its context menu and select the Add Related Elements menu option The Insert Related Elements dialog displays Joanna kiad REE Details Insert elements to E levels For Link Type With Link Direction Limit to Element Type Layout Diagram When Complete Limit to this Namespace 1998 2008 Sparx Systems Pty Ltd Classes 33 Use the options on this dialog to bring the related Classes into the diagram giving you a picture of the relationships between the original Class and other related Classes For more information relating to the options of this dialog see the Insert Related Elements topic 1998 2008 Sparx Systems Pty Ltd 34 MDG Link for Visual Studio NET User Guide 3 4 Code The MDG Link for Vi
48. te Elements Locating an element in the Project Browser can be a difficult task especially when the size of a package has increased to include many Classes To locate a Class in the Project Browser right click on the Class in a diagram to display its context menu Then select the Find In Project Browsermenu option The Class is highlighted in the Project Browser Alternatively select the Class in the diagram and press AIt G 3 1 3 Edit Classes The Project Browser enables you to easily access the details of a Class so that you can edit the Class properties directly from Enterprise Architect or in Visual Studio NET To select a specific Class follow the steps below 1 Inthe Project Browser navigate to the package containing the required Class 1998 2008 Sparx Systems Pty Ltd Add In Options from the Project Browser 19 2 Expand the details of the Class by clicking on the symbol next to the Class name 3 Right click on the Class to display its context menu e Select the Properties option to access the Class Properties dialog in Enterprise Architect e Select the View Source Code option to edit the Class code in Visual Studio NET CkGEi eoeekzi terozote Visnalstudio Project Browser ee sols E File Edit View Project Build Debug Data Tools Window Community Help ZS G Seng E B Development Model Ei G G bd db A aale E
49. tect 19 Options Merge 38 Project Browser Add In Options 18 Order MDG Link For Visual Studio NET 11 Project Build Dialog Options 23 Build Errors 23 Build Within Enterprise Architect 22 Execute Within Enterprise Architect 22 R Register MDG Link For Visual Studio NET Related Elements Add To Class 32 Reverse Engineering Introduction 42 12 1998 2008 Sparx Systems Pty Ltd 52 MDG Link for Visual Studio NET User Guide Reverse Engineering Model From Code 43 Single Class 43 Round Trip Engineering 38 Synchronize Model With Code 44 2G Set Up MDG Link For Visual Studio NET 14 Software Product License Agreement 5 Support 9 Synchronize Class With Code 43 Code And Model 44 Code With Model 40 Forward 40 Model From Code 43 Model With Code 42 Reverse 42 TFS Work Items 45 System Requirements 10 ST Team Foundation Server Configure Connection 46 ConnectTo 46 Disconnect From 46 Import Work Items 45 Maintain Work Items 46 Menu Option 18 Synchronize Work Items 45 TFS Configure Connection 46 ConnectTo 46 Disconnect From 46 Import Work Items 45 Maintain Work Items 46 Menu Option 18 Synchronize Work Items 45 Trademarks 8 U UML Diagrams 37 Visual Studio NET Project Link Package To 15 W Welcome 2 Work Item Manage Mapped Fields 48 Map Fields To Enterprise Architect Properties 48 Work Items Add New 46 Import 45 Link To Element 46 Remov
50. the SOFTWARE PRODUCT will perform substantially in accordance with the accompanying written materials for a period of ninety 90 days from the date of receipt and any Support Services provided by SPARX shall be substantially as described in applicable written materials provided to YOU by SPARX and SPARX support engineers will make commercially reasonable efforts to solve any problems associated with the SOFTWARE PRODUCT EXCLUSIONS To the maximum extent permitted by law SPARX excludes for itself and for any supplier of software incorporated in the SOFTWARE PRODUCT all liability for all claims expenses losses damages and costs made against or incurred or suffered by YOU directly or indirectly including without limitation lost costs profits and data arising out of e YOUR use or misuse of the SOFTWARE PRODUCT e YOUR inability to use or obtain access to the SOFTWARE PRODUCT e Negligence of SPARX or its employees contractors or agents or of any supplier of software incorporated in the SOFTWARE PRODUCT in connection with the performance of SPARX obligations under this EULA or e Termination of this EULA by either party for any reason LIMITATION The SOFTWARE PRODUCT and any documentation are provided AS IS and all warranties whether express implied statutory or otherwise relating in any way to the subject matter of this EULA or to this EULA generally including without limitation warranties as to quality fitness merchantabi
51. thout charge for a period of 30 days Upon expiration of the 30 days the Software Product must be removed from the computer Unregistered use of MDG Link for Visual Studio NET after the 30 day evaluation period is in violation of Australian U S and international copyright laws SPARX may extend the evaluation period on request and at their discretion If YOU choose to use this software after the 30 day evaluation period a license must be purchased as described at http www sparxsystems com ea_purchase htm Upon payment of the license fee YOU will be 1998 2008 Sparx Systems Pty Ltd 6 MDG Link for Visual Studio NET User Guide sent details on where to download the registered edition of MDG Link for Visual Studio NET and will be provided with a suitable software key by email ASSIGNMENT YOU may only assign all your rights and obligations under this EULA to another party if YOU supply to the transferee a copy of this EULA and all other documentation including proof of ownership Your license is then terminated TERMINATION Without prejudice to any other rights SPARX may terminate this EULA if YOU fail to comply with the terms and conditions Upon termination YOU or YOUR representative shall destroy all copies of the SOFTWARE PRODUCT and all of its component parts or otherwise return or dispose of such material in the manner directed by SPARX WARRANTIES AND LIABILITY WARRANTIES SPARX warrants that
52. udio NET provides a light weight bridge between Enterprise Architect and Visual Studio NET 1998 2008 Sparx Systems Pty Ltd 2 MDG Link for Visual Studio NET User Guide 1 1 Welcome Visual Studio NET MDG Link Welcome to the Model Driven Generation Link for Visual Studio NET The MDG Link for Visual Studio NET is designed to enable you to work simultaneously with both Enterprise Architect and Visual Studio NET and merge the changes with minimal effort The MDG Link for Visual Studio NET works with both the Professional and Corporate editions of Enterprise Architect and provides a tight integration between Enterprise Architect and Visual Studio enabling you to either create UML in Enterprise Architect or generate UML from Visual Studio NET MDG Link for Visual Studio NET has the following features e Provides a simple easy to use connection between Enterprise Architect models and Visual Studio NET projects e Enables you to merge an entire project simply and easily e Provides support for different development configurations e Prompts you with the proposed merge before changes are written 1998 2008 Sparx Systems Pty Ltd Welcome 3 File Edit View Project Diagram Element Tools Add Ins Settings Window Help Bae D ce o wo e Ga E defaut x0Q ZE T This is 2 Notes element you can Tomrat the text of this element too peueisbugeo w3 Q Unit Pass
53. who have contributed suggestions examples bug Sparx Systems reports and assistance in the development of MDG Link for Visual Studio NET The task of developing and maintaining this tool has Managing Editor been greatly enhanced by their contribution Geoffrey Sparks Technical Editors Alistair Leslie Hughes Contents l Table of Contents Foreword 1 Introduction 2 aa ate E E T E E eiiis 2 Copyright N liCE eege EENS EENE EENE EAEE EE 4 Software Product License Agreement eese eeeeeeeee eene nnne nn anna nnn nennen 5 Acknowledgement of Trademarks eeeeeeeeeeeeeeeeeeeeeeen enne nennen nnne nnn nnn 8 LUI MEME 9 System Requiremients edat cce aoo edhe ae aine EE 10 Order MDG Link for Visual Studio NET esee eee ee eeeee nennen nennen nnn 11 Getting Started 12 Register the MDG Link for Visual Studio NET ccccceseeceeeseeeeeeeeseeeeeeeseceeseeeseeneeeeeenees 12 SetUp ihe cH 14 Create a Link to a Visual Studio Project eese ennt 15 Merge for the First Time sccesseeeceseeseeeeeensneeeeeeesneeeesessneeseessneeseesesneeseeessneesesssnaeeeesesnaes 17 Perform Tasks with MDG Link for Visual Studio NET 18 Add In Options from the Project Browser eeeeeeeeeeeeee eese eennen nennen nnne nnne 18 Add in Menu lemer 18 L
54. wser enables you to easily access the attributes of a Class so that you can edit the attributes directly from Enterprise Architect or in Visual Studio NET To select a specific attribute follow the steps below 1 Inthe Project Browser locate and expand the details of the required Class 2 Locate the required attribute and right click on it to display its context menu e Select the Attribute Properties option to display the attribute Properties dialog within Enterprise Architect e Select the View Source Code option to edit the attribute in Visual Studio NET this displays the attribute in the code 1998 2008 Sparx Systems Pty Ltd Add In Options from the Project Browser 21 Project Browser ciassSirarnyi Microsol Visual Stadio ex File Edit View Refactor Project Build Debug Data Tools Window Community Help Class Model 83 Class Model I ClassLibrary2 Class867868 ClassLib d Classlib be Q FinalizeQ d y m delivery memory Q ClassLibt Q Dispose Q memoryCancel amp t 4 memoryCancel 4 memoryMinus Q memoryPlus i ER D memoryRecall amp E Account E Component View 43 Use Case View gS Work CS B Deployment View E Timing B Documentation Lal Use Case Model B Old State S i Activity Example i Mindmapping CO lt summary gt a E public class ClassLib private int m delivery public int memory
55. y the license key from the email and paste it into the Copy registration key field 7 Click on the OK button The full version of the MDG Link for Visual Studio NET is available for use with your version of Enterprise Architect 1998 2008 Sparx Systems Pty Ltd 14 MDG Link for Visual Studio NET User Guide 2 2 Set Up the MDG Link Before the MDG Link for Visual Studio NET can perform its main operations an Enterprise Architect package must be configured to link to a particular Visual Studio NET project For more information on how to create a link to a Visual Studio project go to the Create a link to a Visual Studio Project 15 topic Once the install program has been run MDG Link for Visual Studio NET should be accessible through the Add Ins option on the Enterprise Architect menu bar as shown below Settings Window Help Visual Studio D Manage Add Ins If this menu doesn t appear check the System Requirements 1 1998 2008 Sparx Systems Pty Ltd Create a Link to a Visual Studio Project 15 2 3 Create a Link to a Visual Studio Project To link an Enterprise Architect package to a particular Visual Studio NET project follow the steps below 1 From Visual Studio NET open the solution containing the project to link to 2 Ensure that the project is the active project within the solution 3 Open an Enterprise Architect model and in the Project Browser select t
Download Pdf Manuals
Related Search
Related Contents
COMPACT DISC RECORDER / MULTI Massive Ceiling light 30201/30/17 Stage Flood Inst QCL 48x10W LED floodlight user manual Sandberg Wireless BatteryFree Mouse Pro User's Manual EMMA Mobile1 Application Note Initialization Pocket Transmitter Set Bedienungsanleitung Power Peak® Twin EQ-BID No. 8563 62-0391S—01 - E-Mon Class 3400 APCe8650 Industrial I/O Pack User`s Manual Copyright © All rights reserved.
Failed to retrieve file