USER’S MANUAL version 10.0

No Magic, Inc. October, 2005

CONTENTS 1

CONTENTS 2

2INTRODUCING MAGICDRAW 2-10 MagicDraw Editions and Features 2-11 MagicDraw Personal edition 2-11 MagicDraw Standard edition 2-11 MagicDraw Professional editions 2-11 MagicDraw Enterprise edition 2-12 MagicDraw Reader Edition 2-12 MagicDraw Community Edition 2-12 MagicDraw Documentation and Support 2-12 Help 2-13 User’s Guides 2-13 Other Documentation 2-14 Support 2-15 FAQ 2-15 Newsgroups 2-15 E-mail 2-15 Bug Reports 2-15

3GETTING STARTED 3-18 Installing and Running 3-18 System requirements 3-18 Java Virtual Machine (JVM) 3-18 - dependent issues 3-19 Installation procedure 3-19 Windows 2000/9x/NT/XP 3-19 Unix 3-20 MAC OS X 3-20 All other platforms instructions (no install version) 3-20 Updating 3-20 Auto-Check for Updates dialog box 3-21 structure of menus and toolbars 3-21 Setting Personal Preferences 3-22 Environment Options 3-22 General pane 3-23 Diagram pane 3-26 Browser pane 3-28 MagicDraw User’s Manual Contents

Teamwork pane 3-29 Floating pane 3-30 CVS pane 3-31 Update pane 3-32 HTTP Proxy pane 3-33 Keyboard pane 3-34 Plugins pane 3-35 Resources pane 3-36 Path Variables Pane 3-37 Launcher Pane 3-38 Look and Feel: Controlling Interface 3-38 JIDE and Multiple Windows interface styles 3-40

4WORKING WITH PROJECTS 4-42 Creating New Project 4-42 Creating new project from already created template 4-43 Importing project 4-44 Saving and Exporting 4-44 Exporting project as template 4-45 Saving diagram as image 4-46 Autosave 4-48 Loading 4-48 Project Options. Style Engine 4-49 Project Options 4-49 Symbols Properties Styles Tree 4-52 Working with Properties Styles 4-56 Properties extension by diagram 4-56 Properties Inheritance 4-57 General Style Properties 4-58 Shapes, Paths and Diagrams Properties 4-58 Stereotypes properties 4-59 Reusing project parts in modules 4-61 Working with Modules 4-61 Exporting Project Module 4-61 Using Project Modules 4-63 Importing Project Modules 4-63 Sharing packages 4-63 Opening Your Module As a Project 4-65 Reloading Your Module 4-65 Dependencies Between Elements 4-66 Packages dependencies by relationships 4-66 Dependencies by reference 4-69 Diagrams dependencies 4-69 Package Dependencies Dialog Box 4-70

3 © 2004 No Magic, Inc. MagicDraw User’s ManuaI Contents

Profiles 4-72 Creating Profiles 4-72 Using and Importing Profiles 4-72 Exporting Profiles 4-74 Model Differencing 4-74 Models comparison 4-74 Understanding model differences 4-75 Diagrams Comparison 4-78 Working with multiple projects 4-80 Using Browser 4-82 The Browser window parts 4-83 Containment tree 4-84 Data branch 4-86 Code engineering sets 4-86 Diagrams tree 4-88 Inheritance tree 4-89 Model Extensions Tree 4-90 Search Results Tree 4-91 Working with model elements in the Browser tree 4-91 Multiple selection 4-92 Documentation/Zoom Control/Properties 4-93 Documentation tab 4-93 Zoom Control tab 4-94 Properties tab 4-94 Searching 4-95 Java Regular Expressions 4-98 Metacharacters 4-98 Character Sets 4-99 Grouping 4-99 Quantifiers 4-99 Boundary Matchers 4-100 Embedded Flag Expressions 4-100 Resource Manager 4-101 MagicDraw RConverter 4-103

5DIAGRAMS BASICS 5-104 Working with Diagrams 5-104 Diagrams Dialog Box 5-106 Diagram Properties 5-107 Table with diagram information 5-109 Drawing Shapes 5-110 Drawing Relationship paths 5-113 Smart Manipulation 5-114 Selection & Multiple Selection 5-116 Dragging, Copying, Cutting, and Pasting 5-116

© 2004 No Magic, Inc. 4 MagicDraw User’s Manual Contents

Specifying Model Elements 5-118 Specification dialog boxes 5-118 Documentation/Hyperlinks tab 5-119 Relations tab 5-121 Tagged Values tab 5-122 Constraints tab 5-124 General tab 5-124 Attributes tab 5-126 Operations tab 5-127 Teplate Parameters tab 5-128 Buttons available in the Specification dialog boxes 5-129 Formatting Symbols 5-129 Owner of the model element 5-130 Model Traceability 5-130 Usages Functionality 5-131 Dependent Elements functionality 5-131 Find Usages / Dependent Elements Options dialog box 5-132 Elements Using/Dependencies windows 5-133 Defining Hyperlinks 5-135 Insert Hyperlink dialog box 5-136 Laying out 5-138 Orthogonal Layouter 5-139 Hierarchic Layouter 5-139 Tree Layouter 5-141 Organic Layouter 5-143 Circular Layouter 5-144 Orthogonal Path Router 5-145 Organic Path Router 5-145 Class Diagram Layouter 5-146 Quick Diagram Layout feature 5-147 Zooming 5-147 Using Grid 5-148 Assigning Shortcut Keys 5-149 Printing 5-150 Print Range tab 5-150 Print Options Tab 5-152 Print Header/Footer Tab 5-153 Model Elements Common in all Diagrams 5-154 Anchor to Note 5-155 Constraint path 5-155 Separator 5-156 Documentation 5-156

5 © 2004 No Magic, Inc. MagicDraw User’s ManuaI Contents

6 UML DIAGRAMS 6-158 System Views 6-159 Use Case View 6-159 Logical View 6-159 Process view 6-160 Component view 6-160 Deployment view 6-160 Class Diagram 6-160 Class diagram elements 6-162 Use Case Diagram 6-167 Use Case diagram elements 6-168 Communication Diagram 6-170 Communication Diagram elements 6-171 Sequence Diagram 6-171 State Diagram 6-174 State Diagram elements 6-174 Activity Diagram 6-178 Activity Diagram elements 6-179 Implementation Diagram 6-183 Component diagram overview 6-183 Deployment diagram overview 6-184 Implementation Diagram elements 6-185 Composite Structure Diagram 6-190 Composite Structure Diagram elements 6-191

7MODEL ELEMENTS 7-194 Classes 7-194 Working with classes 7-194 Interface 7-197 Attribute 7-198 Operation 7-203 Template / Parameterized class 7-208 Port 7-209 Data types 7-211 Enumeration 7-212 Primitive 7-214 Design Patterns 7-214 Class presentation options 7-215 Packages 7-216 Working with packages 7-217 Profile 7-218 Model 7-219 Collaboration 7-219 Generalization 7-221

© 2004 No Magic, Inc. 6 MagicDraw User’s Manual Contents

Generalizable elements 7-223 Association 7-223 Association End 7-225 Realization 7-229 Dependency 7-231 Template Binding dependency 7-232 Abstraction 7-233 Usage 7-233 Package Merge 7-234 Package Import 7-234 Element Import 7-234 Containment 7-235 Actors 7-235 Working with Actors 7-235 Use Cases 7-236 Use Case Extensions 7-238 Relationships in Use Case Diagrams 7-239 Association 7-240 Extend 7-240 Include 7-242 Generalization 7-242 Dependency 7-243 Realization 7-243 Instance Specification 7-243 Instance Specification dialog boxes 7-243 Connector 7-245 Lifeline 7-247 Message 7-248 Predecessors and activators 7-252 Actions 7-253 Interaction Use 7-255 Combined Fragment 7-256 Lifelines in Sequence Diagram 7-257 Messages in Sequence Diagram 7-258 State 7-258 Composite State 7-260 Submachine 7-261 Pseudo State 7-262 Initial 7-262 Final state 7-263 Terminate 7-263 Entry Point 7-263 Exit Point 7-263 Deep History 7-263 Shallow History 7-263

7 © 2004 No Magic, Inc. MagicDraw User’s ManuaI Contents

Junction 7-263 Choice 7-263 Fork/Join 7-264 Transition 7-264 Event types 7-266 Internal transitions 7-266 Flow Final Node 7-267 Decision Node 7-267 Object Node 7-268 Send Signal Action 7-269 Accept Event Action 7-270 Swimlanes 7-271 Components 7-274 Nodes 7-276

8 UML EXTENSION MECHANISMS 8-280 Stereotype 8-280 Stereotype Specification dialog box 8-280 Profiles dialog box, Stereotypes tab 8-282 UML Web Extension stereotypes 8-284 Tag Definitions 8-291 Tagged Value Edition 8-292 TODO item 8-294 Constraints 8-294 Constraint Specification dialog box 8-296

9EXTENSION DIAGRAMS 9-298 Content Diagram 9-299 Content Diagram Elements 9-300 Robustness Diagram 9-303 Robstness Diagram Elements 9-305 Web Diagram 9-306 Web Diagram Elements 9-308 CORBA IDL Diagram 9-312 CORBA IDL Diagram Elements 9-313 DDL Diagram 9-315 DDL Diagram Elements 9-316 WSDL Diagram 9-317 WSDL Diagram Elements 9-318 XML Schema Diagram 9-320 XML Schema Diagram Elements 9-321 Time Diagram 9-323 Time Diagram Elements 9-324 Business Process Diagram 9-325

© 2004 No Magic, Inc. 8 MagicDraw User’s Manual Contents

Business Process Diagram Elements 9-326

10TOOLS 10-332 Reports 10-332 Template Management tab 10-333 Document Options 10-337 Model Report 10-338 Use Case Report 10-340 Software design Description 10-341 Model Extension Report 10-343 Select Packages tab 10-344 Select Diagrams tab 10-345 Output Options tab 10-346 Report Customization 10-347 New report style creation example 10-348 Fonts in PDF and PS reports 10-349 Report Generator Tool 10-350 Starting report generator 10-350 Generating Configuration file 10-350 Class Diagram Wizard 10-351 Package Dependency Wizard 10-355 Package Overview Diagram Wizard 10-358 Tools for Analysis 10-363 Hierarchy Diagram Wizard 10-364 Realization Diagram Wizard 10-367 Content Diagram Wizard 10-372 Sequence Diagram from Java Source Wizard 10-374 Pattern Wizard 10-378 Creating Setters / Getters 10-385 Implementing or Overriding Operations 10-386 Model Transformation Wizard 10-387 Types of transformations 10-387 Model Transformation Wizard 10-388 Model Transformation Mapping 10-391 Transformation Mapping Options 10-392 Model Transformation Update 10-395 Metrics 10-396 Metric Suites 10-397 Displaying Metrics 10-397 Starting Metrics 10-398 Metrics window 10-401 Exporting Metrics 10-401 Comparing metrics 10-403 Metrics Options 10-403 Metrics Properties 10-405

9 © 2004 No Magic, Inc. INTRODUCING MAGICDRAW 2

Today’s graphical software can be extremely complex in its structure and architecture, but that does not mean it must be difficult to use. We have learned much from the hardware industry, where everything you see is scattered pieces. This approach also works well in the software world – objects at a higher abstraction level are treated like “software pieces.” To simplify the process further, we may use pictures instead of textual descriptions to show the relationships between objects in a complex system. Though pictures work better than textual descriptions alone, experience has proven that communicating complex ideas effectively requires more than simple flowcharts. Early methodologies, such as Booch notation, OMT, and others, served the same purpose: to graphically express the software’s architecture information. However, these methodologies accomplished this in slightly different ways and with different levels of thoroughness. In 1994, Grady Booch, Jim Raumbaugh, and Ivar Jacobson came together to unify their varied methods and experience. The UML (Unified Modeling Language) was the fruit of their joint effort. UML was crafted with two objectives: To reflect the best practices of the industry, and to demystify the process of software system modeling. In short, UML provides standardized pictures of your software applications and allows your development team to quickly grasp the functionality contained within the application. UML is a language and a process with neutral notation, which means that you may use it to design your entire OO system in any programming language and any process. The development of a model for an industrial-strength software system, prior to its construction or renovation, is as essential as having a blueprint for a large building. Good models are vital for effective communication among project teams. In the early 1990s, the tools for OO software modeling emerged, followed by the development of the visual modeling approach. Visual modeling means that you first design your system by drawing diagrams (blueprints) and then employ tools to convert those diagrams into code. The value of such an approach is that the often tedious framework coding is done automatically, freeing the programmer to focus on design issues, plus, the transition from the design to the implementation phase is smoother more and straightforward. Moreover, using the features of reverse engineering and code generation, the developer may move back and forth between the code and the design that is expressed in the diagrams. Today, visual modeling tools provide many features that replace some of the more tedious tasks for the designer, programmer, and documentation writer. Some of the leading tools provide so-called code round-trip engineering capabilities – the structure of reverse engineered code is changed in the modeling tool and is generated back without the implementation of specific information (e.g. method bodies, comments) loss.

© 2005 No Magic, Inc. 2-10 2 INTRODUCING MAGICDRAW MagicDraw Editions and Features

MagicDraw is a visual UML modeling and CASE tool with teamwork support. Designed for Business Analysts, Software Analysts, Programmers, QA Engineers, and Documentation Writers, this dynamic and versatile development tool facilitates analysis and design of Object Oriented (OO) systems and databases. It provides the industry's best code engineering mechanism (with full round-trip support for Java, C#, C++, WSDL, XML Schema, and CORBA IDL programming languages), as well as database schema modeling, DDL generation and reverse engineering facilities.

MAGICDRAW EDITIONS AND FEATURES The detailed list of MagicDraw features find at: http://www.magicdraw.com/files/brochures/a4/MagicDrawDataSheet.pdf

M AGICD RAW PERSONAL EDITION The MagicDraw Personal Edition contains all of MagicDraw's powerful UML diagramming capabilities, including full UML 1.4 support and extensibility features, basic reporting functionality and image export. Files are stored in XMI format. All model elements can be accessed via MagicDraw's Open API. In this edition, you will find everything you need to draw, edit and publish your UML models. MagicDraw Personal Edition is available only in a standalone version and is not designed for use with the MagicDraw Teamwork Server.

M AGICD RAW STANDARD EDITION The Standard Edition takes all of the Personal Edition's features and adds to them a WAE, content, and Robustness diagrams, model analysis and facilitation features, customizable and extendable patterns, integrations with most popular IDEs and a set of predefined model templates and UML profiles. The Standard Edition also supports UNISYS XMI diagramming extensions for interchanging the MagicDraw models you create with other UML modeling tools as well as the latest Model Driven Architecture (MDA) tool offerings. The Standard Edition is available in standalone, floating and mobile license versions and is fully compatible with the MagicDraw Teamwork Server. The Standard Edition is ideally suited for all analysts and architects who need various model extensions and modeling facilitations.

M AGICD RAW PROFESSIONAL EDITIONS The Professional Edition is built on the Standard Edition's capabilities and is available in one of three programming language specific versions-Java, C++ and C#. In addition to the Standard Edition's features, the Professional Edition adds code generation and reverse engineering functionality. Depending on the language version selected, the user will receive:

• Java version - Code engineering for Java, Java bytecode. Integration with Java IDEs.

2-11 © 2005 No Magic, Inc. INTRODUCING MAGICDRAW 2 MagicDraw Documentation and Support

• C++ version - Code engineering for C++.

• C# version - Code engineering for C#, CIL (MSIL). The Professional Edition is ideal for anyone who wants to generate code out of an existing model or create a UML model from an existing project.

M AGICD RAW ENTERPRISE EDITION The MagicDraw Enterprise Edition represents the top of the line of the MagicDraw family of products and represents the ultimate solution for all your modeling needs. The Enterprise Edition combines all of the functionality of the Personal and Standard Editions, and all three versions of the Professional Edition, into a comprehensive state-of-the-art UML programming solution. But the Enterprise Edition does not stop there and adds code engineering and diagramming functionality in CORBA IDL, EJB, WSDL and XML schema. For working with DB structure, the Enterprise Edition not only provides code engineering and diagramming but also provides structure retrieval via JDBC. The MagicDraw Enterprise Edition is a must when working with multiple development technologies and databases. The MagicDraw family of award-winning products represents the most powerful and best value in the UML modeling industry today.

M AGICD RAW READER EDITION MagicDraw Reader edition is made for reading and previewing UML models created with MagicDraw and is free of charge. It is extremely useful when you want to share your ideas expressed in UML with partners, colleagues, or clients, who do not have their copy of MagicDraw. This edition is also equipped with printing and image export capabilities.

M AGICD RAW COMMUNITY EDITION MagicDraw Community edition is a free edition for developers working on non-commercial projects. It has a minimal functionality set and only class diagram has no limitations. Other diagrams allows saving a project with 25 use cases, 25 states, 25 classifier roles, 25 action states, 25 instances, 25 nodes, and 25 components. MagicDraw Community edition is designed for creating static structure models, when XMI output is needed and is ideally suited for Open Source projects. This edition is also equipped with printing and image export capabilities.

MAGICDRAW DOCUMENTATION AND SUPPORT MagicDraw provides several kinds of documentation. Choose the way you want to know how to use MagicDraw. The main information about MagicDraw, you may find at www.magicdraw.com.

© 2005 No Magic, Inc 2-12 2 INTRODUCING MAGICDRAW MagicDraw Documentation and Support

Help

Integrated in the MagicDraw help is based on JavaHelp. MagicDraw help provides detailed description of all MagicDraw dialog boxes, commands, shortcut menus, also you will find their a How to.. list, main descriptions and examples of all UML model elements.

User’s Guides

Name Description Location MagicDraw Includes detailed • /manual instructions of installing and • Start/Programs/MagicDraw working with MagicDraw. UML/MagicDraw User Manual.pdf • www.magicdraw.com -> Download->Download Manual

2-13 © 2005 No Magic, Inc. INTRODUCING MAGICDRAW 2 MagicDraw Documentation and Support

Name Description Location MagicDraw In this user guide you will • /manual UserGuide.pdf information about reverse • www.magicdraw.com -> and generation in Download->Download MagicDraw but also Manual detailed descriptions about DDL, CORBA IDL, EJB 2.0, and XML Schema usage in MagicDraw. MagicDraw Tutorials Step by step instructions UserGuide.pdf presenting the basics of using MagicDraw diagramming, creation of sequence diagram, integration with CVS and Eclipse. MagicDraw Integrations You will find here the full UserGuide.pdf description of how to integrate MagicDraw with Eclipse, Borland JBuilder, Sun One Studio (before called Forte) including Netbeans, and CVS. MagicDraw Here you will find how setup FloatingLicense and how to use MagicDraw UserGuide.pdf Floating License server. MagicDraw Teamwork In this document, you will UserGuide.pdf find information how to install, set up, and use Teamwork Server and Teamwork Server Administrator. Also included detailed descriptions of how to work with the teamwork projects. MagicDraw OpenAPI • /openapi/docs This document describes MagicDraw Open Java API and provides instructions how to write your own plug- ins, create actions in the menus and toolbars, change UML foundation elements, and create new patterns.

O THER DOCUMENTATION • Readme files. In the main MagicDraw installation directory, the main readme.html file is located. Also readme documents are available for MagicDraw integrations.

© 2005 No Magic, Inc 2-14 2 INTRODUCING MAGICDRAW MagicDraw Documentation and Support

• Notes. In the notes.html file you will find the main information about MagicDraw features.

Support

FAQ Before you call or write an email, look into our FAQ (Frequently Asked Questions) list. It is constantly updated and perhaps it contains an answer to your question.

N EWSGROUPS Discuss and get answers about MagicDraw in newsgroups.

E-MAIL We provide a professional e-mail support for registered MagicDraw users. [email protected] - private questions about product installation, and more. [email protected] - questions regarding academic and site discounts, quotes. [email protected] - e-mail for other contacts. Get an answer in 24 hours!

B UG REPORTS Submit notifications of software errors by submitting a bug directly from MagicDraw application (Help menu->Submit a Bug) or by sending an email to [email protected]. These reports help us address defects in a more timely manner, as well as speed up the release of maintenance releases free of known defects. When sending your report by email, please include (if applicable):

• MagicDraw UML version number and name of the edition (Reader, Community, Personal, Standard, Enterprise, Professional Java, Professional C++, Professional C#, Demo, or Academic).

• Source where you got the version from (demo CD, our homepage download).

• Version distribution (Standard/Professional, Windows/Java bytecode).

• Your OS name and version.

• JDK version, JVM vendor.

• CLASSPATH settings. If you don't have this information, you can find it by opening the About dialog from MagicDraw Help menu. If MagicDraw is unable to load your file, and the file is non- confidential, please attach it to your submission. This will assist us in our analysis of your problem.

2-15 © 2005 No Magic, Inc. INTRODUCING MAGICDRAW 2 MagicDraw Documentation and Support

© 2005 No Magic, Inc 2-16 2 INTRODUCING MAGICDRAW MagicDraw Documentation and Support

2-17 © 2005 No Magic, Inc. GETTING STARTED 3

INSTALLING AND RUNNING

System requirements

To run MagicDraw UML, your system must meet the following requirements: Resource type Minimum Recommended CPU Pentium III 500 Pentium 4 1600 Memory 256 MB 512MB; 1GB is recommended for larger projects Disk space 200 MB 200 MB or more Video mode 800*600 @ 64k Colors 1280*1024 @ 64k Colors Operation system All that have Java compatible JVM 1.4: Windows 95/98/NT/2000/XP, , Mac OS X (most testing procedures and debugging were performed on those platforms) HTML browser Any Netscape Navigator or IE Java Virtual JDK 1.4 Sun’s JDK 1.5.0_03 Machine (JVM)

Java Virtual Machine (JVM)

You may have the JVM installed on your computer or install JVM together with MagicDraw specifically for MagicDraw application. JVM is an application that provides the interpretation of the bytecode Java class files. Different operating systems may have different JVM implementations, thus some bugs may be specific to the operating system or JVM. MagicDraw is a stable environment, if it is configured properly and if the stable JVM is used. USE RECOMMENDED JVM TO AVOID A LOT OF PROBLEMS. All recommendations are written below. As MagicDraw is a Java application, most of the stability and performance depends on the JVM implementation. Refer to the JVM specification and problems' description, if you have problems on the specific OS.

© 2005 No Magic, Inc. 3-18 3 GETTING STARTED Installing and Running

JDK 1.1.x, 1.2.x, and 1.3.x is not supported. You can review your system and JVM information in the About dialog box, Info tab (from the Help menu, choose About). JDK version also can be encountered from command line by writing: java -version

To change Java version Change line in file mduml.properties (this file is in bin folder): JAVA_HOME =

O PERATING SYSTEM - DEPENDENT ISSUES Because MagicDraw is 100% Pure Java, it is platform independent and runs on a variety of operating systems. However, for Java applications to interact properly with the operating system, Java Virtual Machine (JVM) software is required. JVM software varies depending on the operating system, and MagicDraw may perform inadequately with the wrong one. The performance of Java applications depends on the performance of the Java Virtual Machine. A badly designed Machine may degrade the performance of MagicDraw. It could even cause MagicDraw to fail or crash. To avoid these problems, we recommend that you use the following Virtual Machines:

• Sun (JDK standard) for Solaris and Linux. JDK 1.5.0_03 is recommended.

• Sun (JDK standard) for Windows (2000, NT, 95/98). JDK 1.5.0_03 is recommended.

• MagicDraw runs only on Mac OS X operating system. We recommend to use JDK 1.4.x. MagicDraw has some problems on default Mac OS X JDK (JDK1.3).

Installation procedure

First, obtain the MagicDraw installation files. You may download the latest version from the MagicDraw homepage (http://www.magicdraw.com/.) Because MagicDraw is a Java application, you will need more than the installation files to run the tool successfully. You may also install JVM together with MagicDraw or you may have it already installed. Information about the latest Java ports is available at http://www.magicdraw.com/jvm_list.htm. NOTE If an installation is for Windows, and has a JVM you don't need anything else.

W INDOWS 2000/9X /NT/XP After downloading, double-click MD_UML_100_win.exe (for the Personal Edition MD_UML_100_PE_win.exe). The Setup Wizard automatically adds MagicDraw UML shortcuts to the start menu and the desktop. You may also execute the shortcuts from the installation directory.

3-19 © 2005 No Magic, Inc. GETTING STARTED 3 Updating

U NIX After downloading, open a shell and go to the directory where you downloaded the installer. At the prompt type: sh ./MD_UML_100_unix.sh (for the Personal Edition MD_UML_100_PE_unix.sh).

MAC OS X After downloading, double-click MD_UML_100_mac.dmg (for the Personal Edition MD_UML_100_PE_mac.dmg) and install application by dropping launcher to the Applications folder (or somewhere else). Requires Mac OS X 10.3 (Panther) and Java 1.4.2.

A LL OTHER PLATFORMS INSTRUCTIONS (NO INSTALL VERSION) Download MD_UML_100_no_install.zip (for the Personal Edition MD_UML_100_PE_no_install.zip). After downloading, extract the contents of the zip. These files require some modifications prior to launching them. On Windows platform:

• Launch mduml.exe in bin directory to start MagicDraw. On Unix or Mac OS X platform:

• Launch ./mduml in bin directory to start MagicDraw. Be sure you have JVM installed.

UPDATING Automatic updates feature is implemented in MagicDraw. Notification and update of all the patches can be done automatically.

To enable an automatic checking for MagicDraw updates

1 Open the Environment Options dialog box, Update pane. For a detailed description of this dialog box, see Section “Setting Personal Preferences” on page 3-22. 2 Choose a period when MagicDraw checks for updates from the Check for Updates drop-down list box: Manually, On startup, Once a day, Once a week, Once a month. It is recommended to check for updates once a month. NOTE You may also manually check for updates: go to the Help menu and choose the Check for Updates command.

© 2005 No Magic, Inc 3-20 3 GETTING STARTED structure of menus and toolbars

A UTO-CHECK FOR UPDATES DIALOG BOX The dialog box is opened, when automatic checking for MagicDraw UML updates is enabled on the Update pane in the Environment Options dialog box and the Show Auto- Checking Confirmation Dialog Box check box is selected. Element Name Function Show this tip If selected, the dialog box is opened each time, when the next time MagicDraw should be updated according to the schedule selected on the Update pane in the Environment Options dialog box. Check Starts checking for MagicDraw UML updates in the http://www.magicdraw.com page. Cancel Closes the dialog box without saving changes. Help Displays MagicDraw Help.

STRUCTURE OF MENUS AND TOOLBARS Before starting working with MagicDraw, keep in mind how MagicDraw is organized. Not all information will be described, as nearly all commands are accessible in various ways, that are listed in the table below. Function Accessibility Main operations of • Edit menu. editing (copy, cut, • Main toolbar buttons. paste, delete) • Shortcut keys. • Shortcut menu commands from Browser. Opening of • By double-clicking the model element. Specification dialog • Specification command from the element shortcut menu on the boxes diagram or Browser. • When adding one model element to another model element from the Specification dialog box or Browser. Defining symbols • Symbol shortcut menu -> Symbol(s) Properties. properties (font, • Options menu -> Project. color, etc.) • Main toolbar buttons

NOTES Symbol shortcut menu is also accessible from Edit menu, Symbol. The toolbar of the particular diagram presents the paths and shapes available for the corresponding diagram. If an arrow is placed on the diagram toolbar button, select a button representing the corresponding model element by right- clicking the button.

3-21 © 2005 No Magic, Inc. GETTING STARTED 3 Setting Personal Preferences

SETTING PERSONAL PREFERENCES

Environment Options

You may customize MagicDraw according to your preferences: Change the application settings of your project in the Environment Options dialog box.

To open the Environment Options dialog box Choose Environment from the Options menu.

Buttons available in the Environment Options dialog box

Reset to Defaults Resets all properties to the default ones. OK Saves changes and exits the dialog box. Cancel Exits the dialog box without saving changes. Help Displays MagicDraw Help.

© 2005 No Magic, Inc 3-22 3 GETTING STARTED Setting Personal Preferences

G ENERAL PANE

Figure 1 -- Environment options dialog box. General pane Change the appropriate fields according to your preferences. If the check box is selected, the description False changes into True. Property name Function EMF character set Choose the encoding standard for the characters that will be copied to EMF. Save diagram Saves the diagram background in the image together with the background in image saved as image diagram. By default the diagram background, after saving as image, is white. Use icons in dialogs Icons on the button of dialog boxes are shown.

3-23 © 2005 No Magic, Inc. GETTING STARTED 3 Setting Personal Preferences

Property name Function Language Choose the language you wish the MagicDraw GUI to be displayed: • Default – according to your application. It is set by default. • English • French • German • Italian • Japanese • Korean • Portuguese Brazil • Spanish • Thai NOTE Restart MagicDraw to apply the changed language. Icon size Select the size of the icons on the toolbar. The possible choices of icon sizes are 32 and 24. Show status bar Shows status bar line in the bottom of the Magic Draw window. Show memory monitor Shows the project memory usage line in the bottom of the Magic Draw window. Create backup file Back up files of your projects will be created. Backups are saved with name pattern old_name.xml.bak or old_name.xml.zip.bak. Save project recovery Saves AutoRecovery file of the opened project(s) when a system data on idle is not in use. Idle time to activate Enter the system idle time (in minutes) when to activate file recovery save recovery save. Diagrams load mode Choose how to load diagrams after opening MagicDraw project. • Load all Diagrams – opens all diagrams that are created in the project. • Load Only Opened Diagrams – opens only diagrams that were not closed in earlier usages of the project. • Do not Load Diagrams – all diagrams are closed after opening a project. Save rich XMI Saves maximum additional information to xmi file, which is not required on Magic Draw load but may be needful using other tools. Save settings on exit The changed settings within current MagicDraw session will be restored in the later sessions. Show tip of the day Shows the Tips of the Day dialog box every time you start the tool. Recent files list size Type the number of the projects to appear on the File menu. Click the file name to open it. The maximum files list size is 10. The file name list shows files that were used in MagicDraw UML. Recent windows list size Type the number of recently used windows that are listed in the Window menu. Click the window name to make it active. The maximum windows list size is 10.

© 2005 No Magic, Inc 3-24 3 GETTING STARTED Setting Personal Preferences

Property name Function Undo list size Type the number of actions that will be available for undo/redo operations. They will be listed in undo/redo drop down lists on the main toolbar. The maximum undo/redo list size is 500. Open last project on The project you have finished the last session will be opened startup next time you start MagicDraw UML. Mark elements with Shows active hyperlink arrow on element symbol. active hyperlink Opaque Expression Possible choises: defautl language • Englich • OCL Opaque Expression Possible choises: displaying lines • 1 • 2 • 3 • 4 • 5 • All Lines Show font face in font list Font names that are listed in the Font drop-down list box on the main toolbar will be displayed in the original font. Help font Choose the font that will be used in Help window. Help server port The default Help server port is 1111. Change it, if some other server is started on this port. Use model enrichment Opens the Software Design Model Wizard or Use Case Model wizard Wizard in report generation. Show model enrichment Opens the Model Enrichment dialog box in report generation. suggestion dialog Show hyperlinks in Shows the Hyperlinks tab in the element Specification dialog specification dialog box. Specification opening Possible choises: mode • In the same window • In a new window Recent specifications list Specify list size of specifications. Possible range 1 to 20. size Specifications history size Specify history size of openend elements specifications. Possible range 1 to 20.

3-25 © 2005 No Magic, Inc. GETTING STARTED 3 Setting Personal Preferences

D IAGRAM PANE

Figure 2 -- Environment Options dialog box. Diagram pane Property name Function Allow class members Operations and attributes can be selected and dragged & selection dropped to the other class. Apply stereotype style Applies created stereotype style to symbol when adding stereotype for all symbols to element. Apply stereotype style Applies stereotype style in teamwork for unlocked diagrams. for symbols in unlocked diagrams Center on the mouse Centers zooming according to mouse arrow. location when zooming

© 2005 No Magic, Inc 3-26 3 GETTING STARTED Setting Personal Preferences

Property name Function Display paths on When dragging and dropping an element from the Browser or element drop executing a Create Symbol action, path to existing symbols are created. Edit name with Allows to manage stereotypes by editing stereotype name directly stereotypes on the Diagram pane Graphics antialiasing Smooths the jagged edges of graphics. Grid style Select one of the following style of the grid: Dense and Sparse. Mark selected labels Mark paths labels after selecting a path. Optimize paths When a path is drawn in various directions, this selected option removes loops from the path. Show manipulation Enable error highlighting of the modeling process. This helps you highlighting to see the errors in the model at the drawing time. The valid and invalid actions will be highlighted in different colors (defaults are red for invalid actions, blue for valid actions). Text antialiasing Smooths the jagged edges of text. Use smart manipulation Easy you work of working with symbols. For the detailed description about smart manipulation feature, see Section “Smart Manipulation” on page 5-114. Zoom step size Type in the step value of zooming your diagram views. Step value should be in range from 0.1 to 1.0. Show Smart Set smart manipulators visibility. Manipulations Mouse’s Left Button Possible choises: Action Create element - target element is created during creation of path after mouse click on diagram pane. Make a break point - set a brake point for path after mouse click. Smart Manipulator fade Set smart manipulators fade time in seconds. time on mouse over Smart Manipulator Possible choises: appearance • Mouse Over • Shift Show Names in Shows element names in toolbars near icon. Toolbar Use Small Icons Change icons to smaller size, when selected. Toolbar Position Change toolbar appearance near diagram pane.Possible choises: • Right • Left

3-27 © 2005 No Magic, Inc. GETTING STARTED 3 Setting Personal Preferences

B ROWSER PANE

Figure 3 -- Environment Options dialog box. Browser pane Property name Function Browser position In the drop-down list, select the Left if you wish the browser to appear in the left side of the workspace. Select the Right if you wish the browser to appear on the right side of the workspace. Show code Shows code engineering sets items in the browser. engineering sets Show full types in Shows the full attributes, operations, and relationships data. browser Sort always Always alphabetically sort browser items. Show stereotypes in Shows stereotypes that are assigned to the model elements. browser Show changes in Highlight edited or added model elements and diagrams in the browser Browser. Show hyperlinks in Shows hyperlinks that are assigned to the model elements. browser Group by diagram Groups diagrams according to diagram type in the Diagrams type tree. Group by profiles Groups stereotypes, tagged values and constraints by profiles in the in the Model Extensions Tree.

© 2005 No Magic, Inc 3-28 3 GETTING STARTED Setting Personal Preferences

Property name Function Group by Groups stereotypes by Metaclass in the Model Extensions Tree. Metaclasses Show diagram zoom Shows zoom slider in the Zoom Control tab. slider

T EAMWORK PANE

Figure 4 -- Environment Options dialog box. Teamwork pane Property name Function Auto login to The user automatically logs on to the Teamwork Server after server starting MagicDraw. Teamwork server Shows the name of your teamwork server. name Show commit The warning appears while committing project to the Teamwork warning Server. Show modules The warning appears when two modules (or module and a project) versions conflict use the same submodules. warning

3-29 © 2005 No Magic, Inc. GETTING STARTED 3 Setting Personal Preferences

F LOATING PANE This pane is available only if you use MagicDraw Floating License.

Figure 5 -- Environment Options dialog box. Floating pane Property name Function Floating license Specify the name of the Floating License Server. server name Floating license Enter the port number of the Floating License Server. The server may server port be started on many different ports. Auto login to If selected, automatically logs in to the Floating License Server when floating license starting MagicDraw. server

© 2005 No Magic, Inc 3-30 3 GETTING STARTED Setting Personal Preferences

CVS PANE

Figure 6 -- Environment Options dialog box. CVS pane Property name Function Add project to Every time adds a newly created project in the checked out directory CVS after saving to CVS. The Add Project to CVS dialog box appears. Commit project to Updates the project that is added to CVS while loading. The Update CVS after saving CVS Project dialog box appears. Update project Commits project to CVS after saving it. The Commit Project to CVS from CVS before dialog box appears. loading Location of The path where the .cvspass is located. You may type it or choose .cvspass the path from the Open dialog box. Local folder The path where the module will be saved on checkout action. You may type it or choose the path from the Open dialog box.

3-31 © 2005 No Magic, Inc. GETTING STARTED 3 Setting Personal Preferences

U PDATE PANE

Figure 7 -- Environment Options dialog box. Update pane Property name Function Check for Updates Choose the period for checking MagicDraw updates. • Manually • On startup • Once a day • Once a week • Once a month (recommended) Show auto-checking If selected, shows the confirmation dialog each time before auto- confirmation dialog checking. box

© 2005 No Magic, Inc 3-32 3 GETTING STARTED Setting Personal Preferences

HTTP PROXY PANE

Figure 8 -- Environment Options dialog box. HTTP Proxy pane Property name Function Use HTTP proxy If selected, uses the Http Proxy Server when MagicDraw is server checking for updates. HTTP proxy server Type the Http Proxy Server name or IP address. address HTTP proxy server Type the port of the HTTP Proxy Server. The default number is port 8080. HTTP proxy server Type the name of the Http Proxy Server user. user Authenticate HTTP Authenticates Http Proxy Server. proxy server

3-33 © 2005 No Magic, Inc. GETTING STARTED 3 Setting Personal Preferences

K EYBOARD PANE

Figure 9 -- Environment Options dialog box. Keyboard pane Property name Function Category The list of all available categories of the keys (File, Edit, Tools, etc.). The default item in this choice is always All Categories. Selecting the category opens its context in the Commands list. Commands The list of commands from the selected category. If All Categories is selected in the Categories list, all commands of an application are shown in this list. Commands are alphabetically sorted. The selecting of the command shows already assigned shortcut keys in the Current keys list. Current keys The list of keys assigned to the selected command. Press new The field for entering the new key. Puts a human representation of any key shortcut key pressed in the field. If the pressed key is already assigned to other command, the Currently Assigned To label with this command name appears. Currently Shows the name of the command of the entered new key if this key is assigned to already assigned to some command. By default is hidden. This label is visible just if entered key is already assigned to some command. Assign Assigns the entered key to the selected command. The entered key is added to the Current Keys list. Remove Removes the selected keys from the selected command. Remove All Removes all keys from the selected command.

© 2005 No Magic, Inc 3-34 3 GETTING STARTED Setting Personal Preferences

P LUGINS PANE

Figure 10 -- Environment Options dialog box. Plugins pane Property name Function Name The name of the plugin. Provider The name of the company which provides a plugin. Version Version number of the selected plugin. Loaded Indicates if the plugin is correctly loaded. Enabled Shows the status of the plugin. If True, the selected plugin is activated in MagicDraw. Disable/Enable Disables or enables the selected plugin.

3-35 © 2005 No Magic, Inc. GETTING STARTED 3 Setting Personal Preferences

R ESOURCES PANE Displays the external resources such as dtd, xsd, etc. that are used in MagicDraw.

Figure 11 -- Environment Options dialog box. Resources pane Property name Function Configure External Resources. Define external resources that will be used in XML parsing. Location The location of the external resource. URI The URI of the external resource. Edit Edit the location and the URI of the resource in the External Resource dialog box. Add Add a new external resource Remove Remove the selected resource form the list. Configure Ignored Resources URI The URI of the external resource that will not ignored in MagicDraw. Edit Edit the URI of the ignored external resource in the External Resource dialog box. Add Add a new external resource that will be ignored. Remove Remove the selected ignored resource from the list.

© 2005 No Magic, Inc 3-36 3 GETTING STARTED Setting Personal Preferences

P ATH VARIABLES PANE

3-37 © 2005 No Magic, Inc. GETTING STARTED 3 Setting Personal Preferences

L AUNCHER PANE

Figure 12 -- Environment Options dialog box. Launcher pane Property name Function Default Launcher The Launcher Properties dialog box appears. Default Browser The Launcher Properties dialog box appears. Defined Launchers Edit Opens the Launcher Properties dialog box for editing launcher information. Add Adds launcher in the Launcher Properties dialog box. Remove Removes launcher from the list. Reset to Defaults Resets all properties to the default ones. OK Saves changes and exits the dialog box. Cancel Exits the dialog box without saving changes. Help Displays MagicDraw Help.

Look and Feel: Controlling Interface

The appearance of MagicDraw UML windows, dialog boxes, menus, and everything inside them can be changed.

© 2005 No Magic, Inc 3-38 3 GETTING STARTED Setting Personal Preferences

To make changes to the interface: From the Options menu, choose Look and Feel and then choose the style you wish.

Figure 13 -- Look and Feel Themes submenu Theme Description Metal Standard Java Swing library CDE/Motif Similar to GUI that is used on UNIX operating systems Windows Microsoft Windows 95, Windows NT 4.0, Windows 2000 interface Kunststoff Is an extension of the Java Metal Look and Feel. MagicDraw will have a more modern and smoother look. The chosen style will not look exactly like the applications in those operating systems because every style of graphical interface is implemented within a Swing library, but it will look quite similar. Depending on which operating system you use, some choices might be unavailable to you. For example, Windows9x/NT users may not switch to the Mac interface style. Look and Feel Themes – themes listed in Look and Feel Themes subcommands are valid only for the metal style. Choose from any of the following themes:

• Aqua

• Contrast

• Big Contrast

• Green

• MagicDraw

• Big MagicDraw

3-39 © 2005 No Magic, Inc. 3 GETTING STARTED Setting Personal Preferences

• Khaki

• Kunststoff Theme

• Custom – set your own options in the Properties dialog box.

JIDE AND MULTIPLE WINDOWS INTERFACE STYLES Beginning with MagicDraw version 7.5, modern JIDE library is implemented. Using the JIDE interface style, it is possible to work with Browser window in more flexible way, use documentation, zoom, and message windows as dockable and place above the main window. Now you may arrange the Browser window in your desired combination, hide the desired Browser windows Also you may use Multiple Windows style. It allows you to manage all windows independently, as if they belong to different applications. For instance, you may overlap the tool’s windows across each other, resize them independently and so on. There is no main window where all other windows are placed.

To set interface style From the Options menu, choose Interface Style, and then choose one of the desired interface styles: Multiple Windows, or JIDE.

3-40 © 2005 No Magic, Inc. 3 GETTING STARTED Setting Personal Preferences

3-41 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4

The term “project” is used to describe the problem that must be solved, including all the possible solutions for how the problem can be resolved and finally developed. All works in MagicDrawTM UML are organized into projects. Project is a top one entity where all model- related data (the set of diagrams) is held. Project data is organized by object orientation, which makes its management intuitive and in accordance with the problem that is being solved. In this Section, you will find the following chapters: 1 "Creating New Project ", on page 42 2 "Saving and Exporting", on page 44 3 "Loading", on page 48 4 "Project Options. Style Engine", on page 49 5 "Reusing project parts in modules", on page 61 6 "Profiles", on page 72 7 "Model Differencing", on page 74 8 "Working with multiple projects", on page 80 9 "Using Browser", on page 82 10"Searching", on page 95 11"Resource Manager", on page 101 12"MagicDraw RConverter", on page 103

CREATING NEW PROJECT All project information is stored in a single file. A project name matches the file name where the project is saved. The newly created project consists of the following packages:

• Data package is empty and holds all model elements.

• Component View package contains components that are created during the code engineering and represent source files. Adding a resident element to a particular component causes that element to be generated within the source file.

• MagicDraw Profile contains tagged values and stereotypes that are necessary for working with various parts of MagicDraw.

• UML Standard Profile contains primitive data types, constraints, tagged values, and stereotypes, which are UML standard and can be used in various cases. The following data types are specified in Magic Draw: boolean, byte, char, double, float, int, integer, long, short, and void.

© 2005 No Magic, Inc. 4-42 4 WORKING WITH PROJECTS Creating New Project

You may also create your own packages for holding the model elements, but, by default, packages may not be deleted or renamed in a project (except for the Component View package). To start a new project, you must create a new workspace for it.

To create a new workspace for a project

• From the File menu, choose New Project.

• On the main toolbar, click the New Project button.

• Press shortcut key CTRL+N. In all cases, you receive a new project named UntitledN, and it is selected as an active project.

Creating new project from already created template

C++, CIL, Java, C#, DDL, EJB, WSDL, XML Schema, MOF, RUP extensions, CORBA IDL, and UMLWebExtension templates are available in the New From Template dialog box. The New From Template command is used for creating a new project from the selected template file.

4-43 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Saving and Exporting

To open the New From Template dialog box From the File menu, choose New From Template.

Figure 1 -- New From Template dialog box The newly created project from template will contain specific model elements and stereotypes. TIP! All MagicDraw templates are located in the /templates folder so you may import the desired template in your already created project using Import command from the File menu.

Importing project

To import an already created project to an opened project

1 From the File menu, choose Import. 2 The Import dialog box appears. Choose the project you want to import and click OK. The diagrams of the imported project are placed in the opened one.

SAVING AND EXPORTING IMPORTANT!Beginning with MagicDraw version 3.6, the native MagicDraw format is .xml. Saving in .mdf format is not allowed.

© 2005 No Magic, Inc 4-44 4 WORKING WITH PROJECTS Saving and Exporting

To save changes for the later sessions, revised projects must be saved. While saving, you may edit the changeable name of the project and the file format.

To save the project

1 From the File menu, choose the Save Project or Save Project As command, or click the Save button on the main toolbar, or press shortcut keys CTRL+S. The Save dialog box appears. 2 Select the destination directory (where you wish to save the project) and type the file name for it. 3 Choose the format for saving a project: Packed XML (*xml.zip) (default) or Extensible Markup Language (*.xml) 4 Choose the version of XMI - 1.0, 1.1, or 1.2. Also if you want to save maximum additional information to xmi file, which is not required on Magic Draw load but may be useful using other tools, select Rich XMI button.

Figure 2 -- Save dialog box NOTE If the Create Backup File check box is selected in the Environment Options dialog box, MagicDraw always creates a backup file that has the previously saved project. The backup is held in a file with a name identical to that of the project. For a detailed description of the Environment Options dialog box, see Section “Setting Personal Preferences” on page 3-22.

Exporting project as template

You may save (export) the created project as a template and use the same project for creating other new projects.

4-45 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Saving and Exporting

To export project as template

1 Open a project you want to export as a template. From the File menu, choose Export, and then Template. 2 The Export Template dialog box appears. 3 Type the name and a description of a template. 4 Click OK.

Figure 3 -- Export Template dialog box Box Function Template Name Type a template name. Description Type information about the template. OK Exports the template and the description to the Templates folder. Cancel Closes the dialog box without exporting the template. Help Displays MagicDraw Help

Saving diagram as image

Diagrams that were created in the model can be saved as image in the following formats:

• Enhanced Metafile Format (*.emf) - supports language specific symbols.

• Encapsulated PostScript (*.eps)

• Joint Photographic Experts Group (*.jpg, *.jpeg)

• Portable Network Graphics (*.png)

• Scalable Vector Graphics (*.svg)

© 2005 No Magic, Inc 4-46 4 WORKING WITH PROJECTS Saving and Exporting

• Windows Metafile Format (*.wmf)

To save the current diagram, or the selected element, within the diagram as an image

1 From the File menu, choose Save As Image. The Save As Image dialog box appears. 2 Select the Active Diagram or the Selected Symbols option button. 3 Select the file format (*.svg, *.eps, *.dxf, *.wmf, *.png, *.jpg, *.emf), file name, and the location directory.

To save the selected diagrams of your project as images

1 Choose the Save Selected Diagrams As Images command from the File menu. The Save As Image dialog box appears. 2 Choose diagrams you want to save as image from the Not Empty Diagrams list. 3 In the Working Directory field, type in the name of the destination directory, or click the ‘...’ button to, browse the directory list. 4 Select the graphical file format in the File Format drop down list (JPG, PNG, WMF, EPS, EMF, or SVG) and click Save.

Figure 4 -- Save As Image dialog box The filename of the saved diagram will be the same as the name of that diagram.

4-47 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Loading

The Not Empty Diagrams list contains all exportable diagrams that contain UML elements. Empty diagrams are not displayed, select the diagrams you wish to export:

To make multiple selections Press the CTRL key and click the diagrams you wish to export.

To select or unselect all diagrams Click the Select All button (press CTRL+A keys) or Unselect All button.

To display in the list all diagrams that are available in the project Click the Load All Diagrams button in the Save As Image dialog box.

Autosave

After you stop working with MD, an idle time passes and the current project is saved to a special file - AutoRecovery file. If application is terminated normally, AutoRecovery file is removed. If application crashes, AutoRecovery file is left. On startup, MagicDraw checks for AutoRecovery file, if it exists, suggests to load a project from this file.

To save AutoRecovery file of the opened project(s) when a system is not in use.

1 Open the Environment Options dialog box. 2 In the General pane, select the Save Project Recovery Data on Idle check box. Also enter the system idle time (in minutes) when to activate file recovery save in the Idle Time to Activate Recovery Save text box.

LOADING IMPORTANT! Beginning with MagicDraw Version 3.6, the native MagicDraw format is .xml. Saved projects can be loaded back to MagicDraw.

To edit or review already created projects

1 From the File menu, choose Open Project, or click the Open Project button on the main toolbar. 2 In the Open dialog box, choose the project you wish to open and click Open. TIP: Drag and drop the project you wish to open directly from the open window to the MagicDraw. The project is started at once. NOTES:

© 2005 No Magic, Inc 4-48 4 WORKING WITH PROJECTS Project Options. Style Engine

If the Open Last Project on Startup check box in the Environment Options dialog box is selected, the last project you worked with will be opened right after MagicDraw starts. XMI v2.1 is native MagicDraw file format for model storage. But this formats do not specify how to store diagrams. So if you use MagicDraw to open the XMI file, exported with another tool, only the model will be loaded (diagrams, views not). MagicDraw can not "import" such XMI, it can only open it. For model interchange you should use the RConverter. More about it, see See “MagicDraw RConverter” on page 103. You may load more than one project within the same MagicDraw session. Separate workspace will be created for each project that is opened.

PROJECT OPTIONS. STYLE ENGINE Style engine is a part of the MagicDraw UML system that defines diagrams, shapes, paths, and stereotypes properties. There may be few properties styles defined but all symbols are created according to the style that is selected as default. There is possibility to apply different presentation styles for diagram/shape/path/stereotype depending on diagram type.

Project Options

The Project Options dialog box is used for defining properties for model elements (shapes and paths) and diagrams, for creating your own project style, importing or exporting the created project style, and defining code engineering options.

4-49 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Project Options. Style Engine

To change the default project options and Code Engineering tasks From the Options main menu, choose Project. The Project Options dialog box appears.

Figure 5 -- Project Options dialog box The Project Options dialog box has several collections of customizable options: General Project Define the default packages where the extension elements Options will be stored. Also if desired you may choose the package every time when creating a new extension element, the dialog box asking about the storage place will appear. In the Modules Path text box, enter the path where by default modules will be stored. Diagram Info Customize what and how information will be displayed in the Diagram Info table. Symbols Properties Expands tree hierarchy of all the styles defined within the Styles project. You may create as many of these styles as you like. NOTE To apply the changed project option to the opened project, click the Apply button. Code Engineering Define general code engineering options as well as options specific to languages. The description about this part, see Code Engineering user’s guide. To find elements to change, browse the options tree in the Project Options dialog box. The items in this hierarchy are either:

• Compressed - a plus sign next to an icon indicates that the icon is compressed, and contains other model elements. This is the default setting when you start

© 2005 No Magic, Inc 4-50 4 WORKING WITH PROJECTS Project Options. Style Engine

your application. Click the plus sign to expand the icon and view its subordinate items.

• Expanded - a minus sign next to an icon indicates that the icon is fully expanded. Click the minus sign to collapse the item. If there is no sign next to an icon, it does not contain other model elements. The following buttons are available in the Project Options dialog box: Button name Function Clone Clone (duplicate) the selected style. Rename Change the name of all existing style. Type a new name for a style in the Enter Style Name dialog box. Delete Remove the selected style. Make Default Make the selected style as your default style for the newly created projects. Apply Apply the selected style to the opened project. Import The Open dialog box appears. Select the style you wish to import (*.stl). Export The Save dialog box appears. Select the directory where you wish to export a style. Reset to Defaults Changes all settings to the default configuration.

To create a new style by cloning the existing one

1 Select the default style in the Styles list box and click the Clone button. 2 Type the name for the new style in the Enter Style Name dialog box. 3 Change options of the new style.

To change the name of the selected style

1 Select a style you want to rename and click the Rename button. 2 Type a new name for the style in the Enter Style Name dialog box.

To remove the selected style Click the Delete button in the Project Options dialog box.

To make a selected style your default style for newly created projects Click the Make Default button in the Project Options dialog box.

To apply the selected style or changed option to a current project

• Click the Apply button in the Project Options dialog box, Styles pane. NOTE: You may also apply the desired options to the selected diagrams model elements. Click the Apply button in the specific elements pane.

4-51 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Project Options. Style Engine

To import an already created (and exported) project style Click the Import button. The Open dialog box appears. Select the style you wish to import (*.stl).

To save the created style (export) for a later usage or for other users Click the Export button. The Save dialog box appears. Select the directory where you wish to export a style.

S YMBOLS PROPERTIES STYLES TREE Expands the tree hierarchy of all the styles defined within the project. You may use as many of these styles as you wish. Shape and Paths trees have the inner structure to help you find the model element, the representation of which must be changed. The right side of the dialog box contains possible choices and instruments to manage them.

© 2005 No Magic, Inc 4-52 4 WORKING WITH PROJECTS Project Options. Style Engine

Figure 6 -- Project Options dialog box. Styles In the following table you may find all possible options that can be set for the symbols: Property Function (when selected) Fill Color The fill color of the symbol. The Color dialog box appears. Use Fill Color Uses the fill color and symbols are colored on the diagram. Pen Color The pen color that is used to draw elements. The Color dialog box appears. Text Color The color that is used for text coloring. The Color dialog box appears. Font Font that is used for a name and other displayed properties of the model element. The Font dialog box appears. Autosize Adjusts the size of a symbol to the contained information. Element borders are changed so that it uses minimum space. Use Fixed Connection Points The end of the path is connected to the fixed point of the shape. Path Style The drawing style of a path. Possible choices: Rectilinear, Oblique, or Bezier. Attribute Color The color of the attribute name. The Color dialog box appears. Attribute Font Font that is used for a name of the attribute. The Font dialog box appears. Attributes Sort Mode The mode for sorting attributes. Possible choices: No Sorting, By Name, By Stereotype, or By Visibility. Constraint Text Mode Displays constraint’s name or expression on a symbol. Direction The direction of a signal. Possible choices: Right or Left. Header Position The package name position on the symbol. Possible choices: Top or In Tab. Header in Bold Shows the name of the symbol as bolded. HTML Text Activates HTML editor for the text of a note and a text box. Line Style A line style for a horizontal separator. Possible choices: Dashed or Solid. Operation Color The color of the operation name. The Color dialog box appears. Operation Font Font that is used for a name of the operation. The Font dialog box appears. Operations Sort Mode The mode for sorting operations. Possible choices: No Sorting, By Name, By Stereotype, or By Visibility. Orientation Primarily the sychronization bar diagram button is set to vertical or horizontal position. Show Attributes Constraints Shows constraints of attributes. Show Attributes Properties Shows tagged values of an attribute. Show Attributes Stereotypes Shows stereotypes of attributes.

4-53 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Project Options. Style Engine

Property Function (when selected) Show Attributes Visibility Shows attribute visibility signs (+, -, #,~). Show Base Classes Shows a base class on stereotype symbol. Show Classifier Shows a classifier name near a model element name. Show Direction Arrow Shows the direction arrow on the association. The association must be set as Navigable. Show Elements List Shows model elements that are assigned to a model, package or subsystem as a list. Show Entire Activation Shows entire activation bar on active classifier role in sequence diagram. Show Full Classifier Type Shows all attributes that are defined within a class or assigned classifier. Show Initial Attribute Value Shows initial attribute value on a class or artifact. Show Message Numbers Shows the messages numbers on a diagram. Show More Sign for Attributes Shows additional information sign “…” in the class, artifact attributes list, when omissions are made by editing class compartment. Show More Sign for Shows additional information sign “…” in the class, artifact or Operations numeration operations list, when omissions are made by editing class, artifact or enumeration compartment. Show Multiplicity Shows multiplicity value. Show Name Shows the name of a relationship, role and message/stimulus Show Operations Constraints Shows constraints of operations. Show Operations Signature Shows all of the operation arguments and the return type. Show Operations Stereotypes Shows stereotypes of operations. Show Operation Parameters Shows the direction kind for operations parameters Direction Kind

Show Operations Properties Shows tagged values and concurrency of an operation.

Show Operations Visibility Shows operation visibility signs (+, -, ~ #). Show Owner Shows the name of the owner model element (in parenthesis beneath the corresponding model element name.) Show Predecessors Shows predecessors on message. Show Visibility Shows role visibility signs (+, -, #).

© 2005 No Magic, Inc 4-54 4 WORKING WITH PROJECTS Project Options. Style Engine

Property Function (when selected) Stereotype Color The color that will be used to draw stereotypes. The Color dialog box appears.

Stereotype Font The font that will be used to draw stereotypes. The Font dialog box appears.

Show Stereotypes Shows stereotype labels on symbols.

Show Constraints Shows constraints on symbols. Show Tagged Values Shows tagged values on symbols. Suppress Actions Hides actions associated with the state. Suppress Attributes Hides attributes list. Suppress Content Displays only an icon of an assigned element or stereotype. NOTE Only when a model element contains an icon or a stereotype with an icon, the Suppress Content command is activated on the element shortcut menu. Suppress Extension Points Hides use-case extensions on a use case. Extension Point Color The color of the extension point name. The Color dialog box appears. Extension Point Font Font that is used for a name of the extension point. The Font dialog box appears. Suppress Enumeration Literals Hides enumeration literals on a enumeration. Enumeration Literal Color The color of the enumeration literal name. The Color dialog box appears. Enumeration Literal Font Font that is used for a name of the enumeration literal. The Font dialog box appears. Suppress Operations Hides operations compartment section. Suppress Realization Elements Hides realization elements of a subsystem. Suppress Specification Hides specification elements of a subsystem. Elements Text Position Changes the text position of a separator. Possible choices: Center, Left, or Right. Wrap Words Wraps printed text at the edge of text container. Background Color The color of the diagram background. Click the ‘...’ button to open the Color dialog box, select the background color. Snap Paths to Grid Snaps paths to grid. Snap Shapes to Grid Snaps shapes to grid. Grid Size Grid size settings from 2 to 30. Show Grid Shows a grid on the diagrams. Show Diagram Info Shows diagram information table on diagram pane.

4-55 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Project Options. Style Engine

Working with Properties Styles

All symbols in MagicDraw UML are created according to active properties style. There may be more than one properties style in the same project, and the whole style may be applied for the project. Every style has its own presentation of Diagram, Shape, Path, and Stereotype that you may modify using the Project Options dialog box in the Symbols Properties Styles branch. You may set your own options for every model element to the current style. Paths, Shapes, and Stereotypes branches have the inner structure that helps you find the model element, the representation of which must be changed. The section on the right side of the dialog box contains possible choices and instruments to manage them. The following properties are defined for the formatting symbols:

• Shapes. Set general options for the shapes in the right pane of the Project Options dialog box. You may set such options for all shapes that appear on the Diagram pane.

• Paths. Set general options for the paths in the right pane of the Project Options dialog box. You may set options for all paths that appear on the Diagram pane.

• Diagram. Set general options about a diagram.

• Stereotypes. Set general options for the stereotypes in the right pane of the Project Options dialog box. You may set options for all stereotypes that may be applied to elements on the Diagram pane.

P ROPERTIES EXTENSION BY DIAGRAM Diagrams, shapes, paths, and stereotypes properties may be extended by particular diagram type. It means that presentation style options will be applied only for the specified element symbol in the specific diagram.

To extend element properties by diagram

1 In the Project Options dialog box, the Symbols Properties Styles tree, expand a branch, select the specific element (shape, path, diagram, or stereotype) and right click the mouse button. The list of diagrams in which element symbol may be created, appears.

Figure 7 -- Element extension by diagram

© 2005 No Magic, Inc 4-56 4 WORKING WITH PROJECTS Project Options. Style Engine

2 Select the diagram type. Diagram is added as additional branch to the section.

Figure 8 -- Extended diagram addition 3 Set the style properties for the element in the right pane of the Project Options dialog box. Properties will be applied only in the specified type of diagram. • Element may be extended by diagram in the Project Options dialog box, specific elements pane, clicking the Extend by Diagram button. The Extend by Diagram dialog box appears. Click the Add Diagram button and select a diagram from the list.

Figure 9 -- Extend by Diagram dialog box

To remove extended diagram from the tree

• Select extended diagram and on the right click mouse button, choose Remove.

Figure 10 -- Remove extended diagram • In the Project Options dialog box, extended diagram style properties pane, click the Remove button.

P ROPERTIES INHERITANCE All element properties have “inherited” check box. This check box indicates if property is derived from the base element properties, or is it specific.

4-57 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Project Options. Style Engine

The Inherited column check box value in the elements properties pane specifies if current property is synchronized with its parent property. When the Inherited value is “true”, elements property is changed after changing the parent property. If property has no correspondent property in upper (parent) level, the Inherited column check box is cleared and disabled. If property is modified for the specific element and value differs from the upper level current property value, the Inherited column check box is cleared automatically.

G ENERAL STYLE PROPERTIES You may define the common properties for the whole style. The style properties are displayed when properties style is selected in the Project Options dialog box styles tree.

S HAPES, PATHS AND DIAGRAMS PROPERTIES All shapes, paths and diagrams that may be created in the project, are listed in the Project Options dialog box. If the Shapes, Paths or Diagrams branches are selected in the tree, the general properties may be set in the right pane of this dialog box. When expanding any of these branches, the style for concrete element (diagram) may be created.

To apply a new style for the already created element symbol

1 In the Project Options dialog box, change element style properties and click the Apply button. The Select Diagrams dialog box appears. The list of diagrams, which were created in the project, is displayed.

Figure 11 -- Select Diagrams dialog box

© 2005 No Magic, Inc 4-58 4 WORKING WITH PROJECTS Project Options. Style Engine

2 Select diagrams in which element properties will be applied and click OK. The Select Properties to Apply dialog box appears.

Figure 12 -- Select Properties to Apply dialog box 3 Choose which properties will be applied to element symbol from the All to Selected list. Click OK. NOTE! If a new style was set, it will be applied for all newly created elements after drawing them on diagram pane. You may always set the default symbols style to element by clicking the Apply Default Symbol Style button in the main toolbar.

S TEREOTYPES PROPERTIES Stereotypes properties may be applied only if stereotype properties style is created in the Project Options dialog box. Stereotype properties are derived from their base class. Stereotype base class is defined in the label of the right pane of the Project Options dialog box. The same element may have several stereotypes assigned. In this case, style of the first stereotype will be applied to the element symbol. If stereotype is removed from the element, the next (first) stereotype properties are applied. If the last stereotype is removed from the element, the base class (shape or path) properties are applied to the element symbol. Stereotypes may be extended by diagram. All stereotypes that have defined symbol properties are included into the Stereotypes branch. By default only boundary, control, and entity stereotypes are added to the tree when expanding the Stereotypes branch and default style is created for these stereotypes.

4-59 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Project Options. Style Engine

To add stereotype to the branch

1 In the Project Options dialog box, the Symbols Properties Styles tree right-click the Stereotypes branch. The list of stereotypes appears.

Figure 13 -- List of stereotypes 2 Select the check box near the stereotype and click the Apply button. Stereotype will be included into the Stereotypes branch. Set the stereotype style properties in the right pane of the Project Options dialog box.

To remove stereotype from the branch

1 In the Project Options dialog box, the Symbols Properties Styles tree select the Stereotypes branch. The list of stereotypes appears. 2 Clear the check box near the stereotype and click Apply. Stereotype is removed from the branch.

To change stereotype properties

1 Expand the Stereotypes branch and select a stereotype. 2 Set properties in the right pane of the Project Options dialog box.

To apply stereotype properties for already created symbol with assigned stereotype

1 When stereotype style properties in the right pane of the Project Options dialog box are changed, click the Apply button. The Select Diagrams dialog box appears. 2 Select diagrams in which stereotype properties will be applied and click OK. 3 In the Select Properties to Apply dialog box, choose which properties will be applied to stereotype. Click OK. NOTE! You may apply stereotype properties to symbol after changing style properties and in the Project Options dialog box clicking OK. Style will be applied when selecting symbol on the diagram pane and from the main toolbar clicking the Apply Default Symbol Style button.

© 2005 No Magic, Inc 4-60 4 WORKING WITH PROJECTS Reusing project parts in modules

To apply stereotype properties when assigning stereotype to element NOTE! In the Environment Options dialog box, Diagrams tab, the Apply Stereotype Style for All Symbols check box should be selected and in the Project Options dialog box, the style properties should be changed for stereotype. 1 In the created diagram, draw an element. 2 From the element shortcut menu, choose Stereotype. The list of available stereotypes appears. 3 Select the check box near the stereotype you want to assign to element. Click Apply. Stereotype properties are applied automatically when assigning stereotype to element.

REUSING PROJECT PARTS IN MODULES With Magic Draw's Partitioning feature, you can segment your MagicDraw project into multiple independent parts called modules. Because these modules are saved using the same file format as regular MagicDraw projects, they can be opened and edited in any MagicDraw client application. This approach allows easy reuse of the same basic model libraries in multiple projects.

Working with Modules

E XPORTING PROJECT MODULE Using the Export/Profile Module dialog box, you can save the content of a selected package as a separate module. Once exported, the package and its containing elements are read-only, and the module name is displayed in the brackets next to the package name in the Browser tree.

4-61 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Reusing project parts in modules

To export any module using the File menu

1 From the File main menu, choose Export, and then choose Profile/Module. The Export Profile/Module dialog box opens.

Figure 14 -- The Select Package dialog box for module exportation 2 In the All Data list, select the package you want to save as a separate module. Click Add. The package is added to the Selected Objects list. 3 If desired, type a description of the module in the Profile/Module Description window. This description is displayed in the package's documentation. 4 Click OK. The Save dialog box opens. 5 Select the destination directory where you wish to save the project module. Type the file name, choose the format for saving, and click OK.

To export the selected module using the package shortcut menu

1 In the Browser tree, select the package you want to save as a separate module (you can also select multiple packages). 2 From the package shortcut menu, choose Modules, and then choose Export Module. The Export Profile/Module dialog box opens. 3 In the All Data list, select the package you want to save as a separate module. Click Add. The package is added to the Selected Objects list.

© 2005 No Magic, Inc 4-62 4 WORKING WITH PROJECTS Reusing project parts in modules

4 If desired, type the description of the module in the Profile/Module Description window. This description is displayed in the package's documentation. 5 Click OK. The Save dialog box opens. 6 Select the destination directory, where you wish to save the project module. Type the file name, choose the format for saving and click OK. NOTE: Only packages can be exported as modules. To export the created diagram, you must move it to a package containing elements to export.

U SING PROJECT MODULE S The Use Profile/Module action opens tthe module, making it available for use in the project. The module is loaded as read-only. Though you can use this module in your project for editing purposes, you must either import it or open it as a separate project.

To use a module in your project

1 From the File main menu, choose Use Profiles/Modules. 2 In the Use Profile/Module dialog box, select the module you want to use in your project and click OK.

I MPORTING PROJECT MODULE S After the module is opened for use, or once it has been exported, its format changes to read-only. Importing a module makes a package and its entire inner elements editable. Once imported, the module model is merged with the project model.

To make a module editable In the Browser tree, from the module shortcut menu, choose Modules and then Import. NOTE: You can also change a module's content and make its inner elements editable by selecting Open Module As Project (from the module shortcut menu, Modules submenu). The module opens as a separate project.

S HARING PACKAGES MagicDraw version 8.0 addressed limitations on editing modules by introducing the concept of "shared packages." When a module is opened as a project, it is treated as a regular MagicDraw project and includes only shared packages. Packages can be shared only if they are not dependent on other models (this same principle operates when exporting modules). If a project contains shared packages, dependencies should be checked on every saving operation. Every project containing "shared packages" can be used in other projects as a module. When you open such a package as a module, only shared packages are loaded - in read- only format - from this project file. Non-shared packages, along with all project-related information, remain unloaded. If the project doesn't contain shared packages, it can't be used as a module.

4-63 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Reusing project parts in modules

To share a package

1 Create your package, then select it in the Browser. From the model element shortcut menu, choose Modules, and then choose Shared Packages. The Shared Packages dialog box opens.

2 The package you want to share is now highlighted in the Selected Objects tree. Click OK. If your package contains no dependencies with unshared packages, it is shared. Once the package is shared, the word [shared] appears beside the package name in the Browser.

To share multiple packages simultaneously

1 In the browser, select the packages you want to share. Then, from the model element shortcut menu, choose Modules, and then choose Shared Packages. The Shared Packages dialog box opens. The packages you selected to share are highlighted in the Selected Objects tree. 2 In the Shared Packages dialog box, you may add packages you want to share. To do this, in the All Data tree, select the packages you want share and click Add. Then click OK. TIP Along with packages, you can also share models and profiles.

© 2005 No Magic, Inc 4-64 4 WORKING WITH PROJECTS Reusing project parts in modules

To unshare a currently shared package

1 Select the shared package in the Browser. Using the shared package shortcut menu, choose Modules, and then choose Shared Packages. The Shared Packages dialog box opens. 2 Shared packages are listed in the Selected Objects tree. Select the package or packages you want to unshare and click Remove. To unshare all shared packages displayed in the tree, click Remove All.

Restrictions on shared packages usage Certain actions are not allowed with shared packages:

• Because a shared package is itself a module, shared packages cannot include modules. For example, draw the parent package p1 and inside it, include package p2. In the Selected Objects list of the Shared Packages dialog box, add the p1 package. In the All Data tree, select the p2 package. The following message appears: "p2 parent package p1 is already selected." If you move the shared package p1 to the shared package p2, the word [shared] is removed from the p2 package. This occurs because the parent package is shared. Once you remove the p2 package from the p1 package, [shared] will reappear beside the p2 package name.

• ·Similarly, you cannot export a package containing an inner shared package.

O PENING YOUR MODULE AS A PROJECT Beginning with MagicDraw version 8.0, once you open a module as a separate project, all available packages are enabled for editing, with the corresponding module package marked as shared. When loading your module as a project, you can separate an existing module into submodules, make changes to the containing elements, and add new ones.

To open your module as a project In the Browser tree, choose Modules from the exported module shortcut menu, and then choose Open Module As Project.

R ELOADING YOUR MODULE The best way to access the latest changes to your module is to reload it. All modifications made in the other project for this module and then exported as modules with the same name are reloaded in the current project.

To reload the module In the Browser tree, from the exported module shortcut menu, choose Modules, and then choose Reload Module. NOTE: If you open your module as a project, be sure to save any changes you have made (by using the Save command). All modifications appear after reloading the

4-65 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Reusing project parts in modules

module in the other opened project, which includes your module as a component).

Dependencies Between Elements

A package can be exported into an independent module only if it does not depend on external elements (except other modules). Cyclic dependencies between several modules are not allowed. There are three types of dependencies:

• Dependencies by relationships

• Dependencies by reference

• Diagrams dependencies

P ACKAGES DEPENDENCIES BY RELATIONSHIPS

The module depends on external elements If a module element has a relationship with an external element and this relationship is contained in the module package, an error message appears when exporting the module.

Figure 15 -- Example of module dependency on external element Such dependencies on external elements are displayed in the Browser tree:

Figure 16 -- Package has dependency on external element

© 2005 No Magic, Inc 4-66 4 WORKING WITH PROJECTS Reusing project parts in modules

In this situation, MagicDraw can suggest moving the relationship into the parent package of this external element. For example, in this example package1 is a parent of class B, so the relationship can be moved from module into package1:

Figure 17 -- Resolved package dependency on external element This movement can be achieved by clicking Solve in the Package Dependencies dialog box. For a detailed description of this dialog box, see Section “Package Dependencies Dialog Box” on page 4-70.

Figure 18 -- Error in the Package Dependencies dialog box You can also drag-and-drop the relationship from one package to another in the Browser tree.

The module depends on an external element, but can be exported (with warning) Though the module's element has a relationship with an external element, this relationship is contained in an external package:

Figure 19 -- Example of “legal” module dependency on external element

4-67 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Reusing project parts in modules

In this case, the dependency on external elements is displayed in the Browser tree:

Figure 20 -- “Legal” module dependency on external element in data model browser The package can be exported as a module because the relationship is contained in an external package. You will be warned about such dependencies, because they have some logical meaning:

Figure 21 -- Warning in the Package Dependencies dialog box If you want to skip this dependency, click Export. When you open the module as a separate project, this relationship is absent.

The module does not depend on an external element If the module element's relationship with an external element is irrelevant in the context of UML (for instance, the external model uses the module, but not vice versa) and this

© 2005 No Magic, Inc 4-68 4 WORKING WITH PROJECTS Reusing project parts in modules

relationship is contained in an external model, the package can be exported into an independent module without warnings:

Figure 22 -- Example of relationship when module does not depend on external element

D EPENDENCIES BY REFERENCE The module depends on external elements, when model elements from the module’s packages have references to external elements.

Figure 23 -- Example of dependency by reference In this case, the module package cannot be exported into an independent module.

D IAGRAMS DEPENDENCIES The diagram depends on all model elements displayed within it. If the diagram is contained in a module package and depends on external elements, this package cannot be exported into a module.

Figure 24 -- Example of the relationship when diagram depends on external element For more information about the package dependencies on external elements, see the Section “The module depends on external elements” on page 4-66.

4-69 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Reusing project parts in modules

In this case, if the diagram is not important for the module, it can be moved from the module package into any external package by dragging and dropping it within the Browser tree:

Figure 25 -- Diagram is moved from the module package to the package1 package. The module package can now be exported into an independent module.

Package Dependencies Dialog Box

The Package Dependencies dialog box opens when the package cannot be exported to the project module, because dependencies with external model elements have been found (see more detailed information about the types of package dependencies in the Section “Packages dependencies by relationships” on page 4-66.

To open the Package Dependencies dialog box In the Browser tree, select the package containing a dependency with an external model element. From the shortcut menu, choose Modules, and then Export Module.

Figure 26 -- The Package Dependencies dialog box

© 2005 No Magic, Inc 4-70 4 WORKING WITH PROJECTS Reusing project parts in modules

Box name Function Status Status of the problem. It can be Error or Warning. Module Element The name of the model element. Element Type The type of element. Dependency Type The type of dependency. Depends On Model element on which the package element is dependent. Solve Solves Error dependencies. Available, when error status dependency is selected in the table and a solution for the problem can be found. The message detailing how the dependency can be solved displays. Dependency status in the dependencies table is changed from Error to Warning. Select in Containment Tree Select the element in the Browser, which is already selected in the dependent elements table. Refresh Perform module dependency checking and refreshes the module dependencies table. Export Export a package as a separate module. Available, when all module dependencies have a Warning status or no problematic dependencies exist. Cancel Exit the dialog box without saving changes. Help Display MagicDraw Help. Every MagicDraw UML project module (package or diagram), or group of modules, can be saved into a separate xml file: from the File menu, choose Export, then Profile/Module. You can save a reusable model part as a module xml file. The module file is a simple MagicDraw project file and therefore can be opened as a separate project. The module xml file can later be imported into other MagicDraw projects: from the File menu, choose Import. All elements from the module xml file are copied into the target project. There is no linkage between these two projects (files) after import; both can be used separately. NOTE: We advise against using modules for splitting a project into parts and developing these parts simultaneously. After splitting, you will need to merge all project parts into one project. Only model elements are merged on import. If you export the same diagram into separate files, it will be duplicated after importing it back. Therefore, when merging model elements, follow this simple rule: Two model elements are identical if their names are identical. When the same model element is exported into two different files, and its name is changed in one of those files, the merging of these two parts will result in two model elements.. The primary purpose of the Save Project Module functionality is to allow the user to export a project part into a separate file and import later it into another project, an entirely different situation than splitting a project into parts and later connecting those parts into one project. MagicDraw Teamwork Server is an ideal solution for group work on the same project. For more information about the Teamwork Server, see the MagicDraw Teamwork System User’s Guide.

4-71 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Profiles

PROFILES Profiles are defined using UML's extensibility mechanisms. These allow modelers to customize UML for specific domains such as software development processes. In MagicDraw, the profiles mechanism is similar to the modules functionality, except that the profile is a package containing the stereotype <>, and its content is visible in both the Profiles dialog box and the UML extensions tabs of the Specification dialog boxes. There are several ways to work with profiles. You may: 1 Create your own profile. 2 Use preexisting profile. 3 Import a preexisting profile. 4 Export your created profile. Further details on these functions are found in the following sections.

Creating Profiles

Usually the profile contains specific stereotypes, constraints, and tagged values that you can use according to your needs. Profiles often contain other specific model elements, which MagicDraw allows you to include in your profile. You can use your existing profile in other parts or projects. Additionally, other users may reuse your profile as a module.

To create your own profile

1 Create profile element (in the Browser or using Class Diagram toolbar, Profiling Mechanism group) 2 Add the stereotypes, constraints, and/or other model elements you need for extending UML.

For information on how to add stereotypes, tagged values, or constraints to the profile (package), See “UML Extension Mechanisms” on page 280. The existing profile will appear in the Profiles dialog box. For more information on working with UML extensions, See “UML Extension Mechanisms” on page 280.

Using and Importing Profiles

You may use other profiles in your project, or import them. MagicDraw offers several profiles, found in the /profiles folder.

© 2005 No Magic, Inc 4-72 4 WORKING WITH PROJECTS Profiles

To use a preexisting profile in your project

1 From the File menu, choose Use Profile/Module. 2 The Use Profile/Module dialog box opens. If needed, select the directory where the desired profile is located. Choose the desired profile, and click OK. The chosen profile appears in the Browser tree as read-only. You may use it in your project. If necessary, you can also import and edit your profile.

To import a preexisting profile into your project

• From your chosen profile, go to the Browser's shortcut menu. Choose Modules and then choose Import Module.

• From the File menu, choose Import. The Import dialog box opens. Choose the profile you want to import and click Open. The imported profile will appear as a editable package in the Browser.

Profiles dialog box

Figure 27 -- Profiles dialog box

4-73 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Model Differencing

Exporting Profiles

If you want to use the existing profile in another project, or enable other users to use it, you may save the existing profile in the selected directory. Exporting profiles is similar to exporting modules functionality. 1 From the File menu, choose Export, and then choose Profile/Module. 2 The Export Profile/Module dialog box opens. Choose the profile package you want to export and add it to the Selected list. Write the description of the profile in the text box, click OK, and save it to the desired directory.

MODEL DIFFERENCING Since MagicDraw version 9.0, model differencing functionality is presented. Now you are able to compare two MagicDraw UML local projects or teamwork project versions, as well as diagrams. Model elements are compared by elements ID. You may compare:

• current project with locally saved project

• current project with opened project

• two teamwork project versions

• current project with teamwork project version.

• local project and teamwork project version.

• diagrams

Models comparison

First of all you have to choose projects you want to compare. Model comparison will be displayed as two model trees. Differences between model versions are marked using colors and highlighting. When comparing two models such data changes will be reflected:

• New model elements.

• Deleted model elements.

• Model elements with modified data.

• Model elements that changed location.

• Inner elements changes.

© 2005 No Magic, Inc 4-74 4 WORKING WITH PROJECTS Model Differencing

To choose projects you want to compare

1 Open a project you want to compare and from the Tools menu, choose Compare Projects. 2 The Compare Projects dialog box appears.

Figure 28 -- Select Projects to Compare dialog box 3 From the Active Project combo box, choose a project you want to compare with another project. The list contains names of all opened projects in MagicDraw. 4 From the Compare With combo box, choose a project with which you want to compare the first project. The following options are available: • opened project names are listed, except the project, which is selected in the Active Project combo box.

• Local Project. Click the "…" button and choose a project version you want to compare the current project with.

• Teamwork Project. Click the “...” button and from the Open Teamwork Project dialog box, select a project ant its version you want to compare with.

Disk version. By selecting this option you will be able to compare currently changed project version with the project version on the disc without current changes.

By default the first opened project should be selected. If there are no more projects opened, value Local Project is selected.

U NDERSTANDING MODEL DIFFERENCES All model version differences are displayed in the Difference Viewer dialog box.

4-75 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Model Differencing

Figure 29 -- Difference Viewer dialog box In the Difference Viewer dialog box two compared projects are displayed. At the bottom of the dialog box number of differences is displayed. Differences number includes inserted, deleted, and modified elements. Number does not include elements that inner elements are changes. Differences number is displayed in following order: For marking model element changes several colors are used:

• Elements that do not exist in the other model (inserted elements). Element is displayed only in the right-hand tree. New element is highlighted in light green color.

• Elements that exist in other model, but do not exist in current model (deleted elements). Elements always are displayed in the left-hand tree. Deleted element is highlighted in grey color.

© 2005 No Magic, Inc 4-76 4 WORKING WITH PROJECTS Model Differencing

• Elements with modified element data (modified elements). Modified element is highlighted as changed in both trees. Modified element is highlighted in light blue color.

• Elements that changed location (parent has changed). Element is marked as modified element. Empty nodes are displayed in opposite tree where element does not exist. On moved element and on its former position button is displayed. Pressing button on former position selects place where element is moved. Pressing button on moved elements position selects former element place. Also you may perform these operations using shortcut menu commands Go to former position or Go to moved element.

• Elements that inner elements are changed. Element is marked in both trees. Such element is highlighted in light grey color dashes. Element with modified element data and changed inner elements is marked as modified and as element with changed inner elements. Element is marked as modified when:

• Element specification properties have changed. Element specification properties include all properties, which are not displayed in Browser as separate elements. Model element specification properties are treated as changed only if element property may be changed from element specification. If element specification has changed because of changes made to other elements, the element should be not treated as changed. Example: typed values in tagged values specification, attribute links in object and instance specification, etc.

• Element parent has changed.

• Path is drawn from/to element. Buttons available in the Difference Viewer dialog box: Button Function Both trees are expanded.

Expand All Both trees are collapsed.

Collapse All Select the difference, which is previous to the selected one.

Go to Previous Difference Select the difference, which is next to the selected one.

Go to Next Difference The Filter dialog box appears. Show/hide the elements you want to analyze. Filter

4-77 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Model Differencing

Button Function Relations are displayed in elements specification. Relation added to element means that element is marked as modified. Include Relation Ends Display: All - Shows all elements of the projects. All Differences - Shows only differences made between he projects. Deleted Elements - Shows only elements that were deleted from the projects. Inserted Elements - Shows only elements that were inserted in the projects. Modified Elements - Shows only elements that were modified. The Find dialog box appears. Search for elements within the corresponding project. Find Next Element More>> More/Less button shows/hides element properties table. By default <

Diagrams Comparison

To compare diagrams

1 In the Difference Viewer dialog box, select the diagram you want to compare and click the Compare Diagrams button.

© 2005 No Magic, Inc 4-78 4 WORKING WITH PROJECTS Model Differencing

2 The Diagrams Difference Viewer dialog box appears, which displays both diagrams with changes made in them.

Figure 30 -- Diagram Difference Viewer dialog box Diagrams Difference Viewer displays two diagrams:

• Current (or first opened) project diagram is displayed at the right-hand side.

• Diagram that is compared with is displayed at the left-hand side. Symbols changes that are reflected in the diagram:

• Modified symbol properties

• New symbol creation

• Symbol deletion

• Symbol bound changes (resize, bound changes because of element properties changes) All changes are highlighted in light blue color dashes.

4-79 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Working with multiple projects

Buttons available in the Diagrams Difference Viewer dialog box: Button Function If pressed, zooming affects both diagrams: zooming one diagram invokes zooming of another diagram. Synchronize Zooming If pressed, scrolling one diagram invokes scrolling of another diagram. Synchronize Scrolling If pressed, places where diagram has changed are marked on both diagrams. Mark Changes Prints the corresponding diagram together with marked changes.

Print Diagram Zooms the corresponding diagram(s) to the original size.

Zoom 1:1 Zooms the corresponding diagram(s) to the size that fits in window. Fit in Window Zooms the corresponding diagram(s) in.

Zoom In Zooms the corresponding diagram(s) out.

Zoom Out Choose the percentage for zooming the corresponding diagram(s).

WORKING WITH MULTIPLE PROJECTS Because you may have to manage several projects at the same time, MagicDraw allows you to work with several projects simultaneously. All opened projects are held in separate workspaces. Different activated projects may exchange data. Entities from the one project can be copied or moved to another.

© 2005 No Magic, Inc 4-80 4 WORKING WITH PROJECTS Working with multiple projects

To switch between loaded projects

• In the Projects drop-down combo box, click the additional project you wish to open.

• Choose Projects from the File menu and click the name of the project you wish to open.

To close all opened projects Choose Close All Projects from the File menu. The Question message box appears.

Figure 31 -- Question message box Choose the way your projects will be closed: Yes The project you are currently closing will be saved (its name appears in the question). Dialog box is displayed again when the next project closes. Yes To All Save all projects without prompting. The Save dialog box appears for each opened project. No Project you are currently closing will not be saved. The dialog box is displayed again when the next project closes. No To All All the projects will be closed without saving and prompting. Cancel Cancels saving projects.

To exchange model entities between opened projects

• Use the Cut, Copy, and Paste commands in the Edit menu, or appropriate shortcut keys: Ctrl+X, Ctrl+C, Ctrl+V or the toolbar buttons.

• Drag-and-drop the created model element from the Browser tree to the Diagram pane. NOTE Data may only be exchanged between projects that are currently opened within MagicDraw. You may not copy/paste elements between instances of different tools that are currently running or to other applications.

4-81 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Using Browser

USING BROWSER The Browser provides a visual representation of the hierarchy for your model elements. The items in this hierarchy are either:

• Compressed - a plus sign next to an icon indicates that the icon is compressed, that is, it contains other model elements. This is the default setting when you start your application. Click the plus sign to expand the icon and view its subordinate items.

• Expanded - a minus sign next to an icon indicates that the icon is fully expanded. Click the minus sign to collapse the item. If there is no sign next to an icon, means that it does not contain other model elements. The Browser is a hierarchical navigational tool that allows you to manage your model data, including packages, components, classes, all UML diagrams, extension mechanisms, and other data. You may use the Browser as an alternative tool to the menus and toolbars that are in MagicDraw. It is easier to work with projects diagrams and data elements using the Browser. The Browser performs the following operations:

• Creation and specification of model elements without viewing them.

• Copying, cutting, and pasting of model elements.

• Opening and deletion of model elements.

• Dragging and dropping of model elements to the Diagram pane and inside the Browser.

• Dragging and dropping of data in the Code engineering sets (you may create data in the Data branch, drag it to the Code Engineering sets, and the round trip object is created automatically).

• Hierarchical viewing of all model elements.

• Trace viewing for the selected model element.

• Symbol creation for the selected model element in the current diagram.

• Managing diagrams.

• Managing extension mechanisms such as constraints, stereotypes, and tagged values.

• Java reversing a class directly from classpath.

• Adjusting the code engineering sets.

• Code generation for the particular sets.

• Filtering of the visible items (by any model type, e.g. class, package, operation, component, state and others - both for views and dates), when the Filter from the Browser shortcut menu is selected.

• Sorting of the visible items for the selected model element.

• Sorting of all model elements.

• Displaying search results.

© 2005 No Magic, Inc 4-82 4 WORKING WITH PROJECTS Using Browser

T HE BROWSER WINDOW PARTS The Browser window is divided into two parts:

• Containment tree/Diagrams tree/Inheritance tree/Model Extensions tree/Search Results part. The Containment tree tab groups data in the logical sets. The Diagrams tab groups diagrams that are represented on the diagram pane according to the diagrams types or shows them as a list. The Inherence tree tab represents class hierarchy of the project. The Model Extensions tree tab represents all predefined and created constraints, stereotypes, and tagged values. The Search results tab displays search results.

• Documentation/Zoom Control part. The Documentation tab shows documentation associated with selected item. The Zoom Control tab is responsible for zooming current diagram.

Figure 32 -- Browser When at least one Project is open, the Browser is placed to the left side of the main window. Beginning with MagicDraw version 7.5, it is possible to place Browser in any plane of the

4-83 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Using Browser

MagicDraw application, also all tabs can be viewed separately, you may set up Browser according your need by hiding the desired tabs.

To change the size of either part of the Browser Drag the bar that separates the two parts.

To change the Browser position from the Options menu

1 Choose Environment from the Options menu. The Environment Options dialog box appears. 2 In the Browser tab, change the Browser Position property to Right or Left.

To close or reopen the desired tab of the Browser From the Window menu, choose the tab you want to close/open.

To reset all Browser tabs to it default position From the Window menu, choose Reset Windows Configuration command.

To sort alphabetically items in browser

1 Choose Environment command from the Options menu. The Environment Options dialog box appears. 2 In the Browser tab, set the Sort Always check box to “true” (default “true”). The same option is available from the Browser shortcut menu.

Containment tree

The Containment tree displays model data, grouping it in logical sets.

To open the Containment tree

• Click the Containment Tree tab in the upper side of the Browser.

© 2005 No Magic, Inc 4-84 4 WORKING WITH PROJECTS Using Browser

• If the Containment tree is hidden, from the Window menu, choose Containment Tree.

Figure 33 -- Containment tree

To show the full information of operations, attributes, and relationships in the Containment Tree

• In the Containment Tree tab, click the Show Full Types in Browser button . 1 Choose Environment command from the Options menu. The Environment Options dialog box appears. 2 In the Browser tab, set the Show Full Types in Browser check box to “true” (default “false”).

To show stereotypes in Containment tree

• In the Containment Tree tab, click the Show Stereotypes in Browser button . 1 Choose Environment command from the Options menu. The Environment Options dialog box appears. 2 In the Browser tab, set the Show Stereotypes in Browser check box to “true” (default “false”).

To show/hide Code Engineering sets branch

• In the Containment Tree tab, click the Show Code Engineering Sets button . 1 Choose Environment command from the Options menu. The Environment Options dialog box appears. 2 In the Browser tab, set the Show Code Engineering Sets check box to “true” (default “true”).

4-85 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Using Browser

D ATA BRANCH The Data branch represents a project’s model and structure. All model elements are stored in packages. This helps you distribute data into logical groups. By default, all new model elements data (inner structure) are stored in the Data package. You may create your own packages for storing your model elements data. The Data branch also contains the Component View, Data Types, and Relations (appears only when at least one path is drawn on the diagram pane) branches. Component View is already created package where the components during code engineering are placed. Data Types contains the list of primitive data types: Boolean, byte, char, double, float, int, long, short, and void. You may create your own data types.

To create a new data type

1 Choose New Element from the package in the Browser shortcut menu and then choose Data Type. 2 Type the name of the data type directly in the Browser tree. For more information about managing model elements from the Browser, see Section “Working with model elements in the Browser tree” on page 4-91.

C ODE ENGINEERING SETS The Code engineering sets branch is a gateway between your source code and model data. Using sets, you may perform Java, C++, IDL, DDL, EJB, CIL, and C# code round-trip engineering (code generation + reverse engineering).

To create a new Code engineering set

1 Right-click the Code Engineering Sets item and choose New from the item shortcut menu or open the Code Engineering Sets dialog box and click the New button. The New Set dialog box appears. 2 Type the set name and select programming language from the drop-down list (by default - Java). 3 Click OK to finish set creation.

To edit the selected set Choose Edit from the set shortcut menu. The Round Trip Set dialog box appears. You may add/remove files or classes from the Code engineering set.

To rename the selected set Choose Rename from the set shortcut menu and type the set name.

To change code generation properties Choose Properties from the set shortcut menu. The CG Properties Editor for Data dialog box opens.

© 2005 No Magic, Inc 4-86 4 WORKING WITH PROJECTS Using Browser

The detailed description about the CG Properties Editor dialog boxes, see MagicDraw Help.

To delete the selected set Choose Delete from the set shortcut menu.

To restore the deleted set From the Edit menu, choose Undo or press shortcut keys CTRL+Z.

To generate code from the selected set

1 Choose Generate from the set shortcut menu. The Code Generation Options dialog box appears. 2 Adjust your own code generation options. 3 Click OK. The Messages Window dialog box appears. You may see information about generated files.

To check syntax Choose Check Syntax from the set shortcut menu. If no errors are found, the There are no syntax errors in the model message box appears.

To reverse the selected set

1 Choose Reverse from the set shortcut menu. 2 The Reverse Options dialog box appears. Define options and click OK. For the detailed descriptions about the reverse, see Section Reverse in the Code Engineering User’s Guide.

To reverse files that have been changed

1 Choose Refresh from the set shortcut menu. 2 The Reverse Options dialog box appears. Define options and click OK. For the detailed descriptions about the reverse, see Section “Reverse” in the Code Engineering User’s Guide. TIP! All above listed functions can be performed in the Code Engineering Sets dialog box.

To choose a text editor for source code

1 In the Options menu, choose Environment and select the Launchers group in the opened dialog box. 2 In the Default launchers field, click the “...” button and select the directory where the text editor is located. 3 Click OK.

4-87 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Using Browser

Diagrams tree

The Diagrams tree in the Browser represents a diagram’s external structure.

Figure 34 -- Diagrams tree In the Diagrams tree, with the selected diagrams, you may perform the operations listed below.

To group diagrams according their diagrams types

• Click the Group by Diagram Type button in the Diagrams tree.

• From the shortcut menu, select the Group by Diagram Type check box.

To open the selected diagram from the Browser Choose Open from the item shortcut menu or double-click the item of the diagram.

To delete the selected diagram Choose Delete from the selected diagram shortcut menu.

© 2005 No Magic, Inc 4-88 4 WORKING WITH PROJECTS Using Browser

To rename the selected diagram Choose Specification from the diagram shortcut menu. The corresponding Diagram Specification dialog box appears. Type the diagram name and click OK. TIP! Also in the Diagram Specification dialog box you may add documentation of the diagram, define steretypes, contraints and tagged values, view ther relationships in which the diagram participates, and difine hyperliks.

To print the selected diagram

• Choose Print from the diagram item shortcut menu. If the diagram is empty, it will not be printed. Also there are other ways for printing diagram. For more details about printing, see Section “Printing” on page 5-150.

Inheritance tree

The Inheritance tree represents classifiers, packages, data types, stereotypes hierarchy of your project. The inheritance according UML Specification is shown using generalization relationship.

Figure 35 -- Inheritance tree For more information about managing model elements from the Browser, see Section “Working with model elements in the Browser tree” on page 4-91.

To show stereotypes in Inheritance tree

• In the Inheritance Tree tab, click the Show Stereotypes in Browser button .

4-89 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Using Browser

1 Choose Environment command from the Options menu. The Environment Options dialog box appears. 2 In the Browser tab, set the Show Stereotypes in Browser check box to “true” (default “false”).

Model Extensions Tree

The Model Extensions Tree contains all Stereotypes that are predefined and created manually in the project. In this tree you may create, review, copy/paste, and delete extensions mechanisms. It can be mainly used for the work of the team using the Teamwork server for locking for edit/unlocking extension mechanisms.

Figure 36 -- Model Extensions Tree

To group extensions by profiles

• In the Model Extensions Tree, click the Group by Profiles button .

• From the Model Extensions Tree shortcut menu, select the Group by Profiles check box.

To group extensions by their base classes

• In the Model Extensions Tree, click the Group by Metaclasses button .

• From the Model Extensions Tree shortcut menu, select the Group by Profiles check box.

© 2005 No Magic, Inc 4-90 4 WORKING WITH PROJECTS Using Browser

Search Results Tree

The Search Results tree shows results of the search, which may be performed through the Find dialog box.

Figure 37 -- Search Results tab The results in the tab are dispalyed in two packages:

• From Diagrams - shown are those elements that are displayed on the diagram(s).

• From Model - shown are those elements that are created in the model data. How to perform search, see Section “Searching” on page 4-95.

To open the Find dialog box, from the Search Results Tree Click the Find button , or press CTRL+F keys.

To clear the results of the previous search Click the lear Clear Results button or select the Clear Results button from the Search Results tab.

Working with model elements in the Browser tree

To create a model element or a diagram in the Browser

1 Right-click the package in the Browser.

4-91 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Using Browser

2 From the New command, select the model element or a diagram you wish to create.

To copy/cut and paste the selected model element in the Browser tree

1 Choose Copy or Cut from the item shortcut menu. 2 Select an item where you wish to put the copy of the model element. 3 Choose Paste from the item shortcut menu.

To copy/cut and paste the selected model element among different projects

1 Choose Copy or Cut from the item shortcut menu. 2 Change the project name in the Projects list on main window toolbar. 3 Select where you wish to put the copy of the element. 4 Choose Paste from the item shortcut menu.

To delete a model element from the Browser tree Choose Delete from the item shortcut menu.

To drag-and-drop the selected item in the Browser tree

1 Make sure that the place you wish to drag the item is visible. 2 Drag the selected item to the destination and drop it.

To draw a symbol on the diagram Choose Create Symbol from the items in the Browser shortcut menu. NOTE You may draw a symbol by dragging and dropping an item to the Diagram pane

To show/hide model elemens in the Browser tree

1 Right-click in the Browser. 2 From the shortcut menu, choose Filter. 3 The Items Filter dialog box appears. Clear the check boxes of those model elements that you would not like to appear in the Browser tree

Multiple selection

A group of model elements can be selected within the Browser tree, and you may edit all the selected model elements at the same time.

© 2005 No Magic, Inc 4-92 4 WORKING WITH PROJECTS Using Browser

To make multiple selections

• Hold down the SHIFT key and click the last element you wish to include in to multiple selection.

• For more precise selection, hold down the CTRL key and click (while holding the key down) with the mouse on the elements you wish to select.

To select all model elements or all browser tree items Click the mouse pointer in the area you want to select all elements and press shortcut keys CTRL+A. NOTE All selected model elements can be moved or deleted as a single selected element. While moving the set MultipleDrag, a border appears denoting the area you have selected. Be careful when deleting multiple elements because no confirmation dialog box will appear.

Documentation/Zoom Control/Properties

D OCUMENTATION TAB The Documentation tab shows information associated with the selected model element in the Browser tree or diagram.

To open the Documentation tab Click the Documentation tab in the lower side of the Browser window or from the Window menu, choose Documentation. If there is no documentation for the selected element, No documentation message is displayed in the section.

4-93 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Using Browser

To write documentation for the selected model element

1 Click the Documentation tab. 2 Type information.

Z OOM CONTROL TAB In this tab, you may preview the desired diagram simply by selecting it in the Browser on on the Content diagram. Also you use this tab for zooming the diagram.

To zoom in for a close-up view of your diagram, or to zoom out and see more of the diagram at a reduced size

1 Click the Zoom Control tab in the Browser window. 2 Drag the rectangle or drag the slider. NOTE: By default the zoom slider is not visible. To display the zoom slider in the Zoom Control tab, in the Environment Options dialog box, Browser tab, select the Show Diagram Zoom Slider check box.

Quickly access any part of the diagram using the Zoom Control tab Drag the blue square to the desired part of the diagrm. The desired diagram part will be displayed on the diagram window.

To fit diagram in window, through the Zoom Control tab Click the Fit in Window button on the square in the Zoom Control tab.

P ROPERTIES TAB Since MagicDraw version 8.0, you may edit model elements and diargram properties such as data, sybol properties, language properties directly from in the Browser, Properties tab. Properties tab has two modes - Standard ant Expert. Depending on your needs you may choose one of them.

© 2005 No Magic, Inc 4-94 4 WORKING WITH PROJECTS Searching

Figure 38 -- Customize Properties dialog box

SEARCHING MagicDraw search mechnism enables the serch within model elements data, symbols, and extensions. You may also search for usages and dependant elements of the selected elements. This functionality is described in Section “Usages Functionality” on page 5-131 and in Section “Dependent Elements functionality” on page 5-131.

4-95 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Searching

To find quickly the needed classifier or diagram From the Edit menu, choose Quick Find. In the appeared screen, type the name of the classifier or diagram (also you may choose it from the drop-down list), and choose one of the needed option buttons.

Figure 39 -- Quick Find screen

Find all elements of some type

1 From the Edit menu, choose Find, or press corresponding shortcut key Ctrl+F, or click the Find button on the main toolbar. The Find dialog box appears. 2 Type the "*" symbol in the Name text box. 3 Click the "..." button near the Type text box to open the Select Model Elements Types drop-down combo box. Select types of elements and click OK. Model elements in this box are listed according metamodel. 4 Click the Find button to start search. The search results appear in the Search Tree in the Browser. TIP! To generalize the beginning or ending of the name, add the "?" symbol in the front or in the end of the string.

Find model elements and symbols in your project

1 Choose Find from Edit menu or press corresponding shortcut key Ctrl+F or click the Search tab in the Browser. 2 In the Name text box, type the name of the element. If you want to find all elements of the selected type, enter the "*" symbol in the Name text box. 3 Click the "..." button near the Type text box to open the Select Model Element/Symbol Types drop-down combo box. Select types of elements and click OK. Model elements in this box are listed according metamodel. 4 To start search, click the Find button. The search results appear in the Search Results tree in the Browser. TIP! To generalize the beginning or ending of the name, add the "?" symbol in the front or in the end of the string. NOTE If the Clear Previous Results check box is cleared, new results are appended to previous search results in the tree.

TIP! Select Search Data Unused in Diagrams check box to find only elements lacking shapes.

© 2005 No Magic, Inc 4-96 4 WORKING WITH PROJECTS Searching

Find dialog box

Figure 40 -- Find dialog box The Find dialog box contains five tabs:

• Search Element by Name tab

• Search Element by Stereotype tab

• Search Element by Tagged Value tab

• Search Element by Constraint Value tab

• Search Element by Documentation tab

Element Function Name Type the name of the item you wish to find. NOTE: You may define wildcards <*> and for the search. For example, if you define the following input string , the system looks for items with at the beginning and at the end of the string. If you define such string as , all strings containing will be found. Type Select a type of elements from the proposed items, or leave this field empty.

4-97 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Searching

Value Select or type a value of Tagged Value or Constaint. Only available for Search Element by Tagged Value and Constraint Value tab. Case Sensitive Searches for the groups of items that have the names and capitalization exactly as defined in the string entered in the Item to Find box. When unselected, MagicDraw UML does not distinguish between uppercase and lowercase characters of the item name entered in the Name box while searching for the item. Match Whole Searches for the groups of items with names that exactly match Words Only the string entered in the Item to Find box. When unselected, the MagicDraw searches for the groups of items with the names matching the first parts of the string entered in the Name field. Search Data Searches only elements that do not contain symbols in any Unused in diagram. Diagrams Java Regular In the Section “Java Regular Expressions” on page 4-98, you Expression may find several expressions that will help you to make a search in MagicDraw. Clear Previous Removes from the Browser tree all previously found items. Results Find Searches for items and displays the results of the search in the found items list field. If MagicDraw does not find any item, the message is displayed. Close Exits the dialog box. Help Displays MagicDraw Help.

Java Regular Expressions

M ETACHARACTERS There are supported several character, which are used to form search pattern ([{\^$|)?*+. There are two ways to force a metacharacter to be treated as an ordinary character:

• + Precede the metacharacter with a backslash

• + Enclose it within \Q (starts the quote) and \E (ends it).

© 2005 No Magic, Inc 4-98 4 WORKING WITH PROJECTS Searching

C HARACTER SETS [abc] Any character of a, b or c [^abc] ) Any character except a, b or c (negation [a-z] All character from a to z (range) [a-z[A-Z]] All characters from a to z and A to Z (union) [a-z&&[r-z]] Character from r to z (intersection) [a-z&&[^r-z]] Characters from a to q (subtraction) Predefined character sets: . Any character \d Any digit character \D Any non digit character \s White space character (\t\n\x0B\f\r) \S Any non white character \w Word character (a-z, A-Z,_,0-9) \W Any non word character Example: Regular expression: [ABC][^\s]\d Matched text: any sequence starting with a "A", "B" or "C" symbol, followed with any non white space character and any digit.

G ROUPING Capturing groups helps to treat multiple characters as single unit. Example: Regular Expression: ABC|(\dABC) Matched text: any text containing ABC symbols set or ABC symbol set beginning with any digit symbol

Q UANTIFIERS Quantifiers allow specify a number of character X appearance. X? Match X zero or one time X* Match X zero or many time X+ Match X one or many time X{n} Match X exactly n times X{n,} Match X at least n times X{n,m} Match X exactly n, but not more than m times Example: Regular expression: Cla(s{2})

4-99 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Searching

Matched text:any sequence starting with "Cla" symbols, followed with "s" symbol two times. It shall match any text containing string "Class"

B OUNDARY MATCHERS Boundary matchers help to match strings more precisely. Helps to match particular word, matches at the beginning of the input or line. ^ Beginning of the line $ The end of the line \b A word boundary \B A non word boundary \A Beginning of the input \z End of the input Example: Regular expression: \bCla(s{2})\b Matched text:any sequence starting with "Cla" symbols, followed with "s" symbol two times. It shall match any text containing string "Class" as whole word ("Classs" won't be matched)

E MBEDDED FLAG EXPRESSIONS Allows to set properties for regular expression matcher. (?i) Case insensitive matching (?x) Ignores white spaces in regular expression (?m) Enabled multi line option. If not specifies boundary matches ^ and $ matches beginning of the input and end respectively. (?s) Enables expression "." to match any character including line terminators. If not specified, dot in expression doesn't match line terminators. (?u) Enable Unicode-aware case folding. When this flag is specified, case insensitive is done regarding to Unicode standard. (?d) Enable Unix lines mode. Only terminator '\n' is recognized in behaviour of ".","^","$" Example Regular expression: (?m)^\bCla(s{2})\b Matched text: any sequence from new line, starting with "Cla" symbols, followed with "s" symbol two times. References http://java.sun.com/docs/books/tutorial/extra/regex/index.html

© 2005 No Magic, Inc 4-100 4 WORKING WITH PROJECTS Searching

Resource Manager

MagicDraw Resource Manager functionality allows you to manage local (installed with MagicDraw, downloaded) resources and resources available on web. With RM (Resource Manager) you may manage different types of resources (Profiles, Plugins, Templates, Language resources, Case studies/examples, Custom diagrams, and others). RM lets:

• Review

• Remove (delete)

• Import, download

• Update resources. There are the following benefits of the Resource Manager functionality: Benefits:

• Easier to find needed resource and download it.

• More informative resources description.

• Possibility to create your own resources and share them.

• Possibility to check resource dependency in required table Resource Manager functionality is included in all MagicDraw editions, except, Reader.

To invoke the Resource Manager: From the Options main menu, choose the Resources command. The Resource Manager window appears.

4-101 © 2005 No Magic, Inc. WORKING WITH PROJECTS 4 Searching

In the table bellow is listed items of the Resource Manager window. Element Name Function Name Different types of resources are listed in separate nodes. There are the following resources types: examples, templates, languages, profiles. In the front of each resource are check box. Select this check box, for managing this resource. If resource is unavailable it is impossible to select check box in front of it (checkbox is grey). Required table rows contains information why it is not available. ID Resource ID. Category Resource type. State There are possible the following states of resources: • Not installed (downloaded), • Will be installed after restart, • Installed, • Will be removed after restart, • Not downloaded, • removed (if resource not exists on web).

Ver Obtained The Version Obtained column indicates version for resources with state: installed, not installed, and removed. Ver Available Column Version Available indicates newest resource version on web. • Not exist on web. If resource not exist on web. • Check for updates. If resource list has not been downloaded from web. Date Resource creation date. Size Size of the particular resource.

© 2005 No Magic, Inc 4-102 4 WORKING WITH PROJECTS Searching

Meaning of text In one row are listed text color meanings: colors • Green - installed resources are marked green. • Blue- Not downloaded resources are marked blue and if already installed or downloaded resource newer version is available is marked blue. • Black - changes will be fully applied after restarting MagicDraw. More>>/<

MagicDraw RConverter

Beginning with MagicDraw 9.0 version, MagicDraw supports Rose XMI model exchange using MagicDraw RConverter 1.0. MagicDraw RConverter 1.0 provides a seamless way to convert Rational Rose Model file format (*.mdl) to MagicDraw-supported file format (*.xml). MagicDraw RConverter 1.0 allows your software developers to convert their UML diagrams into open standard Object Management Group (OMG) compliant XMI format. It is possible to convert these UML diagrams into MagicDraw: Activity, Class, Collaboration, Component, Deployment, Sequence, State chart, Three-tiered, and Use Case diagrams. This converter also provides the capability to automatically generate the vast majority of symbol properties, specifications, diagram layouts and stereotype images. Illustrated manual guide you can find in http://www.magicdraw.com

4-103 © 2005 No Magic, Inc. DIAGRAMS BASICS 5

This chapter offers an overview of working with diagrams. In general, the topics discussed apply to all the supported diagram types. When working with diagrams it is helpful to keep in mind the following concepts::

• A shape refers to a notation of a model element, such as a package, class, state, use case, object, or others.

• A path refers to the notation for the various kinds of relationships such as associations, aggregations, dependency, message, and links.

• Both paths and shapes are defined as symbols. In this Section, you will find the following chapters: 1 "Working with Diagrams", on page 104 2 "Drawing Shapes", on page 110 3 "Drawing Relationship paths", on page 113 4 "Smart Manipulation", on page 114 5 "Selection & Multiple Selection", on page 116 6 "Dragging, Copying, Cutting, and Pasting", on page 116 7 "Specifying Model Elements", on page 118 8 "Model Traceability", on page 130 9 "Laying out", on page 138 10"Zooming", on page 147 11"Using Grid", on page 148 12"Assigning Shortcut Keys", on page 149 13"Printing", on page 150 14"Model Elements Common in all Diagrams", on page 154

WORKING WITH DIAGRAMS TIP! MagicDraw Enterprise edition contains a Content Diagram, which is used for managing all project diagrams, as well as serving as a table of contents. For more information about Content Diagrams, see Section “Content Diagram” on page 9-299.

To create a new diagram

• From the toolbar: Click the desired diagram button on the toolbar. The Create Diagram dialog box

© 2005 No Magic, Inc. 5-104 5 DIAGRAMS BASICS Working with Diagrams

opens. Enter the name of the diagram and select or create a package where you wish to create your diagram.

• From the Diagrams menu: From the Diagrams menu, choose the desired diagram. The corresponding Diagrams dialog box opens. Click Add. The Create Diagram dialog box opens. Enter the name of the diagram and select or create a package where you wish to create your diagram.

• From the Browser: Right-click the desired model element in which you would like to create a diagram and, from the shortcut menu, choose New Diagram or New. The Diagram Specification dialog box opens. In this dialog box you can define the diagram name, enter documentation, define stereotypes, and add tagged values and/or constraints.

• From the model element Specification dialog box: Open the Package, Profile, Model Specification or other elements Inner Elements tab. Click Create. The corresponding Diagram Specification dialog box opens. In this dialog box, you may define the diagram name, enter documentation, define stereotypes, and add tagged values and/or constraints. NOTES You may create a diagram in the selected package, model, or profile.

To open a diagram

• From the Browser: Choose Open from the diagram item shortcut menu or double-click the diagram item.

• From the Diagrams menu: From the Diagrams menu, choose the desired diagram. The corresponding Diagrams dialog box opens. Click the Open button.

• From the Content Diagram (available only in the Enterprise edition), if diagram is added to the table of contents or symbol of diagram is drawn on Diagram Pane.

• If the diagram is assigned to a particular model element, double click this model element. TIP 1! To open all diagrams that have been created in the project, from the Diagrams menu, choose Load All Diagrams. TIP 2! To open the list of diagrams that were most recently closed, from the View menu, choose Recently Closed Diagrams and double-click the diagram you want to open. The F12 key also activates this command. TIP 3! In the General pane of the Environment Options dialog box, you can choose a method for loading diagrams while opening a project. Three options are available:

• Load all Diagrams – opens all diagrams that exist for the project.

5-105 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Working with Diagrams

• Load Only Opened Diagrams – opens only diagrams that were not closed in earlier usages of the project.

• Do not Load Diagrams – all diagrams are closed after opening a project.

To close a diagram Click the Close Diagram button on the diagram pane or choose Close Diagram from the diagram shortcut menu. Define a diagram in the corresponding Diagram Specification dialog box.

Diagram Specification dialog box

Figure 1 -- Diagram Specification dialog box Refer to the Section “Specification dialog boxes” on page 5-118 for information on these specification elements.

To rename a diagram In the corresponding Diagram Specification dialog box, type a new diagram name.

Diagrams Dialog Box

The Diagrams dialog box is used for the following purposes:

• For viewing the owner of the diagram

• For creating a new corresponding type of diagram.

© 2005 No Magic, Inc 5-106 5 DIAGRAMS BASICS Working with Diagrams

• For editing the name and other characteristics of the diagram.

• For removing a diagram from the project.

• For opening a diagram.

To open the corresponding Diagrams dialog box From the Diagrams menu, choose one of the diagrams. Depending on the type of the diagram, the opened dialog box has a corresponding title.

Figure 2 -- Diagrams dialog box The Diagrams dialog box contains the following elements. Element name Function Name The names of all created corresponding diagrams in the opened project. Owner The name of the package that owns the diagram. Edit The Diagram Specification dialog box opens. Type the diagram name, select a package, and click OK. Add Creates a new diagram. The Create Diagram dialog box opens. Type the diagram name, select a package, and click OK. Remove Deletes the selected diagram. Open Opens the selected diagram. Close Saves all actions performed during the session and exits the dialog box. Help Displays the MagicDraw Help.

Diagram Properties

Customize the diagram style (color, grid) in the Diagram Properties dialog box.

5-107 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Working with Diagrams

To open the Diagram Properties dialog box

• Choose Diagram Properties from the diagram shortcut menu. The Properties dialog box opens.

• From the Edit menu, choose Symbol, and then choose Diagram Properties.

• Press SHIFT+ENTER.

Figure 3 -- Diagram Properties dialog box The Diagram Properties dialog box contains the following elements. Element name Function Background Color Set the diagram’s background color. Click the ’...’ button. The Color dialog box opens. Set the color in the three different ways: using Swatches, HSB, or RGB tabs. Show Grid Shows the grid on the Diagram pane. Snap Paths to Grid Uses the grid on the diagram for drawing paths. Snap Shapes to Grid Uses the grid on the diagram for drawing shapes. Grid Size Set grid size from 2 to 30. Show Message Displays message numbers on the diagram. Numbers (Available only for Activity, Communication and Sequence diagrams)

© 2005 No Magic, Inc 5-108 5 DIAGRAMS BASICS Working with Diagrams

Element name Function Use Advanced Displays more detailed message numbering on the diagram. Numbering (Available only for Activity, Communication and Sequence diagrams) Show Diagram Info Displays on the diagram the table containing information about the diagram (Diagram name, Author, Creation date, Modification date, and so on) You can specify what information you want included in the Project Options dialog box (Options menu->Project). Apply Style Select the predefined style. Make Default Set the specified style as default. OK Save changes and exits the dialog box. Cancel Exit the dialog box without saving changes. Help Display MagicDraw Help.

T ABLE WITH DIAGRAM INFORMATION On the diagram, you may display a table containing various diagram details: its name, author, status, the dates it was created and modified, and so forth. By default the table is placed in the upper left corner, but you can drag and drop it to any other position on the diagram. The table includes the following fields:

• Diagram name

• Author

• Creation date

• Modification date

• Other available tag definitions

To show the table containing diagram information

1 From the diagram shortcut menu, choose Show Diagram Info. 2 The table with the predefined information will be displayed on the diagram.

To define information that will be included in the table

1 From the diagram info table shortcut menu, choose Customize, or from the Options menu, choose Project. The Project Options dialog box opens. 2 Open the Diagram Info pane. 3 In the Source pane, choose the type of information you want to include in the table: Standard Mode or Custom Mode. 4 Standard Mode contains the following fields that will be shown in the table: Author, Creation date, Modification date, and all other tag definitions that can be assigned to the diagram.

5-109 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Drawing Shapes

In the field Custom Mode, you may create your own table or any other object in HTML. 5 Preview the selected table or other created object in the Preview pane.

DRAWING SHAPES

To draw a shape on the Diagram pane

1 Click the shape button on the diagram toolbar, or press the appropriate shortcut keys for the shape you wish to draw (the button remains pressed). For a detailed description of diagram toolbars, see Section “Toolbars” on page 9-448. 2 Click the desired location on the diagram pane. The new shape is placed on the diagram pane at the point you click. • Create the desired model element in the Browser tree. From the created item shortcut menu, choose Create Symbol or drag and drop the selected model element to the diagram pane.

To draw a number of shapes on the diagram pane

1 Click the shape button on the diagram toolbar, or press the appropriate shortcut keys for the shape you wish to draw (the button remains pressed.) 2 Click the Sticky button on the diagram toolbar (shortcut keys is Z.) 3 Click the desired location on the diagram pane. The new shape is placed on the diagram at the point you click (the button remains pressed.) 4 Click the next location on the diagram pane. The next shape is placed on the diagram pane. Repeat this until you draw the desired number of shapes. 5 To undo the shapes, click the Sticky button on the diagram toolbar (shortcut keys is Z.)

To draw a shape for the selected item in the Browser tree

1 Activate a diagram on which you wish to draw a shape. 2 From the Browser tree, select an item you wish to draw. 3 From the item shortcut menu, choose Create Symbol or drag and drop the selected model element onto the diagram pane.

To specify the name of the shape (when it is allowed)

1 Double-click the shape or choose Specification from the shape shortcut menu. The corresponding Specification dialog box opens. 2 Type the shape name in the Name text box and click Close. • Type the shape name directly on the selected shape on the Diagram pane.

• Type the shape name after slowly double-clicking the shape in the Browser tree.

© 2005 No Magic, Inc 5-110 5 DIAGRAMS BASICS Drawing Shapes

To create several shapes with the same data

• From the shortcut menu of the desired item in the Browser tree, choose Create Symbol. Or, drag and drop the selected model element onto the diagram pane.

• Type the same name for multiple shapes directly on the shape after the text cursor appears in that area. 1 Specify a shape name. 2 Draw another shape of the same kind on the Diagram pane. 3 Click the shape in the name area. The list of existing shape names appears. 4 Choose a name for the shape from the list. NOTES: • These shapes will contain identical data.

• Auto completion for entering names is available only for classes, actors, packages, and subsystems. IMPORTANT If you attempt to enter an existing name in the corresponding Specification dialog box, an error message alerts you to the existence of the current name of the shape. You may not specify a name for a new shape if another shape of the same name and kind is already present in the package.

To display elements related to the selected element

1 From the Edit menu, Symbol submenu or from the shape shortcut menu, choose Related Elements and then choose Display Related Elements.

5-111 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Drawing Shapes

2 The Display Related Elements dialog box opens.

Figure 4 -- Display Related Elements dialog box 3 Choose the desired options for displaying the related elements: Option name Function Expand Relations Choose what kind of elements should be displayed on the diagram: • Clients • Suppliers • Both Scope Choose in what scope the elements related to the selected model element will be found: • Whole Project • Package Depth Specify the range for searching for selected relationships: • Indefinite. All possible related relationships are involved. • Definite. Specify the level of hierarchy of the involved relationships.

© 2005 No Magic, Inc 5-112 5 DIAGRAMS BASICS Drawing Relationship paths

Option name Function Relations Select the relationships you want to display on the diagram. Always create When this check box is selected, the new symbol is new symbols created even if a related element already has a symbol in the diagram.

To display paths among shapes that are already created in the model data

• From the shape shortcut menu, choose Related Elements and then Display Paths.

• Select a symbol and from the Edit menu, choose Symbol, then Related Elements, and then choose Display Paths.

To delete the selected model element or symbol

• From the Edit menu, choose Delete (both data and symbol are deleted.)

• On the main toolbar, click Delete (both data and symbol are deleted.)

• Press CTRL+D keys (both data and symbol are deleted.)

• Press Delete key (only the symbol is deleted, leaving the data intact.) NOTE When deleting paths by pressing DELETE key, the Delete Data? message appears. To delete the relationship’s data from the model, click Yes. When you use other methods to delete relationships, relationship data is automatically deleted.

DRAWING RELATIONSHIP PATHS

To create a path between shapes

1 Click the appropriate path button on the diagram toolbar for the relationship you wish to draw. For a detailed description of diagram toolbars, see Section “Toolbars” on page 9-448. 2 Click the first (source) shape of the path. 3 Drag the path to the second (target) shape of the path and drop it there.

To create a number of paths

1 Click the appropriate path button on the diagram toolbar. 2 Click the Sticky button on the Diagram toolbar (shortcut key is Z.) 3 Click the first (source) shape of the path. 4 Drag the path to the second (target) shape of the path and drop it there. 5 Click the first (source) shape of the path to draw a next path.

5-113 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Smart Manipulation

6 Drag the path to the target shape and drop it there. The new path is created between the two shapes. Repeat this until you create a desired number of paths of that type. 7 Click the Sticky button on the Diagram toolbar (shortcut key is Z.)

To change a path’s appearance style

1 Select the path. 2 Right-click the path or choose Path from the Edit menu, and choose the commands you need: • To set the path as rectilinear, oblique, or bezier, choose Path Style.

• To choose a path styles choose Change Path Style (shortcut keys CTRL+L.)

• To reset path labels to the default position, choose Reset Labels Positions.

• To remove all angles of the path, choose Remove Break Points.

NOTES: • Every diagram has the Manipulation Highlighting feature. When drawing a path between two model elements, you will see that those shapes are bordered with a red or blue rectangle. The red color indicates that the path may not be drawn between these shapes. Blue rectangle allows to draw a path.

• Remove the manipulation highlighting in the Environment Options dialog box. For more information, see Section “Environment Options” on page 3-22.

• For drawing a path, you can use smart manipulations menu, which appears near element symbol. Choose a path and drag it to the target shape.

SMART MANIPULATION Smart Manipulation is a feature designed to make working with MagicDraw even easier. Use Smart Manipulation to suppress attributes and operations, set an auto-size option, reset a label position on path, and draw relationships with mostly used elements. MagicDraw offers varying smart mechanisms depending on the shapes involved.

There are two types of Smart Manipulators:

© 2005 No Magic, Inc 5-114 5 DIAGRAMS BASICS Smart Manipulation

1 Small buttons are displayed within the symbol on the diagram pane. .

2 Smart Manipulator toolbar, which appears when elements are selected on the diagram pane.

In the Smart Manipulator toolbar, smart manipulators are divided into standard and extra modes. You can toggle between these two modes by clicking the Expand button - the arrow symbol - located at the bottom of every Smart Manipulator toolbar. The program remembers your mode choice and displays it for all elements. Use the Smart Manipulators toolbar to quickly perform simple actions and create new elements.

To create a new element connected with a particular element

1 Select a symbol on the diagram pane. The Smart Manipulator toolbar appears. In the toolbar, select the relationship you want to draw. The drawing of the selected relationship is initiated and the mouse cursor displays the new element which will be created. For example, create a class symbol. In the class Smart Manipulator toolbar, select the Directed Association relationship for drawing. The drawing of this Directed Association relationship is initiated and the mouse cursor displays a class icon. Click the left mouse button. The element displayed on the mouse cursor is created together with the relationship. 2 Use the Smart Manipulator toolbar to choose which element you want to draw at the other end of relationship. In the toolbar, choose the relationship and then click the right mouse button. The list of elements available for creating appears. Select the element from the list and it will be created. TIP!

5-115 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Selection & Multiple Selection

To create a path breakpoint use the following keyboard combination: Ctrl key + Mouse click. TIP! To cancel the drawing of an element, press Esc. The Autosize option is automatically added for all shapes. To hide smart manipulation 1 From the Options menu, choose Environment. The Environment Options dialog box opens. 2 In the Diagram pane, Smart Manipulators group, clear the Show Smart Manipulation check box and click OK.

SELECTION & MULTIPLE SELECTION

To select a shape

• Click the desired shape on the Diagram pane.

To deselect the selected shape Click outside the shape on the Diagram pane.

To make a multiple selection

1 Click the shape on the Diagram pane. 2 Hold down the SHIFT key and click another shape. Repeat until you select the desired number of shapes. • Drag the cursor diagonally across the area you wish to select. All shapes in the selected area will be selected.

To select all shapes of the same type Press ALT and click the shape. All shapes of the same type are selected.

To select all shapes on the diagram From the Edit menu, choose Select All (shortcut keys CTRL+A.)

DRAGGING, COPYING, CUTTING, AND PASTING Move a shape to another location on the diagram pane by dragging-and-dropping.

To drag multiple selected symbols Select the symbols and drag them to the desired area on the Diagram pane.

© 2005 No Magic, Inc 5-116 5 DIAGRAMS BASICS Dragging, Copying, Cutting, and Pasting

To copy a shape using dragging-and-dropping Hold down the CTRL key while dragging the selected shape to the area where you wish to make a copy.

Drag and drop items from the browser to the diagram pane

1 In the Browser tree, select the created model element you wish to draw. 2 Drag it to the desired location on the Diagram pane and drop it there. NOTES: • The element is drawn with its existing relationship.

• You may select several model elements and draw them on the diagram pane.

• If the selected model elements are not compatible with the opened diagram, you will not be allowed to draw those model elements.

To copy/cut and paste the selected shape on the diagram

1 From the Edit menu, choose Copy/Cut (shortcut keys CTRL+C/CTRL+X.) 2 From the Edit menu, choose Paste (shortcut keys CTRL+V.) NOTE: You may copy/paste many (but not all) model elements among various diagrams.

To paste one or more copied model elements by creating new data and symbols From the Edit menu, choose the Paste With New Data command (shortcut keys CTRL+E.)

To copy the whole diagram and paste it to MS Office or other application

1 Select or deselect all model elements on the diagram. 2 From the Edit menu, choose Copy as EMF or Copy as JPG (shortcut keys CTRL+SHIFT+E or CTRL+SHIFT+J.) 3 Open the desired application and paste the copied diagram.

To copy the selected model elements and paste to MS Office or other application

1 Select the desired model elements on the diagram pane. 2 From the Edit menu, choose Copy as EMF or Copy as JPG (shortcut keys CTRL+SHIFT+E or CTRL+SHIFT+J.) 3 Open the desired application and paste the copied model elements. TIP!: You can drag and drop source code files from the native file manager to a MagicDraw Code Engineering Set. NOTE: You may copy or cut and paste the text only when using the shortcut keys CTRL+C or CTRL+X and CTRL+V. When you use the buttons or commands, the whole element is copied/cut and pasted.

5-117 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Specifying Model Elements

SPECIFYING MODEL ELEMENTS You may define all model elements in the corresponding Specification dialog boxes. MagicDraw's shortcut menus, toolbars, and the browser help ease the task of editing model elements. IMPORTANT Beginning with version 8.0, MagicDraw enables you to edit model elements and symbol properties directly from the Browser, located in the Quick Properties tab. For more information, please see Section “Properties tab” on page 4-94.

Specification dialog boxes

The Specification dialog boxes are used to define UML model elements such as class, package, activity, and others. Every Specification dialog box has a different structure based on the element characteristics. Model elements that may participate in the relationships contain the Relations tab. All model elements specification dialog boxes have Template Parameters, Tags, Constraints, and Documentation/Hyperlinks tabs. Descriptions of these tabs are presented in the following sections.

To open the corresponding Specification dialog box

• Choose Specification from the selected symbol shortcut menu.

• Double-click a symbol on the Diagram pane or Browser.

• Select a symbol on the Diagram pane and press the ENTER key.

• The element Specification dialog box opens when you add one model element to another model element from another Specification dialog box. The second Specification dialog box opnes in top of the first. Use Back to or Forward to arrow buttons for switching between windows.

© 2005 No Magic, Inc 5-118 5 DIAGRAMS BASICS Specifying Model Elements

D OCUMENTATION/HYPERLINKS TAB Use the Documentation/Hyperlinks tab to add comments to the selected element and to assign hyperlinks. The hyperlink can direct the user to a model element, web page or file.

Figure 5 -- Specification dialog box. Documetation/Hyperlinks tab To write documentation in HTML format, simply select the HTML check box to display a menu with available text formatting options. Button Function Text Color Choose font color of the text.

Font Name Choose font style of the text.

Font Size Choose font size of the text.

Bold Set text as bold.

Italic Set text as italic.

Underline Set text as underlined.

Align left Align text to left side border.

Center Center the selected text.

Align Right Align the selected text to the right side border.

5-119 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Specifying Model Elements

Button Function Insert Add a hyperlink to the desired file, model element, Hyperlink or web page for the selected text. The Insert Hyperlink dialog box opens. Unordered Change text style to bullet list. list Ordered list Change text style to numbered list.

Decrease Decrease indent by moving text closer to the left Indent border. Increase Increase indent by moving text closer to the right Indent border. HTML Show text with HTML source characters. Source

In the Hyperlinks tab, manage the hyperlinks you want to add to the model element

Active If selected, the hyperlink is activated and will work when double- clicking the model element. Hyperlink Display information about the hyperlink: diagram or element name, file path, or URL name. Open Opens already assigned hyperlink. Edit The Insert Hyperlink dialog box opens. Edit the selected hyperlink. Add The Insert Hyperlink dialog box opens. Select the hyperlink you want to add to the model element. Remove Remove the selected hyperlink from the model element.

© 2005 No Magic, Inc 5-120 5 DIAGRAMS BASICS Specifying Model Elements

R ELATIONS TAB The Relations tab contains the list of relationships in which the appropriate model element participates.

Figure 6 -- Specification dialog box. Relations tab Element name Function Name Name of the relationship (optional). Element One of the relationship endings. Direction Shows a relationship’s direction, helping to specify source and target. Element Another relationship ending.

After clicking this button, the relationship Specification dialog box opens. Delete Removes the selected relationship from the list.

5-121 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Specifying Model Elements

T AGGED VALUES TAB

Figure 7 -- Specification dialog box. Tagged Values tab Element name Function Profile Lists profiles tavailable for the current project. If tag definitions are grouped and those groups are collapsed, expands those groups. Expand All Tree Branches If tag definitions are grouped and those groups are expanded, collapses those groups. Collapse All Tree Branches Displays in the list only those tag definitions that have values. Show Tag Definitions with Values If tag definitions are grouped into specific “packages”, shows those “packages” on the list by grouping tag definitions. Show Tag Definitions Groups Sorts tag definitions by the assigned stereotypes.

Group By Stereotype

© 2005 No Magic, Inc 5-122 5 DIAGRAMS BASICS Specifying Model Elements

Element name Function Displays types of tag definitions in the list.

Show Tag Definitions Types The list of tag definitions with values that are selected for the current model element. Create Value Create a value for the selected tag definition. The right pane of the dialog box is activated. Choose or enter the value. All data types and types of metamodel can be types of values. Remove Value Removes the value(s) from the selected tag definition. (available only when the tag definition has value) Edit Value The Tagged Value Specification dialog box opens where you can edit or extend the selected tagged value. Edit Tag Definitions The Profiles dialog box opens. Edit, add, or remove tag definitions for the current model element. Right pane of the dialog box Tag Definition “...” Click the “...” button and edit the selected tag definition in the Tag Definition Specification dialog box. HTML Set the tagged value text as HTML. Value (if the value is Type or choose the value. added) Edit Edit the selected value. Add Add the new value. Remove Remove the selected value.

5-123 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Specifying Model Elements

C ONSTRAINTS TAB

Figure 8 -- Specification dialog box. Constraints tab Element name Function The list of constraints assigned to the current model element. Name Enter the name of the constraint. Specification A comment associated with the selected constraint.To edit the comment, double click the Specification line. Click the ‘…’ button, to open the Edit Specification dialog box, where you can edit expressions and choose Object Constraint Language (OCL) to check expression syntax.

Click this button to open the Constraint Specification dialog box. Create Creates a constraint. Apply The Select Elements dialog box opens. Choose an existing constraint from the model and apply it to the element. Unapply Removes the selected constraint from the list.

G ENERAL TAB

Name text box

Type or view the model element name. If you enter the name of an existing model element, an error message appears.

© 2005 No Magic, Inc 5-124 5 DIAGRAMS BASICS Specifying Model Elements

For some model elements (attribute, operation, , and so forth), the default name Untitled 1 is set. You may change this name to preferred name.

Is Active, or Is Abstract check boxes

When one of these check boxes is selected, the model element is correspondingly set as an active or abstract generalizable model element. A generalizable element is a model element that may participate in a generalization relationship. Name Function Is Abstract Specifies whether the generalizable element may or may not have a direct instance. True indicates that an instance of the generalizable element must be an instance of a child of the generalizable element. False indicates that there may an instance of the generalizable element that is not an instance of a child. An abstract generalizable element is not instantiable since it does not contain all necessary information.

Applied Stereotype

Click the "..." button to open the list of all available applied stereotypes, select the check box for the chosen stereotype and click Apply.

Visibility

To define an element's access level, use the drop down list to set its visibility. There are four levels of access:

• Public. The element can be accessed by any outside object.

• Package. The element can be accessed by any classifier declared in the same package (or a nested subpackage, to any level).

• Private. The element can be accessed only from inside the current class.

• Protected. The elementcan be accessed from inside the current class and classes derived from that class.

ToDo

Type or view information about an element. The To Do property is used for keeping special information, exclusive cases, or additional records.

5-125 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Specifying Model Elements

A TTRIBUTES TAB

Figure 9 -- Attributes tab The Attributes tab contains the model element attributes list and buttons for editing the attributes list. Name Attribute’s name. Type Attribute’s type. It can be a primitive type or another class. Default Value Attribute’s default value. Classifier Class name that contains the current attribute. Create Add a new attribute to the class. The Attribute Specification dialog box opens. Delete Remove the selected attribute from the class.

Click this button to open the Attribute Specification dialog box.

© 2005 No Magic, Inc 5-126 5 DIAGRAMS BASICS Specifying Model Elements

O PERATIONS TAB

Figure 10 -- Operations tab The Operation tab contains the model element operations list and buttons for managing this list. Name Operation’s name. Return type Operation’s return type. Classifier The name of the classifier containing the current operation. Create Add a new operation to the model element. The Operation Specification dialog box opens. Delete Remove the selected operation from the model element.

Click this button to open the Operation Specification dialog box.

5-127 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Specifying Model Elements

T EPLATE PARAMETERS TAB

Figure 11 -- Operations tab The Template Parameter tab contains model element template parameters list and buttons for managing this list. Name The name of the template parameter. Type Type of the template parameter: classifier or data type. Default The Select Element dialog box opens. Here you can assign the element as the default element for the template parameter. Up Move the item to the upper position. Down Move the item to the lower possition. Create Create a new template parameter. Delete Remove the template parameter from the class.

Click this button to open the Template Parameter Specification dialog box.

© 2005 No Magic, Inc 5-128 5 DIAGRAMS BASICS Specifying Model Elements

B UTTONS AVAILABLE IN THE SPECIFICATION DIALOG BOXES

Button Function Close Save changes and exit the dialog box. Back Return to the previous dialog box. Forward Proceed to the next dialog box. Help Display MagicDraw Help.

Formatting Symbols

In MagicDraw, every symbol may have its own style: color, font, size, and so forth. There are several ways to define a symbol properties:

• From the symbol properties dialog box: from the selected symbol shortcut menu or from the Edit menu, choose Symbols and then Symbol(s) Properties.

• From the Project Options dialog box: this dialog box enables you to change all available symbol properties, create your own style for the project, apply different symbol properties for different diagrams, define stereotypes properties, that may be bound to the symbol, and more.

• From the MagicDraw main toolbar: using this toolbar, you may change a symbol's color, font, and paths style.

To set a symbol’s properties (fill color, text color, and others)

• From the symbol shortcut menu, choose Symbol(s) Properties.

• From the Options menu, choose Project. The Project Options dialog box opens. Choose the desired options for the selected model elements.

• Select a symbol and from the Edit menu, choose Symbol, and then choose Symbol(s) Properties. NOTE To apply changes made in the Project Options dialog box, click Apply.

To show/hide model element constraints, stereotype and/or tagged values on the diagram pane

• Select/clear the Show Constraints, Show Stereotype, and/or Show Tagged Values check boxes from the symbol shortcut menu. 1 From the Options menu, choose Project.

5-129 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Model Traceability

2 The Project Options dialog box opens. Select the Show Constraints, Show Stereotype, and/or Show Tagged Values check boxes for the selected model elements. NOTE To apply changes made in the Project Options dialog box, click the Apply button in the Styles tab.

Owner of the model element

Model elements and diagrams belong to a package, model (system boundary), subsystem or other appropriated model element, which is called owner. The name of the owner is displayed in the model element name compartment in parentheses.

To add a model element to a package, model (system boundary) or subsystem

• Drag a model element to the desired package on the Diagram pane or in the Browser tree.

• Open the Inner Elements tab, located in the Package, Model, or Subsystem Specification dialog box. Click Add and choose a model element or diagram you want to add to a package. Define a model element or diagram in the opened Specification dialog box and click OK.

• From the selected owner shortcut menu in the Browser tree, choose New Element. From the list, choose the desired model element and type its name on the Browser.

To display/hide the package/system boundary/subsystem name (the owner of an actor) on a model element

• From the symbol shortcut menu, choose Symbol(s) Properties. The Properties dialog box opens. Select/clear the Show Owner check box.

• From the Options menu, choose Project. The Project Options dialog box opens. Select the desired model element and select/clear the Show Owner check box. If you want to apply changes for already created model elements, click Apply. TIP! For a class, actor, and interface, you may display/hide the name of the owner from the symbol shortcut menu: choose Presentation Options, and then select/clear the Show Owner check box.

MODEL TRACEABILITY

© 2005 No Magic, Inc 5-130 5 DIAGRAMS BASICS Model Traceability

Magic Draw's Usages and Dependencies feature enables you to track and view element dependencies in UML models, explore how model elements are used by other elements, and understand the relationships between used and dependent elements. It is also useful for analyzing associations between elements or searching for diagrams where these elements are represented. Because the Usages/Dependent Elements Results window is not synchronized with the model, any changes made to the model elements won't show in the results window until you click Refresh.

To search for usages / dependent elements:

1 Select model element in the Browser or in the Diagram pane. 2 From the element shortcut menu, choose the Related Elements command and then choose either Find Usages or Find Dependent Elements command. The Find Usages / Dependent Elements Options dialog box appears. 3 In the Find Usages/Dependent Elements Options dialog box, specify options and click OK. Depending on which command you chose on the shortcut menu, either the Elements Using or Dependencies window then opens.

Usages Functionality

The Elements Using window provides a list of all the elements that reference the current element. For example: If element1 references element2, then element1 uses element2. Conversely, element2 is also used by element1. In the Attribute Specification dialog box, add class2 in the Type box. This means that class2 is used by that attribute. Containing other elements is not considered usage. For example, when a package contains an inner element class, this doesn't mean that the package uses class. Class is categorized as only a container of the package

Dependent Elements functionality

Dependency functionality gives the opposite results of those provided by the Elements Using window. The Dependencies window displays a list of the elements that depend on the current element. For example: If element1 contains a reference to element2, then element1 depends on element2.

5-131 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Model Traceability

F IND USAGES / DEPENDENT ELEMENTS OPTIONS DIALOG BOX Use the Find Usages/Dependent Elements Options to specify various options (for example, search and visualization options). The Find Usages/Dependent Elements Options dialog box covers the spectrum of usages and dependent element functionality. This means that if you clear or select any check boxes in the Find Usages / Dependent Elements Options dialog box, the next time you search for dependencies, the values for these check boxes remain the same.

To open the Find Usages / Dependent Elements Options dialog box:

1 Select a model element in the Browser tree or on the diagram pane. 2 Choose Related Elements from the shortcut menu and then choose either Find Usages or Find Dependent Elements. 3 The Find Usages/Dependent Elements Options dialog box opens.

Figure 12 -- Find Usages/Dependent Elements Options Element Name Function Treat relationships as Search results provide the complete list of used or search result dependent relationships together with other results.

Treat model elements at Relationships are skipped and only usages/dependent the end of relationships as elements between the model elements connected with these search results relationships are displayed.

© 2005 No Magic, Inc 5-132 5 DIAGRAMS BASICS Model Traceability

Element Name Function List usages/dependent Usages/dependencies of inner elements (beneath the level elements of every child of the current element) are listed in the search results list. element When the List usages/dependent elements of every child element check box is cleared (default value), the usages/dependencies tables list those elements that are using the current element. For example: element1 contains element2. When you search non-recursively, those elements which use element1 are listed. When you search recursively, elements using element1 are listed, while the other branch lists those elements which use element2. Ignore inner relations Only usages/dependencies outside the current element (above the level of current element and in the same level) are listed. You may use this option when you export the package as modules. You may analyze the dependencies of a package's inner element to its outer elements (note that you cannot export a package that contains inner elements with dependencies to the outer elements according to this package).For example: Create package p1 and package p2. Connect these packages with a dependency relationship. In the Browser, drag and drop this dependency to p1. In the Find Usages / Dependent Elements Options dialog box, select the Ignore inner relations check box. Search for the p1 dependency. The dependency to the dependency relationship will not be found because this element is a child of p1. Show results in the new If you want new Elements Using/Dependencies windows tab displayed for every new search, select Show results in the new tab check box. Show this dialog before If the Show this dialog before searching check box is searching selected, the Find Usages/Dependent Elements Options dialog box appears when you search for usages or dependencies. If the Show this dialog before searching check box is cleared, you may access the Find Usages/Dependent Elements Options dialog box, from the Elements Using/Dependencies window by pressing the Show Usages/Dependent Elements Options button.

E LEMENTS USING/DEPENDENCIES WINDOWS The Elements Using/Dependencies windows list results of the usages/dependencies. In the Elements Using/Dependencies windows you can analyze results, search for an element's place (in a diagram, for example, or in a browser), and filter results.

To open the Elements Using / Dependencies windows:

1 Select a model element in the Browser tree or on the diagram pane.

5-133 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Model Traceability

2 Choose Related Elements from the shortcut menu and then choose either Find Usages or Find Dependent Elements. 3 The Find Usages/Dependent Elements dialog box opens. Click OK to open the Elements Using/Dependencies window.

Figure 13 -- Elements using/ Dependences off window The following table presents more information about the Elements Using/Dependencies window. Item Name Function Expand Expands records listed in groups. Click the plus sign next to the group name to display the contents. Collapse Collapse records listed in groups. Select in Containment In the usages/dependencies table, select the record. Click the Tree Select in Containment Tree button. The Element is selected in the Browser, and the Containment tree and symbol of this element is selected in the diagram pane. Click the Select in Containment Tree button to open any closed and previously loaded diagrams.You can also select the element in the Containment Tree by double clicking it. NOTE The Select in Containment Tree button is not available for multiple elements selections. Move to Search Results In the usages / dependencies table, select the record. Click the Move to Search Results button. In the usages/dependencies tables listed results, are moved to the Browser, Search Results tree. In the Search Results tree, you will see all the results in one list and organined in two groups: From diagram and From model. Open all diagrams that Diagrams, which are referenced in the usages/dependencies contain current tables, are opened. In opened diagrams, the view is focused on Usages/Dependencies used/dependent elements. NOTE The Open all diagrams that contain current Usages/Dependencies button is inactive when there are no elements that are used in diagrams. Show/hide the Full Path The full path is displayed next to the element name. Names NOTE For a symbol this button is not valid.

© 2005 No Magic, Inc 5-134 5 DIAGRAMS BASICS Model Traceability

Refresh The usages/dependencies tables should be refreshed after: • Elements or symbols are deleted. • New dependencies/usages are created for the particular model element. Show The Find Usages/Dependent Elements Options dialog box Usages/Dependent opens. Elements Options Filter Filter boxes in the Elements Using and Dependencies windows are placed above the column, which will be filtered. In the Elements Using window, you can filter by element type or usage type. In the Dependencies window, you can filter according to element type and dependency type.When you expand the Filter box, you will see items listed in the usages/dependencies columns. NOTE In the Element Type Filter box within the Elements Using window, combo box, additional Show All but Symbols filtering options is added.

Defining Hyperlinks

You can set text for notes, text boxes, or separators as HTML text. You can also hyperlink to any model element.

To add a hyperlink for the model element

1 Open the model element Specification dialog box and select the Documentation/Hyperlinks tab. 2 Define the hyperlink to any model element, file, or Web page in the Insert Hyperlink dialog box. If you want this hyperlink to be active, select the Active Hyperlink check box. 3 Click OK. NOTE The hyperlink is added as a tag definition.

To set the note/text box/separator text as HTML

• From the note/text box shortcut menu, choose HTML Text.

• Draw the note or text box, using the Note (HTML text) or Text Box (HTML text) toolbar buttons. When selecting the text, the HTML editor toolbar opens.

5-135 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Model Traceability

To add a hyperlink to a note, text box, or separator text

1 Select the text where you want to add a hyperlink and click the Insert Hyperlink . 2 The Insert Hyperlink dialog box opens. Select the hyperlink you want to insert, either to a Web page, another model element, or a file: • To link to an existing model element, click the Element/Symbol tab, then click the Select Element/Symbol “…” button and select the model element or symbol you want to link to in the Select Model Element dialog box.

• To link to an existing Web page, click the Web Page tab, and in the Type the Web page name text box, type the URL of the Web page you want to link to. You can click the “…” button and browse the Web for the desired Web page. NOTE Set the path of the HTML viewer in the Environment Options dialog box (for a description, see Section “Setting Personal Preferences” on page 3-22.)

• To link to an existing file, click the File tab and enter the path to the file you want to link to. Or, click the Type the file name “…” button and, in the Open dialog box, select the file you want to link to.

NOTES: •The selected file opens in the HTML browser.

•Set the path of the HTML viewer in the Environment Options dialog box.

•You can link only to an existing file. New files are not created for you.

Using the HTML editor toolbar, you can change the font, color, size, and the alignment of the selected text.

I NSERT HYPERLINK DIALOG BOX

To open the Insert Hyperlink dialog box

1 Create a text box or a note on a diagram pane. Type the text you need. Set the note/text box text as HTML by choosing HTML Text from the note/text box shortcut menu. -or- Create a text box or note by clicking the Text Box (HTML Text) or Note (HTML Text) buttons. 2 Select the text. The HTML editor toolbar opens.

© 2005 No Magic, Inc 5-136 5 DIAGRAMS BASICS Model Traceability

3 Select the text where you want to add the hyperlink and click Insert Hyperlink.

Figure 14 -- Insert Hyperlink dialog box Tab name Box Function Element/ Symbol Text to display A text that will be displayed as a hyperlink. Creates a Select Element The Select Model Element dialog box opens. hyperlink that / Symbol “…” Select the model element you want to link to. goes to the selected model Select from list A list of all items that have previously been element. selected as links. Clear Remove all items from the Select from list. Active If selected, activates the hyperlink on the diagram. Web Page Text to display A text that will be displayed as a hyperlink. Creates a hyperlink that goes to the specified Web page. Type the Web Type the web page URL. Page name Click the “…” button. The Web browser window “…” opens. Browse the Web and find the web page you want to link to. NOTE Make sure that the path of the HTML viewer is set in the Environment Options dialog box. Select from list A list of all items that have previously been selected as links. Clear Remove all items from the Select from list.

5-137 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Laying out

Tab name Box Function

File Text to display A text that will be displayed as a hyperlink. Creates a Type the file Type the path to the file you want to be opened hyperlink that name “…” or click the “...” button. goes to the specified file. The Open dialog box opens. Select the file you want to link to. Select from list A list of items that have ever previously been selected as links. Clear Remove all items from the Select from list. Buttons available in the Insert Hyperlink dialog box:

• OK. Save changes and exit the dialog box.

• Cancel. Exit the dialog box without saving changes.

• Help. Display MagicDraw Help

LAYING OUT With MagicDraw, it is easy to manage simple or complex diagrams using automated layout features that optimize diagram layout for viewing. Lay out your symbols on the Diagram pane using the Layout menu, or you can use the symbol shortcut menu when two or more symbols are selected. Since MagicDraw version 8.0 new layout component is applied with much more possibilities for laying out your models.

To resize the selected shape Drag the corner of the shape to the desired size.

To resize automatically the selected shape to preferred size From the shape shortcut menu, choose Autosize.

To alter the routing of the path line Drag any point of the selected path in any direction. Magic Draw layouting mechanism is built on various layouters. All Layouters could be separated into 2 different groups: general layouters and specific diagram layouters. MagicDraw has only one specific diagram layouter - Class Diagram Layouter. General layouters are:

• Orthogonal Layouter

• Hierarchic Layouter

• Tree Layouter

© 2005 No Magic, Inc 5-138 5 DIAGRAMS BASICS Laying out

• Organic Layouter

• Circular Layouter

• Path Router These layouters are provided by yFiles layouting component. Component webstart demo version could be found at http://www.yworks.com/products/yed/demo/yed.jnlp. User can layout each diagram (except Sequence and Time Diagram) by using 6 general layouters. Class diagram also could be layouted using Class Diagram Layouter.

Orthogonal Layouter

The Orthogonal Layouter is well suited for medium sized sparse diagrams. It produces compact drawings with no shape overlaps, few crossings and few bends. All edges will be routed in an orthogonal style, i.e. only rectilinear style paths will be used. Orthogonal layout options Option Values Default Value Description Use Existing boolean false The layouter tries to Drawing as "orthogonalize" the given sketch Sketch by interpreting it and without making too many modifications in respect to the original drawing. Layout Only Top Boolean False Keeps the relative position of Level Symbols symbols inside packages and performs the top level layout. Group Layout 0-1 1 Set the desired layout quality. Quality Higher values result in less connection crossings and smaller layout area, but also increased computation time. Orthogonal Integer 50 Defines the virtual grid spacing Grid used by the layouter. Each shape center point lies on a grid point.

Hierarchic Layouter

Use Hierarchic layout style to highlight the main direction or flow within a diagram. Cyclic dependencies of shapes will be automatically detected and resolved. Shapes will be placed in hierarchically arranged layers. Additionally, the ordering of nodes within each layer is chosen in such a way, that the number of paths crossings is small.

5-139 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Laying out

Orthogonal layout options Option Values Default Value Description Reverse Boolean True If True, orientation is reversed in activity Orientation in diagram. Activity Diagram Minimal Layer Integer 40 Determines the minimal distance between Distance shapes that reside in adjacent layers. Minimal Shape Integer 30 Determines the minimal distance between Distance adjacent shapes that reside in the same layer. Minimal Path Integer 30 Determines the distance between adjacent Distance pairs of horizontal path segments and between horizontal path segments and shapes. Minimal First Integer 10 Determines the minimal length of the first Segment Length and last segments for orthogonal path routings, i.e. the length from the intersection points to the first or last bend point respectively. Orientation Top to Top to Determines main layout orientation. Bottom, Bottom Bottom to Top, Left to Right, Right to Left Shape Linear Simplex Linear Segments. Aligns shapes in such a Placement Segments, way that path segments tend to have very Polyline, few bends. It is a very good choice in Simplex, combination with Path Routing set to Pendulum, Orthogonal. However this greatly Median increases layout width. Simplex, • Polyline. Aligns shapes by slightly Tree reducing the width without shape overlaps. Although paths will have lots of bends. • Pendulum. A sound combination of Linear Segments and Polyline. • Simplex. Produces high quality drawings. Similar to Linear Segments, aligns shapes in such a way that path segments tend to have very few bends. Additionally, the resulting layout will be more balanced and more compact. • Median Simplex. It tends to produce more locally symmetric layouts for the sake of a few more bends. • Tree. Produces very nice layouts, when the graph is a tree. If the graph is not a tree, the placement policy Linear Segments will be used.

© 2005 No Magic, Inc 5-140 5 DIAGRAMS BASICS Laying out

Option Values Default Value Description Path Routing Oblique, Orthogonal • Oblique. Paths are routed to oblique Orthogonal style with a certain number of bends. • Orthogonal. Paths are routed to orthogonal style. Orthogonal path routing increases the height of the layout. Randomization Integer 40 Determines the number of rounds that are Rounds initialized using different randomized starting positions. Greater values can lead to fewer crossings and longer running times. Huge diagrams with lots of inherent crossings should be processed using smaller values. Layout Only Top Boolean False Keeps the relative position of symbols Level Symbols inside packages and performs the layout only on the top level. Make Sub Trees Boolean True Inheritance paths are joined into inheritance arcs.

Tree Layouter

Tree layouter organizes diagram shapes into a tree structure. Tree layouter might be applied on shapes that have no undirected cyclic paths between them. Table 3, Visible Tree layout options Option Values Default Value Description Layout Style Directed, Directed • Directed. The tree is laid out Balloon, hierarchically with the root shape on Horizontal- the top. This is a good choice for Vertical directed trees with a unique root shape and a moderate number of shapes on a single hierarchy level. This layout style uses current diagram layout as a sketch to determine the order of siblings at a common shape. • Balloon. The tree is routed in a radial style. This is a good choice for undirected, dense, or huge trees with a high number of shapes on a single hierarchy level. • Horizontal-Vertical. Children of a shape are either arranged on a horizontal or on a vertical line. Paths are routed orthogonally. This layout can be very compact if you choose the right alignment type for children of a node.

5-141 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Laying out

Option Values Default Value Description Make Sub Trees Boolean True Inheritance paths are joined into inheritance arcs. Directed Minimal Layer Integer 50 Determines the minimal distance Distance between parent and child shapes. Minimal Shape Integer 50 Determines the minimal distance Distance between siblings of a shape. Orientation Top to Bottom, Top to Determines the main layout Bottom to Top, bottom orientation. The layouter tries to Left to Right, arrange shapes in such a way that all Left to Right paths point in the main layout direction. Port Style Border Border Determines the way how paths are Centered, Centered attached to shapes. Border • Border Centered. Paths are attached Distributed to the center of the border of corresponding shapes. • Border Distributed. Path attachment points are distributed along the border of corresponding shapes. Orthogonal Path Boolean True If selected, all paths are routed Routing orthogonally in a bus-like fashion. If not selected, paths are routed as straight line segments. Balloon Root Shape Directed Root, Center Root • Directed Root. Chooses a shape with Position Center Root indegree zero if present. A good choice for directed rooted trees. • Center Root. Chooses the root shape in such a way that the depth of the resulting tree is minimized. Preferred Child 0-360 340 Determines the angular range of the Wedge sector that will be reserved for children of a shape. The remaining angular range will be automatically used to accommodate the edge that connects to the root node. Preferred Root 0-360 360 Determines the angular range of the Wedge sector that will be reserved around the root shape to accommodate attached subtrees. Minimal Path Integer 50 Determines the minimal length of a Length path. Compactness 0.1-0.9 0.5 The smaller the compactness factor, Factor the shorter paths and more compact overall layout. Horizontal-Vertical

© 2005 No Magic, Inc 5-142 5 DIAGRAMS BASICS Laying out

Option Values Default Value Description Horizontal Integer 20 The minimal horizontal distance Spacing between adjacent shapes. Vertical Spacing integer 20 The minimal vertical distance between adjacent shapes.

Organic Layouter

The layouter is well-suited for the visualization of highly connected backbone regions with attached peripheral ring or star structures. These structurally different regions of a network can be easily identified by looking at a drawing produced by this layouter. Organic layout options Option Values Default Value Description Preferred Path Integer 50 Specify the preferred length of all Length paths. The layouter tries to arrange the shapes in such a way that paths have the determined path length. Obey Shape Boolean True If True, the distance between two Size shapes is calculated with respect to shapes' size. Gravity Factor -0.2-2 2 Regulates the tendency of the shapes to be placed near the center of the diagram. The greater factor is, the closer shapes are placed to the center of diagram. Negative values lead to huge layouts. Path Attraction 0-2 2 Higher values makes Layouter obey the given preferred path length. Shape Repulsion 0-2 0 Higher values result in greater shape distances. Activate Tree Boolean True If True, optimizes tree-like substructures Beautifier of the diagram. Optimization process might ignore some layout options. Layout Only Top Boolean False If True, the algorithm keeps the relative Level Symbols position of symbols inside of packages and performs the layout only on the top level. Package Shape 0-1 0.2 Control the compactness of package Compactness shape. Larger values lead to more compact package shapes but paths between packages may be longer and shapes inside packages tend to get clutched together at the center of the package.

5-143 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Laying out

Circular Layouter

Circular Layouter produces layouts that emphasize group and tree structures within a network. It partitions shapes into groups by analyzing the connectivity structure of the network. The detected groups are laid out on separate circles. The circles themselves are arranged in a radial tree layout fashion. Circular Layouter options Option Values Default Description Value Layout Style Compact, Compact • Compact. Each group will consist Isolated, Single of shapes that are reachable by Cycle two link disjoint paths. Shapes that belong to more than one group will be assigned exclusively to one group. • Isolated. Each group will consist of shapes that are reachable by two path disjoint paths. All shapes belonging to more than one group will be assigned to an isolated group. • Single Cycle. All shapes will be arranged on a single circle. Minimal Shape Integer 100 Determines the minimal distance Distance between borders of two adjacent shapes on a common circle. The smaller the distance, the more compact resulting layout. Auto Circle Boolean True If True, determines the radius of Radius each circle in the layout automatically. An automatically chosen radius is usually the smallest possible radius that obeys Minimal Node Distance. Fixed Circle Integer 200 If Auto Circle Radius is not set, this Radius option determines the fixed radius for all circles in the resulting layout. Minimal Node Distance will be ignored in this case. Preferred Child 0-360 340 Determines the angular range of the Wedge sector that will be reserved for children of a shape. The remaining angular range will be automatically used to accommodate the paths that connect to the root node.

© 2005 No Magic, Inc 5-144 5 DIAGRAMS BASICS Laying out

Option Values Default Description Value Minimal Path Integer 50 Determines the minimal length of a Length path that connects two shapes that lie on separate circles. The smaller the chosen value, the more compact the resulting layout. Maximal 10-360 100 The bigger the chosen value, the Deviation Angle more compact the resulting layout. If a value smaller than 90 degrees, the tree-edges might cross through the circularly arranged groups of shapes. Compactness 0.1-0.9 0.5 The smaller the compactness factor, Factor the shorter paths and the more compact the overall layout.

Orthogonal Path Router

This layouter routes paths using only vertical and horizontal line segments, while keeping the positions of shapes in the diagram fixed. The routed paths usually will not cross any shapes and not overlap any other paths. Orthogonal Path layout options Option Values Default Description Value Minimal Integer 20 Specifies the minimal allowed Distance distance between shapes and paths. Use Existing Boolean False Specifies whether existing bends Bends should be used as an initial solution for the new routing. Route Only Boolean False If True, only paths that violate the Necessary minimal distance criterion will be rerouted.

Organic Path Router

This layouter routes paths using oblique paths style, while keeping fixed positions of shapes on a diagram. The routed paths usually will not cross any shapes and not overlap any other paths.

5-145 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Laying out

Organic Path layout options Option Values Default Value Description Minimum Path Integer 1 Determines the minimum distance between Distance any two path segments. Custom Integer 10 Determines the distance between any path Minimum segment and any shape side. The path router Distance to strictly adheres to the set value. Router Nodes doesn't use this value by default due to increased calculation times. Route on Grid Boolean True If True, all paths are routed on grid lines from the predefined grid. Space Driven 0-1 1 Determines the ratio between two Vs. Center complementary weighting strategies when Driven Search looking for a path, namely "center driven" and "space driven" weighting. Values closer to 0 lead to paths that are more distributed over the available space. Values closer to 1 give more emphasis to paths closer to a path's center. Local Crossing Boolean True If False, the number of crossings seen at a Minimization shape side can increase a lot. Since this option has a positive effect on a diagram "readability," it is enabled by default.

Class Diagram Layouter

Class diagram layouter uses different layout algorithms to improve class diagram readability. Class Diagram layout options Option Values Default Value Description Minimal Layer Integer 50 Determines the minimal distance between Distance parent and child shapes. Minimal Shape Integer 50 Determines the minimal distance between Distance the siblings of a shape. Orientation Top to Top to bottom Determines the main layout orientation. The Bottom, layouter tries to arrange shapes in such a Bottom way that all paths point in the main layout to Top, direction. Left to Right, Left to Right

© 2005 No Magic, Inc 5-146 5 DIAGRAMS BASICS Zooming

Option Values Default Value Description Compactness 0-1 1 Adjusting this value can lead to a variety of Factor differing layouts. For small values, the resulting layout will use much space and shapes tend to be far away from each other. Values around 0.5 lead to evenly distributed shapes, whereas values near 1.0 produce highly compact layouts Space Driven 0-1 1 Determines the ratio between two Vs. Center complementary weighting strategies when Driven Search looking for a path, namely "center driven" and "space driven" weighting. Values closer to 0 lead to paths that are more distributed over the available space. Values closes to 1 give more emphasis to path paths closer to a path's center. Build Boolean True Classes connected by generalization paths Generalization are organized into hierarchies Hierarchies Build Realization Boolean False Classes connected by realization paths are Hierarchies organized into hierarchies Build Boolean False Classes connected by containment paths Containment are organized into hierarchies Hierarchies Make Sub Trees Boolean True If enabled, inheritance paths will be joined into inheritance arcs.

Quick Diagram Layout feature

You may use Quick Layout feature when editing diagrams other that class or sequence. This feature applies recommended layouter with default options on active diagram.

ZOOMING Zooming allows you to select a particular part of a diagram, zoom into it, and make changes while working with a finer level of detail. You can also gain an overview of a diagram by zooming out from it.

To fit the current diagram in the window

• From the View menu or from the diagram shortcut menu, choose Fit in Window (shortcut keys CTRL+W.)

• In the Browser’s Zoom tab, click Fit in Window .

5-147 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Using Grid

To zoom into the current diagram

• From the View menu or from the diagram shortcut menu, choose Zoom In (shortcut keys CTRL+NumPad PLUS SIGN (+) or scroll.)

• Click the Zoom In toolbar button .

To zoom out from the current diagram

• From the View menu or from the diagram shortcut menu, choose Zoom Out (shortcut keys CTRL+NumPad MINUS SIGN (-) or scroll.)

• Click the Zoom Out toolbar button . TIP! You may zoom in or zoom out using the CTRL+wheel keys.

To restore the diagram’s original size

• From the View menu or from the diagram shortcut menu, choose Zoom 1:1 (shortcut keys CTRL+NumPad SLASH MARK (/).)

• Click the Zoom 1:1 toolbar button .

To view selected shapes at maximum size Select shapes and then, from either the View menu or the diagram shortcut menu, choose Zoom to Selection (shortcut keys CTRL+NumPad ASTERICS MARK (*).)

To select the zoom settings

1 From the Options menu, choose Environment. The Environment Options dialog box opens. 2 Open the Diagram pane and change the Zoom Step Size property. The maximum number is 1.0 (you may zoom a diagram twice.) NOTE You may also zoom in or out of the diagram using the zoom panel in the Browser window. For the detailed description, see Section “Documentation/Zoom Control/Properties” on page 4-93.

USING GRID The grid helps you lay out diagram symbols on the Diagram pane. By default the grid is in the visible state.

© 2005 No Magic, Inc 5-148 5 DIAGRAMS BASICS Assigning Shortcut Keys

To change the grid state (visible, not visible) From either the View menu or from the diagram shortcut menu, choose Grid and then select/clear the Show Grid check box.

To pull a path with the intersection of gridlines From either the View menu or from the diagram shortcut menu, choose Grid and then select/clear the Snap Paths to Grid check box.

To pull a shape with the intersection of gridlines From either the View menu or from the diagram shortcut menu, choose Grid and then select/clear the Snap Shapes to Grid check box.

To change the grid size

1 From either the View menu or from the diagram shortcut menu, choose Grid and then choose Grid Size . 2 The Grid Size dialog box opens. 3 Enter a grid size between 2 and 30 (default is 10). 4 Click OK.

To change the grid style

1 From the Options menu, choose Environment. The Environment Options dialog box opens. 2 From the Grid Style drop-down list, select one of the following styles: • Dense

• Sparse (default)

ASSIGNING SHORTCUT KEYS

To assign or change a command shortcut key

1 From the Options menu, choose Environment. 2 The Environment Options dialog box opens. 3 Choose the Keyboard pane and assign the desired shortcut keys in the right pane of the dialog box. For more information about the Keyboard pane, see Section “Keyboard pane” on page 3-34.

5-149 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Printing

PRINTING In MagicDraw, you can print an active diagram, multiple diagrams, or selected model elements. All printing menu commands are found in the File menu. You can also use the toolbar buttons or the shortcut keys. Before printing, use the Print dialog box to set your printing options. NOTE If the size of the text is too small, it may be not visible on the printed page.

To open the Print dialog box

• From the File menu, choose Print.

• In the Print Preview screen, click the button. The Print dialog box contains the following tabs: Print Range, Print Options and the Print Header/Footer. Descriptions for these tabs appear in the following sections.

P RINT RANGE TAB In the Print Range tab, select the item you want to print.

© 2005 No Magic, Inc 5-150 5 DIAGRAMS BASICS Printing

Figure 15 -- Print dialog box. Print Range tab Element name Function Active Diagram Print the currently opened diagram. Selected Symbols Print symbols you select on the diagram. The desired symbols should be selected to activate this option button. Selected Diagrams From the Not Empty Diagrams list, select diagrams you want to print. Name Show available diagrams in the project. To select the diagram for printing, click the name of the diagram in the list. The selected diagrams are highlighted. Press CTRL or SHIFT to select more than one diagram. Owner The name of the model element that owns the particular diagram. Select All Select for printing all the diagrams in the list. Unselect All Remove the selection. Load All Diagrams Load all diagrams belonging to a project. By default only opened diagrams are shown in the Print dialog box. Print Print the selected diagram(s). Close Close the dialog box. Help Display MagicDraw UML Help.

5-151 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Printing

P RINT OPTIONS TAB Click the Print Options tab to customize the printing jobs.

Figure 16 -- Print dialog box. Print Options tab Element name Function Print Background Print the background color of your diagrams. Show Pages on Show the page boundary on the diagram pane. Diagram NOTE You will not see any boundary if the Fit in Page check box is selected. Fit in Page The printed diagram fits in one page. If the Fit in Page check box is cleared, and the Show Pages in Diagram check box is selected, the gridlines of pages are shown on the diagram pane. Zoom Zoom the selected diagram to the size you want for printing. NOTE You are not allowed to zoom a diagram if the Fit in Page check box is selected. Pages Set the number of pages on which you want to print the diagram. • Vertical. The number of vertical pages on which the diagram will be displayed. • Horizontal. The number of horizontal pages on which the diagram will be displayed.

© 2005 No Magic, Inc 5-152 5 DIAGRAMS BASICS Printing

Element name Function Page Settings The Page Setup dialog box opens. Print Test Page Print the test page. Set print options in the Print Options dialog box. Preview Preview your diagram’s appearance before printing. < Preview the previous page. > Preview the next page.

P RINT HEADER/FOOTER TAB Click the Print Header/Footer tab to customize the header and footer of the printed pages.

Figure 17 -- Print dialog box. Print Header/Footer tab • Use any text and combine it with these variables box - use this box to indicate which fields you want included in the header/footer.

• Customize header group box - prints the header. Select the Print Header check box and type the text you wish to be printed. Use the "…" button to choose the desired font.

• Customize footer group box - prints the footer. Select the Print Footer check box and type or change the text you wish to print. Use the "…" button to choose the

5-153 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Model Elements Common in all Diagrams

desired font. By default <$PageNumber$> <$FileName$> <$DiagramName$> <$Date$> <$Time$> is printed.

MODEL ELEMENTS COMMON IN ALL DIAGRAMS The following symbols are only graphical symbols and do not possess data. Model elements Button Function Notation Text Box Type text directly on the diagram.

Text Box (HTML (X) text)

(SHIFT+X) Note A graphical symbol containing textual information. Use a note (N) to add any needed information to your Note (HTML text) diagram. Usually a note is connected with another symbol, using (SHIFT+N) a note anchor line. Anchor to Note Relates symbols and notes. Use a note anchor to relate any symbol to a note. You (H) may change the style of a note anchor to rectilinear, oblique, or bezier. For a detailed description on editing the appearance of paths, see Section “Drawing Relationship paths” on page 5-113. Constraint The presentation of a NOTE constraint between two graphical symbols. To select a constraint, (SHIFT+H) right-click the Note Anchor button.

© 2005 No Magic, Inc 5-154 5 DIAGRAMS BASICS Model Elements Common in all Diagrams

Model elements Button Function Notation Containment Shows a class, package or other model element declared within another model element. SHIFT+C

Separator Separates different parts of a diagram with (W) a horizontal line. Rectangular Separates different Shape parts of a diagram with a rectangular shape.

Anchor to Note

Use an Anchor to Note to relate any symbol to a note. You can change a note anchor's style to rectilinear, oblique, or bezier. For a detailed description on editing the appearance of paths, see Section “Drawing Relationship paths” on page 5-113.

Constraint path

For two graphical symbols (such as two classes or two associations), the constraint is shown as a dashed arrow from one element to the other element. The constraint is labeled by the constraint string (in braces {}). The direction of the arrow is relevant information within the constraint. The client (tail of the arrow) is mapped to the first position and the supplier (head of the arrow) is mapped to the second position in the constraint.

To add a constraint expression to the constraint path From the constraint path shortcut menu, choose Select Constraint and select one of the following:

5-155 © 2005 No Magic, Inc. DIAGRAMS BASICS 5 Model Elements Common in all Diagrams

• Choose . The Select Extension Element Storage dialog box opens. Select the folder where the constraint will be stored and click OK. The Constraint Specification dialog box opens. Fill in the dialog box fields.

• Choose an already created constraint from the list.

Separator

You may use a horizontal separator to rule off different parts of a diagram.

To set the text position of a separator’s name

• From the separator shortcut menu, choose Text Position, and then choose the text position you need: Left (default), Center, or Right.

• Set a text position in the Project Options dialog box.

To set a separator line style (dashed or solid)

• From the separator shortcut menu, choose Line Style, and then choose the style you need: Dashed (default) or Solid.

Documentation

Define documentation for various documents in the Comment Specification dialog box. You can also define a comment's stereotypes, tagged values, and constraints.

To open the Comment Specification dialog box

1 In the elements Specification dialog box, click Documentation/Hyperlinks. 2 Expand the Documentation/Hyperlinks branch in Specification tree and double click Comment.

To display the documentation on the Diagram pane

1 Draw a note on the Diagram pane. 2 Using an Anchor to Note, connect the note with the model element containing the documentation you want to display. 3 From the note shortcut menu, choose Retrieve Documentation. TIP! If a comment contains stereotypes, tagged values, and/or constraints, you can choose to display them in the note’s content.

© 2005 No Magic, Inc 5-156 5 DIAGRAMS BASICS Model Elements Common in all Diagrams

5-157 © 2005 No Magic, Inc. UML DIAGRAMS 6

In software development, the diagram is the equivalent of a blueprint. To meet the various needs of many parties, we often need several different “blueprints” of the same system. Furthermore, ever system is described by many different aspects. For example:

• Functional (static structure and dynamic interactions)

• Nonfunctional (timing requirements, reliability, and deployment)

• Organizational (work organization and mapping to code modules) MagicDraw supports all diagrams defined in UML 1.4 and UML 2.0:

• Class diagram

• Object diagram

• Use case diagram

• Statechart diagram

• Activity diagram

• Communication diagram

• Sequence diagram

• Component diagram

• Deployment diagram However, MagicDraw has only 7 diagram buttons in the application. This is done to simplify the user interface and allow for more flexibility. Object and collaboration diagrams are supported by MagicDraw collaboration diagram. However it is possible to draw objects in the class diagram, node and component instances in the implementation diagram. Component and deployment diagrams are supported by MagicDraw implementation diagram which allows you to draw both kinds of diagrams (or mix of them) on the same canvas. It possible to distinguish model management diagrams that are supported by MagicDraw class diagram.

© 2005 No Magic, Inc. 6-158 6 UML DIAGRAMS System Views

SYSTEM VIEWS Most UML literature (“Instant UML”, “UML Toolkit”, “The Unified Modeling Language Reference Manual”) define more or less similar classification for the system views:

Figure 1 -- System Views Several kinds of diagrams provide a visual notation for the concepts in each view.

Use Case View

The use case view represents the functionality and behavior of a system, subsystem or a class as it is perceived by external users. This view is targeted mainly to customers, designers, developers, and testers. The use case view usually is presented as a number of use cases and actors in Use Case diagrams. Occasionally it is used in Activity and Sequence diagrams. The use case view is central because its contents drive the development of the other views. It is also used for the project planning. Every single use case unit is deemed as the manageable unit during a project’s execution.

Logical View

The logical view represents both the static and dynamic aspects of a system in terms of class and objects. In contrast to the use case view, the logical view looks inside the system. Static structure is displayed on Class and Package diagrams, and the main goal of these diagrams is to represent a system’s class structure: The development of the static structure relies on abstraction, encapsulation, and uniformity. The class diagram finally results in the code structure. The dynamic behavior of the system is displayed on Interaction (sequence and collaboration), Statechart, and Activity diagrams. It focuses mainly on the interactions that occur between objects inside a system, activities and work performed by the various parts of a system, and state changes within a particular object or collaboration. Rather than defining the participants of the system, it defines how particular use cases are executed, which provides value for the external user. The dynamic view is concerned about what is happening inside the system and how those actions impact other participants.

6-159 © 2005 No Magic, Inc. UML DIAGRAMS 6 Class Diagram

Process view

The process view represents the division of the system into processes and processors. This view allows efficient resource usage, parallel execution, and the handling of asynchronous events from the environment. The process view is displayed on Component, Deployment and Interaction diagrams. The process view also is called the concurrency view. The term “concurrency view”, however, carries with it a slightly different connotation/ implication. The synchronization of the thread, object initialization, and other actions are displayed on the same diagrams as dynamic model elements (sequence, collaboration, state, and activity).

Component view

The component view represents the implementation modules and their dependencies. This view mainly deals with the development time software structure – source code files, libraries, linking time components, and finally executable components. In fact, the component view describes the software as it appears in the computer disc, such as files and directories. The component view is displayed on component diagrams.

Deployment view

The deployment view represents the physical arrangement of a system, such as computers and devices (nodes) and how they are connected to each other. In contrast to the component view, the deployment view is concerned with the physical structure of the system and the location of the software modules (components) within the system. The deployment view is displayed on component and deployment diagrams. The mix of component and deployment diagrams is called the implementation diagram in MagicDrawTM UML.

CLASS DIAGRAM A class diagram is a graphic representation of the static structural model. It shows classes and interfaces, along with their internal structure and relationships. Classes represent types of objects that are handled in a system. A class diagram does not show temporal information, it describes only the classification. The instances of those types (objects) are

© 2005 No Magic, Inc 6-160 6 UML DIAGRAMS Class Diagram

instantiated only on the runtime and are represented by an object and interaction diagrams. Classes can be related to each other in a number of ways: associated (connected to each other), dependent (one class depends/uses another class), specialized (one class is a subtype of another class), or packaged (grouped together as a unit – package). A class diagram does not express anything specific about the relationships of a given object, but it does abstractly describe the potential relationships of one object to other objects. A system typically has a number of class diagrams – not all classes are inserted into a single class diagram. A class may have multiple levels of meaning and participate in several class diagrams. A class diagram is the logical map of your existing or future source code. Classes can be grouped into packages. Packages can be nested within other packages. A package, as an entity, may have all the relationships that can be drawn for a class. Those relationships are derived from the classes or packages that are nested within two particular packages (i.e., the relationship between packages reflects a set of relationships between classes placed in those packages).

6-161 © 2005 No Magic, Inc. UML DIAGRAMS 6 Class Diagram

Class diagram elements

Model element Button (hot Notation key) Class A descriptor for a set of objects with similar structures, behaviors, (C) and relationships.

Enumeration A user-defined data type whose instances are a set of user-specified (K) named enumeration literals. The literals have a relative order but no algebra is defined on them. Interface The description of a visible behavior of a class, a component or a (I) package. Interface with the suppressed attributes and operations.

Port Ports represent interaction points between a classifier and (Shift_F11) its environment. A port has the ability to specify that any requests arriving at this port are handled. Package A group of classes and other model elements. (P)

© 2005 No Magic, Inc 6-162 6 UML DIAGRAMS Class Diagram

Model element Button (hot Notation key) Subsystem A subsystem is treated as an abstract single unit and groups model (Y) elements by representing the behavioral unit in a physical system.

Model A model is an abstraction of a physical system from a particular (M) point of view. A model contains a hierarchy of packages/subsystems and other model elements that describe the system. N-ary association An association among two or more classes (a single class may appear (O) more than once).

6-163 © 2005 No Magic, Inc. UML DIAGRAMS 6 Class Diagram

Model element Button (hot Notation key) Collaboration A collaboration is represented as a kind of classifier and defines a (Q) set of cooperating entities to be played by instances (its roles), as well as a set of connectors that define communication paths between the participating instances. A collaboration specifies a view (or projection) of a set of cooperating classifiers. It describes the required links between instances that play the roles of the collaboration, as well as the features required of the classifiers that specify the participating instances. Object An instance of a class. (SHIFT+O)

Association A connection among classes, which means that there is also a (S) connection among objects of those classes. Aggregation An aggregation is an association that represents a whole-part (A) relationship.

© 2005 No Magic, Inc 6-164 6 UML DIAGRAMS Class Diagram

Model element Button (hot Notation key) Composition A composition is a form of aggregation with stronger ownership and (F) coincident lifetime of part with the whole.

Containment Shows a class, package or other model element declared within another (SHIFT+C) model element. Such a declared class is not a structural part of the enclosing class but merely has scope within the namespace of the enclosing class, which acts like a package toward the inner class. Generalization A relationship between a more general and a more specific element. (G)

Realization (realize) A relationship usually used between an interface and (R) implementation class.

6-165 © 2005 No Magic, Inc. UML DIAGRAMS 6 Class Diagram

Model element Button (hot Notation key) Realization Relationship between class and interface. (E)

Dependency Indicates a semantic relationship between two or more model (D) elements. It relates model elements themselves and does not require a set of (T) instances for its meaning.

NOTE (U) Select by right-clicking the kind of relationship: dependency, abstraction, usage, binding dependency, (B) permission, merge, or import.

(J)

Link Attribute Visual tie between parts of association class – association part and (L) class part.

© 2005 No Magic, Inc 6-166 6 UML DIAGRAMS Use Case Diagram

Model element Button (hot Notation key) Link A connection between two or more objects. (SHIFT+L) Stereotype

(SHIFT+S)

USE CASE DIAGRAM A use case is a description of the functionality (a specific usage of a system) that a system provides. The use case descriptions may exist in textual form (a simple table), where the use case diagram provides additional information about the relationship between use cases and external users. The diagram also allows definition of the system's boundary. Use cases are described only in terms of how they appear when viewed externally by the user (a system's behavior as the user perceives it), and do not describe how the functionality is provided inside the system. Use cases are not object-oriented, but they are included in the UML to simplify the approach of the project's lifecycle -- from specification to implementation..

Figure 2 -- Schematic view of the use cases in the system.

6-167 © 2005 No Magic, Inc. UML DIAGRAMS 6 Use Case Diagram

Use Case diagram elements

Element Button Notation (hot key) Actor Actors represent roles played by human users, external hardware, and other subjects. An actor does (A) not necessarily represent a specific physical entity but merely a particular facet (that is, "role") of some entity that is relevant to the specification of its associated use cases. Use Case A use case is a kind of behavior- related classifier that represents a declaration of an offered behavior. (U) Each use case specifies a particular behavior, possibly including variants that the subject can perform in collaboration with one or more actors. The subject of a use case could be a physical system or any other element that may initiate behavior, such as a component, subsystem, or class. Package A group of classes and other model elements. A package may contain other packages. (P)

Subsystem A subsystem is treated as an abstract single unit. It groups model elements by representing (Y) the behavioral unit in a physical system.

System Boundary Another representation of a package. A system boundary element consists of use cases (B) related by Exclude or Include (uses) relationships, which are visually located inside the system boundary rectangle.

© 2005 No Magic, Inc 6-168 6 UML DIAGRAMS Use Case Diagram

Element Button Notation (hot key) Collaboration A collaboration is represented as a type of classifier. It defines a set of (Q) cooperating entities to be played by instances (its roles), as well as a set of connectors that define communication paths between the participating instances. A collaboration specifies a view (or projection) of a set of cooperating classifiers. It describes the required links between instances that play the roles of the collaboration, as well as the features required of the classifiers that specify the participating instances. Association The participation of an actor in a use case, i.e. instances of the actor and instances of the use case communicate with each other. This (S) is the only relationship between actors and use cases. Extend A relationship from an extending use case to an extended use case that specifies how and when the (E) behavior defined in the extending use case can be inserted into the behavior defined in the extended use case. The extension takes place at one or more specific extension points defined in the extended use case. Include An include (uses) relationship from use case A to use case B indicates that an instance of the use case A will also contain the behavior as (C) specified by B.

Dependency Indicates a semantic relationship among two or more model elements. (D)

6-169 © 2005 No Magic, Inc. UML DIAGRAMS 6 Communication Diagram

Element Button Notation (hot key) Generalization A relationship between a more general and a more specific element. (G)

Interface Realization A specialized realization relationship between a classifier and an interface. This relationship (R) signifies that the realizing classifier conforms to the contract specified by the interface. Containment Shows a class, package or other model element declared within another model element. Such a SHIFT+ declared class is not a structural C part of the enclosing class but merely has scope within the namespace of the enclosing class, which acts like a package toward the inner class.

COMMUNICATION DIAGRAM The Communication diagram illustrates the various static connections between objects and models their interactions. It also presents a collaboration that contains a set of instances, as well as their required relationships given in a particular context, and includes an interaction that defines a set of messages. These messages specify the interaction between the classifier roles within a collaboration that will serve to achieve the desired result. A Communication diagram is given in two different forms: at the instance level or at the specification level.

© 2005 No Magic, Inc 6-170 6 UML DIAGRAMS Sequence Diagram

Communication Diagram elements

Element Button Notation (hot key) Lifeline A lifeline represents an individual participant in the Interaction. Lifelines (O) represent only one interacting entity. Connector Specifies a link that enables communication between two or more lifelines.Each (C) connector may be attached to two or more connectable elements, each representing a set of lifelines. Connector to Self Self connector for self-calls. It begins and ends on the same lifeline. (S)

Message to Right Message to Left A Message defines a particular communication (R) between Lifelines of an Interaction. It implies that one object uses the services of another object, or sends a message to that object. A (E) communication can be e.g. raising a signal, invoking an Operation, creating or destroying an Instance. Click on the arrow to expand toolbar and choose appropriate message type.

SEQUENCE DIAGRAM A sequence diagram shows interaction information with an emphasis on the time sequence. The diagram has two dimensions: the vertical axis represents time, while the horizontal axis represents participating objects. The time axis could be an actual reference point (by placing the time moments labels as text boxes). Horizontal ordering of the objects is not

6-171 © 2005 No Magic, Inc. UML DIAGRAMS 6 Sequence Diagram

significant to the operation, and you may rearrange them as necessary. Sequence diagram elements Model elements Button (hot Notation key) Classifier Role An instance of a class. An object has identity, attribute values, a unique name, a (O) state, and a class as the type of identifier. Lifeline Represents the existence of an object at a particular time.

Activation Bar Focus of control. Shows the period during which an object is performing an action either directly or through a subordinated procedure. Interaction Use Reference to collaboration diagram, sequence diagram and time diagram can be (SHIFT+T) created.

Combined Fragment A fragment of sequence diagram can be separated. (F)

© 2005 No Magic, Inc 6-172 6 UML DIAGRAMS Sequence Diagram

Model elements Button (hot Notation key) Message Default: synchronous uninterpreted A communication between objects that conveys (M) information with the expectation that action will ensue. The receipt of a message is one type of event. Message to Self

(S)

Diagonal Message Requires some time to arrive, during which another action occurs. (D)

Concurrent Lifeline A conditional branch in the message flow. (L)

Recursive message A connected set of messages can be enclosed and marked as iteration. (R)

6-173 © 2005 No Magic, Inc. UML DIAGRAMS 6 State Diagram

STATE DIAGRAM The behavior of objects of a class can be described in terms of states and events, using a state machine connected to the class under construction. A state machine is a specification of the sequence of states through which an object or an interaction goes in response to events during its life, together with responsive actions. The state machine may represent the sequence of states of a particular collaboration (i.e. collection of objects) or even the whole system (which is also considered a collaboration). The abstraction of all possible states defined in a state machine is similar to the way class diagrams are abstracted: all possible object types (classes) of a particular system are described. Objects that do not present a very pronounced reactive behavior may always be considered to stay in the same state. In such a case, their classes do not possess a state machine. State diagrams (also called Statechart diagrams) represent the behavior of entities capable of dynamic behavior by specifying its response to the receipt of event instances. Typically, state diagrams describe the behavior of classes, but statecharts may also describe the behavior of other model entities such as use-cases, actors, subsystems, operations, or methods. A state diagram is a graph that represents a state machine. States and various other types of vertices (pseudostates) in the state machine graph are rendered by appropriate state and pseudostate symbols, while transitions are generally rendered by directed arcs that inter- connect them. States may also contain subdiagrams by physical containment or tiling. Note that every state machine has a top state, which contains all the other elements of the entire state machine. The graphical rendering of this top state is optional. The states are represented by state symbols, while the transitions are represented by arrows connecting the state symbols. A state diagram concerns internal object changes (as opposed to the external object interaction in collaboration). Do not attempt to draw them for all classes in the system, because they are used only for modeling a complex behavior. A state diagram shows all the possible states that objects or collaborations may have, and what events cause the state to change. An event can be another object that sends a message to it: for example, that a specified time has elapsed or that some condition has been fulfilled. A change of a state is called a transition. A transition may also have an action connected to it that specifies what should be done in connection with the state transition.

State Diagram elements

NOTE

© 2005 No Magic, Inc 6-174 6 UML DIAGRAMS State Diagram

If a black arrow is placed on a button, right-click the button, to open other available buttons. Model elements Button Notation (hot key) State A state models a situation during which some (usually implicit) invariant (SHIFT+S) condition holds. The invariant may represent a static situation such as an object waiting for some external event to occur. However, it can also model dynamic conditions such as the process of performing some behavior. Composite State A composite state either contains one region or is decomposed into two or (SHIFT+ more orthogonal regions. C) Each region has a set of mutually exclusive disjoint subvertices and a set of transitions. Orthogonal State An orthogonal state is a composite state with at least 2 regions. (C)

Submachine State A submachine state specifies the insertion of the specification of a (A) submachine state machine. Submachine state is a decomposition mechanism that allows factoring of common behaviors and their reuse.

Initial Denotes an initial state when an object is created. (I)

6-175 © 2005 No Magic, Inc. UML DIAGRAMS 6 State Diagram

Model elements Button Notation (hot key) Final State Denotes an object’s destruction or the end of collaboration. (F) Terminate

Entry Point An entry point connection point reference as the target of a transition implies that the target of the transition is the entry point pseudostate as defined in the submachine of the submachine state. Exit Point An exit point connection point reference as the source of a transition implies that the source of the transition is the exit point pseudostate as defined in the submachine of the submachine state that has the exit point connection point defined. Connection Point Reference Connection point references of a (Y) submachine state can be used as sources/targets of transitions. They represent entries into or exits out of the submachine state machine referenced by the submachine state.

Deep History Represents the most recent active configuration of the composite state that (P) directly contains this pseudostate; e.g. the state configuration that was active when the composite state was last exited.

© 2005 No Magic, Inc 6-176 6 UML DIAGRAMS State Diagram

Model elements Button Notation (hot key) Shallow History Represents the most recent active substate of its containing state (but not (SHIFT+R) the substates of that substate). A composite state can have at most one shallow history vertex. Junction Junction vertices are semantic-free vertices that are used to chain together (J) multiple transitions. They are used to construct compound transition paths between states.

Choice Choice points are used for splitting transition paths. In the dynamic choice point, (O) a decision on which branch to take is only made after the transition from State1 is taken and the choice point is reached. Fork/Join Vertical Helps to control parallel actions. (G) Fork/Join Horizontal Helps to control parallel actions. (D)

Transition The starting time for a relative time event may only be omitted for a time event that is the trigger of (T) a state machine.

6-177 © 2005 No Magic, Inc. UML DIAGRAMS 6 Activity Diagram

Model elements Button Notation (hot key) Transition to Self When an object returns to the same state after the specified event occurs. (E)

ACTIVITY DIAGRAM An activity graph is a variation of a state machine. In a state machine, the states represent the performance of actions or subactivities, while the transitions are triggered by the completion of the actions or subactivities. It represents a state machine of a procedure itself. The entire activity diagram is attached (through the model) to a class, such as a use case, or to a package, or to the implementation of an operation. The purpose of this diagram is to focus on flows driven by internal processing (as opposed to external events). You should use activity diagrams in situations where all or most of the events represent the completion of internally-generated actions (that is, procedural flow of control). You should use ordinary state diagrams in situations where asynchronous events occur. An activity diagram is a variant of a state diagram. Organized according to actions, activity diagrams are mainly targeted towards the representation of the internal behavior of a method (the implementation of an operation) or a use case. Though activity diagrams are often classified alongside interaction diagrams, they actually focus on work performed by a system instead of an object interaction. An activity diagram captures actions and displays their results. A state diagram may also represent this sequencing of steps. However, given the procedural nature of the implementation of the operations – in which most events simply correspond to the end of the preceding activity – it is not necessary to distinguish states, activities, and events systematically (i.e., state changes and external events have less importance inside the method). It is therefore beneficial to have a simplified representation for directly displaying activities. An activity diagram is a convenient way to describe complex algorithms, parallel operations, and business processes. Together with the collaboration and sequence diagrams, they are used to relate use cases. A state diagram may also represent this sequencing of steps. However, given the procedural nature of the implementation of the operations – in which most events simply correspond to the end of the preceding activity – it is not necessary distinguish states, activities, and events systematically (i.e. state changes and external events aren’t so important inside the method). It is therefore beneficial to have a simplified representation for directly displaying activities. An activity diagram is a convenient way to describe complex algorithms, parallel operations, and business processes. They are used to relate use cases together with the collaboration and sequence diagrams.

© 2005 No Magic, Inc 6-178 6 UML DIAGRAMS Activity Diagram

Activity Diagram elements

Element Button Notation (hot key) Action An action is a named element that is the fundamental unit of (B) executable functionality. The execution of an action represents some transformation or processing in the modeled system. When the action executes and what its actual inputs are is determined by the concrete action and the behaviors in which it is used. Call Operation Action An action that transmits an operation call request to the target object, (S) where it may cause the invocation of associated behavior. The argument values of the action are available to the execution of the invoked behavior. Object Node Activity nodes are introduced to provide a general class for nodes (SHIFT+B connected by activity ) edges. ActivityNode replaces the use of StateVertex and its children for activity modeling in UML 1.4

6-179 © 2005 No Magic, Inc. UML DIAGRAMS 6 Activity Diagram

Element Button Notation (hot key) Data Store A data store node is a central buffer node for non-transient (SHIFT+ information. A data store D) keeps all tokens that enter it, copying them when they are chosen to move downstream. Incoming tokens containing a particular object replace any tokens in the object node containing that object. Activity Parameter Node It is an object node for inputs and outputs to activities. Activity ( parameters are object nodes at the beginning and end of flows, to accept inputs to an activity and provide outputs from it. Object Flow Is an activity edge that can have objects or data passing along it. An (SHIFT+ object flow models the F) flow of values to or from object nodes.

Control Flow Is an edge that starts an activity node after the previous one is finished. (F) Objects and data cannot pass along a control flow edge. Send Signal Action Is an action that creates a signal instance from its inputs, and transmits it to (SHIFT+ the target object, where it S) may cause the firing of a state machine transition or the execution of an activity.

© 2005 No Magic, Inc 6-180 6 UML DIAGRAMS Activity Diagram

Element Button Notation (hot key) Accept Event Action Is an action that waits for the occurrence of an event meeting specified (E) conditions. Accept event actions handle event occurrences detected by the object owning the behavior. Initial Node An initial node is a starting point for executing an activity. An (T) initial node has no incoming edges. Flow Final Final node that terminates a flow. Destroys all tokens that (L) arrive at it. It has no effect on other flows in the activity.

Decision Decision is a control node that chooses between outgoing flows. (G) A decision node has one incoming edge and multiple outgoing activity edges. Merge A merge node is a control node that brings together multiple (G) alternate flows. It is not used to synchronize concurrent flows but to accept one among several alternate flows.

6-181 © 2005 No Magic, Inc. UML DIAGRAMS 6 Activity Diagram

Element Button Notation (hot key) Fork/Join Horizontal Helps to control parallel actions. (K) Fork/Join Vertical Helps to control parallel actions. (SHIFT+ K) Exception Handler An exception handler is an element that specifies a body to execute in case (P the specified exception occurs during the execution of the protected node. Structured Activity Node A structured activity node is an executable activity node that may have an expansion into subordinate nodes. A structured activity node represents a structured portion of the activity that is not shared with any other structured node, except for nesting. Input Pin An input pin is a pin that holds input values to be consumed by an action. (SHIFT They are object nodes +I) that receive values from other actions through object flows. Output Pin A pin that holds output values produced by an action. Output pins are (SHIFT object nodes and deliver +O) values to other actions through object flows.

© 2005 No Magic, Inc 6-182 6 UML DIAGRAMS Implementation Diagram

Element Button Notation (hot key) Swimlanes Swimlanes are used to organize responsibility for actions and subactivities (SHIFT+ according to class, V) dividing an activity diagram.

IMPLEMENTATION DIAGRAM Implementation diagrams help the developer describe the logical software structure inside a computer or across a large distributed system. Implementation diagrams show aspects of physical implementation, including the structure of components and the run-time deployment system. They come in two forms: 1 Component diagrams show the structure of components, including the classifiers that specify them and the artifacts that implement them; and 2 Deployment diagrams show the structure of the nodes on which the components are deployed. These diagrams can also be applied in a broader way to business modeling where the components represent business procedures and artifacts, and the deployment nodes represent the organization units and resources (human and otherwise) of the business.

Component diagram overview

A component diagram represents a physical structure of a code (as opposed to the class diagram, which portrays the logical structure) in terms of code components and their relationships within the implementation environment. A component can be a source code component, a binary component, or an executable component. A component contains information about the logical class or classes that it implements, thus creating a mapping from a logical view to a component view. Dependencies between the components are shown, making it easy to analyze how a change in one component affects the others. Components may also be shown with any of the interfaces that they expose. Components, as with almost any other model element, can be grouped into packages, much like classes or use cases. Component diagrams are used in the later phases of the software development, when there is a need to divide up classes among different components. When working with the CASE facilities, components are used for file-class mapping during code generation, reverse engineering, and round-trip engineering operations.

6-183 © 2005 No Magic, Inc. UML DIAGRAMS 6 Implementation Diagram

Deployment diagram overview

Deployment diagrams show the physical layout of the various hardware components (nodes) that compose a system, as well as the distribution of executable programs (software components) on this hardware. Deployment diagrams are crucial when dealing with distributed systems. You may show the actual computers and devices (nodes), along with the connections they have to each other, thus specifying system topology. Inside nodes, the executable components and objects are located in a way that shows where the software units are residing and on which nodes they are executed. You may also show dependencies between the components.

© 2005 No Magic, Inc 6-184 6 UML DIAGRAMS Implementation Diagram

Implementation Diagram elements

Element Button (hot Notation key) Component Component may be used to define the requirements for each (K) physical software element

Component Instance

(A)

Port

(SHIFT+ F11)

Node A Node is a physical object that represents a processing resource, (O) generally having at least a memory and often processing capability as well.

Execution Environment Element is used for indicating that node is execution environment.

Device A physical computational resource with processing capability upon which artifacts may be deployed for execution.

6-185 © 2005 No Magic, Inc. UML DIAGRAMS 6 Implementation Diagram

Element Button (hot Notation key) Node Instance

(T)

Execution Environment Instance Element is used for indicating that node is execution environment.

Device Instance

Package A group of classes and other model elements. (P)

Artifact An artifact represents a physical piece of information that is used (B) or produced by a software development process. Examples of Artifacts include models, source files, scripts, and binary executable files. An Artifact may constitute the implementation of a deployable component.

© 2005 No Magic, Inc 6-186 6 UML DIAGRAMS Implementation Diagram

Element Button (hot Notation key) Deployment Specification It indicates set of properties that define how a component should be deployed. Artifact Instance

Deployment Specification Instance

Interface Realization The classifier at the tail of the arrow implements the interface at the head of the arrow or uses that interface. Realization A Realization signifies that the client set of elements are an implementation of the supplier set, which serves as the specification. Interface All functionality implemented by a particular component. (F)

Instance An instance specifies existence of an entity in a modeled system and (SHIFT+O) completely or partially describes the entity. It has a unique name, state, and classifier as the type of identifier.

6-187 © 2005 No Magic, Inc. UML DIAGRAMS 6 Implementation Diagram

Element Button (hot Notation key) Dependency Shows an undirectional relationship. (D)

Usage A usage is a relationship in which one element requires another element (or set of elements) for its full implementation or operation. Delegation Connector A delegation connector is a connector that links the external contract of a component (as specified by its ports) to the internal realization of that behavior by the component’s parts. Assembly Connector An assembly connector is a connector between two components that defines that one component provides the services that another component requires.

© 2005 No Magic, Inc 6-188 6 UML DIAGRAMS Implementation Diagram

Element Button (hot Notation key) Deployment A deployment is the allocation of deployment target to an artifact or artifact instance.

Manifestation A manifestation is the concrete physical rendering of one or more model elements by an artifact.

Generalization

(G)

Link A relationship between specification element and implementation (L) element. Communication Path A communication path is an association between two DeploymentTargets, through which they are able to exchange signals and messages.

6-189 © 2005 No Magic, Inc. UML DIAGRAMS 6 Composite Structure Diagram

COMPOSITE STRUCTURE DIAGRAM Composite Structure is new UML 2.0 diagram. It allows decomposition and modeling internal structure of classifiers.

© 2005 No Magic, Inc 6-190 6 UML DIAGRAMS Composite Structure Diagram

Composite Structure Diagram elements

Element Button Notation (hot key) Classifier Is extended with the capability to own collaboration uses. These collaboration uses link a (C) collaboration with the classifier to give a description of the workings of the classifier. Part Is a property of a classifier that specifies a distinct interaction point between that classifier and its (P) environment or between the (behavior of the) classifier and its internal parts. Port A port may appear either on a contained part representing a port on that part, or on the boundary of (SHIFT the class diagram, represent-ing a +R) port on the represented classifier itself. Collaboration A collaboration describes a structure of collaborating elements (roles), each performing a (Q) specialized function, which collectively accomplish some desired functionality. Its primary purpose is to explain how a system works and, therefore, it typically only incorporates those aspects of reality that are deemed relevant to the explanation. Collaboration Use A collaboration use represents one particular use of a collaboration to explain the relationships between (U) the properties of a classifier. A collaboration use shows how the pattern described by a collaboration is applied in a given context, by binding specific entities from that context to the roles of the collaboration.

6-191 © 2005 No Magic, Inc. 6 UML DIAGRAMS Composite Structure Diagram

Element Button Notation (hot key) Connector Each connector may be attached to two or more connectable (Q) elements, each representing a set of instances. Each connector end is distinct in the sense that it plays a distinct role in the communication realized over a connector. Role Binding Is al relationship from parts to Collaboration Use (in diagram). (B)

6-192 © 2005 No Magic, Inc. 6 UML DIAGRAMS Composite Structure Diagram

6-193 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Classes

A class is drawn as a solid-outline rectangle with three compartments separated by horizontal lines. The top name compartment holds the class name and other general properties of the class (including stereotype); the middle list compartment holds a list of properties; the bottom list compartment holds a list of operations. The property and operation compartments are optional and you may suppress them. A class is the descriptor for a set of objects with similar structure, behavior, and relationships. The model is concerned with describing the intention of the class, that is, the rules that define it. The run-time execution provides its extension, that is, its instances. Classes are declared in class diagrams and used in most other diagrams. UML provides a graphical notation for declaring and using classes, as well as a textual notation for referencing classes within the descriptions of other model elements. A class represents a concept within the system being modeled. Classes have data structure, behavior, and relationships to other elements. The name of a class has scope within the package in which it is declared and the name must be unique (among class names) within its package.

W ORKING WITH CLASSES General information about working with shapes is offered in Chapter 5, "Diagrams Basics." All options associated with a class can be set in the Class Specification dialog box.

© 2005 No Magic, Inc. 7-194 7 MODEL ELEMENTS

Class Specification dialog box

Figure 1 -- Class Specification dialog box

Refer to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box Function General Base Classifiers Click “...” and assign existing class from model Set general in the Select Elements dialog box or create a information about new one. the class Realized Click “...” and assign existing interface from Interfaces model in the Select Elements dialog box or create a new one. Ports Name Name of the class port. Type Type, assigned to the port. Provided Provided classifier is displayed. Required Required classifier is displayed. Classifier Name of classifier, owning port. Create Creates a new port. Delete Removes existing port from class. Behaviours Name Name of the behavriours. Type Type, assigned to the behaviour. Create Choose item from the list - activity, interaction, state machine. Delete Removes behaviour from class.

7-195 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Tab name Box Function Inner Elements Name Model element name. Add another Type Model element type. element to a class Create The corresponding specification dialog box appears. Define the selected model element in the dialog box. Delete Removes the selected model element from the class.

To insert an inner element in the selected class

1 Double-click the selected class or choose Specification from the class shortcut menu. The Class Specification dialog box appears. 2 Click the Inner Elements tab and then click the Create button. Choose the element you wish to add from the list. 3 Click the selected element. 4 The corresponding Specification dialog box appears. Define the class, use case or interface and click OK.

To show an inner element on the diagram

1 Select a created inner element in the Browser. 2 From the element shortcut menu, choose Create Symbol.

To generate operations for setting or getting private data to the selected class From the class shortcut menu, choose Tools and then Create Setters/Getters. For a detailed description, see Section “Creating Setters / Getters” on page 10-385.

To control a list of operations and attributes that are visible on a diagram Choose Edit Compartment from class shortcut menu. The Compartment Edit dialog box appears.

A class can be defined as active (a border to the class shape is added). An active class specifies whether an object of the class maintains its own thread of control. A class is a generalizable element and can be defined as Abstract.

To define class as abstract and/or active

1 Double-click the selected class or choose Specification from the class shortcut menu. The Class Specification dialog box appears. 2 Select the Is Abstract, and/or Is Active check box in the General tab.

© 2005 No Magic, Inc 7-196 7 MODEL ELEMENTS

Interface

An interface is a specifier for the externally-visible operations of a class, component, or other classifier (including subsystems) without specification of internal structure. Each interface often specifies only a limited part of the behavior of an actual class. The set of interfaces realized by a classifier are its provided interfaces, which represent the obligations that instances of that classifier have to their clients. They describe the services that the instances of that classifier offer to their clients. To display provided interface, from class to interface draw interface realization relationship (attributes and operations of the interface should be suppressed).

Interfaces may also be used to specify required interfaces, which are specified by a usage dependency between the classifier and the corresponding interfaces. Required interfaces specify services that a classifier needs in order to perform its function and fulfill its own obligations to its clients. To display required interface, from class to interface draw usage relationship (attributes and operations of the interface should be suppressed)

Working with interface is similar to working with classes. For more information, see Section “Working with classes” on page 7-194. General information about working with shapes is offered in Chapter 5, "Diagrams Basics." All options associated with a interface can be set in the Interface Specification dialog box.

7-197 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Interface Specification dialog box

Figure 2 -- Interface Specification dialog box Refer to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box name Function Inner Elements Name Model element name. Add class, use Type Model element type. case, interface, enumeration, data Create Choose element from the list. The type, corresponding (class, use case, interface, programming enumeration, data type, programming language data language data type, or collaboration) type, specification dialog box appears. Define the collaboration, or selected model element in the dialog box. constraint to an interface Delete Remove the selected model element from an interface.

Attribute

An attribute is a named property of a class that describes a range of values that can be held by instances of that class.

To create a new attribute

• Double-click the selected class or choose Specification from the class shortcut menu. The Class Specification dialog box appears. Click the Attributes tab and

© 2005 No Magic, Inc 7-198 7 MODEL ELEMENTS

then click the Create button. The Property Specification dialog box appears. Define a new attribute and click OK.

• Choose the Insert New Attribute from the class shortcut menu. Type attribute name directly on the class shape.

• In the Browser tree, choose already created class. From the class item shortcut menu, choose New and then choose Property.

• Press CTRL+ALT+A shortcut key and type attribute name on Diagram pane.

• Select class shape and click the small orange Insert New Attribute smart manipulation button. Define an attribute in the Property Specification dialog box.

To open the Property Specification dialog

1 Open the Class Specification, Actor Specification, or Interface Specification dialog box. 2 In the Attributes tab, double-click the desired attribute in the tree, or click the Create button. • Draw association path and click on association end.

• Double-click the desired attribute directly on the diagram.

Property Specification dialog box

Figure 3 -- Property Specification dialog box Click the Expert in the Properties field for showing more properties of the attribute.

7-199 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Refer to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Options Function General Type Shows attribute’s type. It can be another project class or Set general primitive type such as int or double or other. Select type information from drop-down combo box or click “...” button and for the choose the type from the Select Element tree. attribute Default Value Type value for attribute or click “...” button and enter it in the Default Value dialog box. Type Modifier Additional information about the type. • & - one class has a reference to other model element. • * - one class has a pointer to other model element. • [] – one class has an array of other model elements. Navigable Indicates whether it is possible to navigate across the property. Multiplicity The multiplicity value of an attribute. Is Read Only If true, the property may only be read, and not written. Is Static This property scope means that values returned by the property have no duplicates. Aggregation When placed on a target end, specifies whether the target end is an aggregation with respect to the source end. Only one end can be an aggregation. • None. The end is not an aggregate. • Shared. The end is an aggregate; therefore, the other end is a part and must have the aggregation value of none. The part can be contained in other aggregates. • Composite. The end is a composite; therefore, the other end is a part and must have the aggregation value of none. The part is strongly owned by the composite and may not be part of any other composite. Is Derived Specifies whether the property is derived, i.e., whether its value or values can be computed from other information. Is Ordered If the multiplicity is greater than one, then the set of related elements can be ordered or unordered. • False - the elements form an unordered set. This is the default and need not be shown explicitly. • True - the elements of the set have an ordering, but duplicates are still prohibited. This generic specification includes all kinds of ordering. Is Unique If true , the collection of values may not contain duplicates.

To create an association class

1 Draw an association between two classes (for example A and B). 2 On the Diagram pane, place the third class (C).

© 2005 No Magic, Inc 7-200 7 MODEL ELEMENTS

3 Click the Association Class button and draw a dashed line from C to an association

If an attribute’s type is another model class, this attribute can be represented as an association with a role (attribute name) between owner class and class of attribute type Choose Create Roles from the class shortcut menu. A list of available attributes appears. Choose all or only one and an association relationship with a role is created. NOTE This command is visible only if one or more attribute types are other model classes.

To change an attribute name Attribute name must be unique in the class scope. 1 Click the attribute in the selected class on the diagram pane or in the Browser tree. 2 Type a new name. • Change an attribute name in the Attribute Specification dialog box.

To define the type of an attribute Attribute type can be other class, interface, or a primitive class, such as int or double.

• Choose the type of an attribute from the Type drop-down list box in the Attribute Specification dialog box.

• Type a colon “:” and the name of the type of an attribute just after the attribute name on the diagram pane. If you specify a nonexistent type of an attribute, a new class is created.

• Click the “...” button in the Type field and choose type from the Select Elements tree.

To add additional information about the type of an attribute

1 Open the Attribute Specification dialog box. 2 Click the Show Expert Properties button to enlarge a list of general available attribute properties. 3 Choose a sign in the Type Modifier drop-down list box: • & - one class has a reference to other model element.

7-201 © 2005 No Magic, Inc. MODEL ELEMENTS 7

• * - one class has a pointer to other model element.

• [] - one class has an array of other model elements.

To set an attribute visibility

Visibility Name Function Public ‘+’ an attribute can be accessed by any other element. Package ’~’ an attribute can be accessed by element from the same package. Protected ‘#’ an attribute can be accessed from the inside of the selected class and classes derived from that class. Private ‘-‘ an attribute can be accessed only from inside of that class.

• Type ‘+’, ‘~’, ‘-‘, or ‘#’ visibility marks just before an attribute name directly on a diagram. 1 Open the Attribute Specification dialog box. 2 From the Visibility drop-down list box, choose the desired item (public, package, protected, and private.) NOTE Attribute visibility is shown at the attribute signature.

To set an attribute scope

1 Open the Attribute Specification dialog box. 2 Click the Show Expert Properties button to enlarge a list of general available attribute properties. 3 Select Is Static check box.

To set an attribute multiplicity

1 Open the Attribute Specification dialog box (see above). 2 Click the Show Expert Properties button to enlarge a list of general available attribute properties. 3 Choose or set a multiplicity value in the Multiplicity drop-down box.

To set attribute changeability The attribute changeability controls the access by operations on the class on the opposite end. Name Function Is Read Only When false - no restrictions on modification. When true - the value may not be altered after the object is instantiated and its values initialized. No additional values can be added to a set.

1 Open the Attribute Specification dialog box (see above).

© 2005 No Magic, Inc 7-202 7 MODEL ELEMENTS

2 Click the Show Expert Properties button to enlarge a list of general available attribute properties. 3 Select/clear Is Read Only check box.

Operation

Entries in the operation compartment are strings that show operations defined on classes, as well as operations supplied by classes. An operation is a service that an instance of the class can be requested to perform. It has a name and a list of arguments. Usually class attributes are accessed through operations. Operations are used to perform specific actions, such as system calls, utility functions, and queries. The operation signature provides all information needed to use that operation.

To create a new operation

• Double-click the selected class or choose Specification from the class shortcut menu. The Class Specification dialog box appears. Click the Operations tab and then click the Create button. The Operation Specification dialog box appears. Define a new operation and click OK.

• Choose the Insert New Operation from the class shortcut menu. Type operation name directly on the class shape.

• In the Browser tree, choose already created class. From the class item shortcut menu, choose New and then choose Operation.

• Select class shape, press CTRL+ALT+O shortcut key and type operation name on Diagram pane.

• Select class shape and click the small green Insert New Operation smart manipulation button.

Define an operation in the Operation Specification dialog box.

To open the Operation Specification dialog box

1 Double-click the class /actor or choose Specification from the class’s/actor’s shortcut menu. The Class Specification / Actor Specification dialog box appears. 2 Click the Operations tab. Double-click the desired operation in the tree, or click the Create button. The Operation Specification dialog box appears. • Double-click an operation on Diagram pane or in Browser.

7-203 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Operation Specification dialog box

Figure 4 -- Operation Specification dialog box Refer to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box Function General Owner Shows a class, which contains the current operation. Set general You may not change the value of the Owner field. It is information for automatically defined when you create an operation. the operation Type Shows operation’s type. It can be another project class or primitive type such as int or double. Choose the type from the list or create a new one by clicking “...” button. Method Click the “...” button to open the Select Elements dialog box. Activity, Interaction or State Machine elements can be assigned from model. Query If selected, the operation is set as query. An operation that returns a value but does not alter the state of the system; an operation without side effects. Parameters Name Shows the parameter’s name. A parameter is an Type Shows the parameter’s type. It can be a classifier or a unbound variable data type. that can be changed, passed, Default Value An expression whose evaluation yields a value to be or returned. used when no argument (operation) is supplied for the parameter.

© 2005 No Magic, Inc 7-204 7 MODEL ELEMENTS

Tab name Box Function Direction Specifies what kind of a parameter is required: • return - return parameter. • in - an input parameter (may not be modified). • out - an output parameter (can be modified to communicate information to the caller). • inOut - an input parameter that can be modified. Up Move up the list Down Move down the list. Create The Parameter Specification dialog box appears. Delete Removes the parameter.

To change an operation name

1 Click the operation in the selected class on the diagram pane or in the Browser tree. 2 Type a new name. • Change an operation name in the Operation Specification dialog box.

To define the type of an operation

• In the Operation Specification dialog box, the Type drop-down list box, choose the type of an operation .

• Type a colon “:” and the name of the type of an operation just after the operation name on the diagram pane. If you specify a nonexistent type of an operation, a new class is created.

To edit / add operation parameter

1 Open the Operation Specification dialog box. 2 Click the Parameters tab. 3 Double click on the existing parameter name in the expanded tree or click the Create button. The Parameter Specification dialog box appears. • Type a parameter text (in parenthesis) directly on a diagram.

• Select an operation in the Browser tree, choose New from its shortcut menu and choose Parameter. The Parameter Specification dialog box appears.

Parameter Specification dialog box The Parameter Specification dialog box defines operation’s argument.

To open the Parameter Specification dialog box

1 Open the Operation Specification dialog box.

7-205 © 2005 No Magic, Inc. MODEL ELEMENTS 7

2 Click the Parameters tab, expand tree, and then double-click the desired parameter. Or click the Create button.

Figure 5 -- Parameter Specification dialog box Click the Show Expert Properties button for showing more properties of parameter. Refer to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box Function General Owner The name of the operation, which contains the Set general parameter. information about Type Shows the parameter’s type. It can be a classifier or a the parameter data type. Choose a type from the list or create a new one by clicking the “...” button. Type Modifier Additional information about the type. • & - a parameter is a reference to other model element. • * - a parameter is a pointer to other model element. • [] - a parameter is a an array of other model elements. Default Value An expression whose evaluation yields a value to be used when no argument (operation) is supplied for the parameter. Direction Select the direction kind: • return - return parameter. • in - an input parameter (may not be modified). • out - an output parameter (can be modified to communicate information to the caller). • InOut - an input parameter that can be modified.

© 2005 No Magic, Inc 7-206 7 MODEL ELEMENTS

To add additional information about the return type of an operation

1 Open the Operation Specification dialog box. 2 Click the Show Expert Properties button. More properties for operation appears. 3 Choose a sign from the Type Modifier drop-down list box: • & - one class has a reference to other model element.

• * - one class has a pointer to other model element.

• [] - one class has an array of other model elements. Operation can be defined as: Name Function Is Abstract The operation does not have an implementation, and one must be supplied by a descendant. Is Static This operation scope means that values returned by the parameter have no duplicates. Is Query The operation does not change the state of the system

To define an operation as abstract, static, or query

1 Open the Operation Specification dialog box. 2 Choose the Expert mode from the Properties field. More properties for operation appears. 3 Select the Is Abstract, Is Static, and/or Is Query check box(es) in the General tab.

To set an operation visibility

Visibility name Function Public ‘+’ Operation can be accessed by any other object from outside. Package ’~’ Operation can be accessed by element from the same package. Private ‘-‘ Operation can be accessed only from that class. Protected ‘#’ Operation can be accessed from inside that class and the classes derived from that class.

1 Open the Operation Specification dialog box. 2 From the Visibility drop-down list box, choose Public, Package, Private, or Protected. NOTE Operation visibility is shown in the operation signature.

7-207 © 2005 No Magic, Inc. MODEL ELEMENTS 7

To set an operation’s Concurrency: sequential, guarded or concurrent

Name Function Sequential Callers must coordinate so that only one call to an Instance (on any sequential Operation) can be outstanding at once. If simultaneous calls occur, then the semantics and integrity of the system may not be guaranteed. Guarded Multiple calls from concurrent threads may occur simultaneously to one Instance (on any guarded Operation), but only one is allowed to commence. The others are blocked until the performance of the first Operation is complete. It is the responsibility of the system designer to ensure that deadlocks do not occur due to simultaneous blocks. Guarded Operations must perform correctly (or block themselves) in the case of a simultaneous sequential Operation or guarded semantics may not be claimed. Concurrent Multiple calls from concurrent threads may occur simultaneously to one Instance (on any concurrent Operation). All of them may proceed concurrently with correct semantics. Concurrent Operations must perform correctly in the case of a simultaneous sequential or guarded Operation or concurrent semantics may not be claimed.

1 Open the Operation Specification dialog box. 2 Choose the Expert mode from the Properties field. More properties for operation appears. 3 Choose the concurrency type in the Concurrency drop-down list box.

T EMPLATE / PARAMETERIZED CLASS Templateable Element may contain bindings to templates that describe how the templateable element is constructed by replacing the formal template parameters with actual parameters. Classifier TemplateParameter is a template parameter where the parametered element is a Classifier in its capacity of being a kind of Parameterable Element.

To define a parameterized class

1 Double-click the class shape or choose Specification from the class shape shortcut menu. The Class Specification dialog box appears. Click the Template Parameters tab. 2 To add or edit a parameterized class, click the Create button. The Select Template Parameter Type dialog box appears. Choose the type from the model tree and click OK. 3 To remove the selected parameterized class, click the Delete button.

To open the Classifier Template Parameter Specification dialog box In the element Specification dialog box tree, expand the Template Parameters tab and double click the selected template.

© 2005 No Magic, Inc 7-208 7 MODEL ELEMENTS

Classifier Template Parameter Specification dialog box

Figure 6 -- Classidier Template Parameter Specification dialog box Choose the Expert mode from the Properties field for showing more properties of template parameter. Refer to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section Tab name Box name Function General Owner The name of the element, which contains the template parameter. Default Value Type the default value for the template parameter. ‘…’ The Select Model Element dialog box appears. Select a classifier you wish to assign as a default value to the template parameter.

Port

A port is a property of a classifier that specifies a distinct interaction point between that classifier and its environment or between the (behavior of the) classifier and its internal parts. Ports are connected to properties of the classifier by connectors through which requests can be made to invoke the behavioral features of a classifier. A Port may specify the services a classifier provides (offers) to its environment as well as the services that a classifier expects (requires) of its environment. A port has the ability to specify that any requests arriving at this port are handled. Class model element and Component model elements may have any number of Ports. Define a port in the Port Specification dialog box.

7-209 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Port Specification dialog box

Figure 7 -- Port Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box Function General Owner The name of the class or component, which contains Set general the port. information for Is Behavior the port Specifies whether requests arriving at this port are sent to the classifier behavior of this classifier. Such ports are referred to as behavior port. Any invocation of a behavioral feature targeted at a behavior port will be handled by the instance of the owning classifier itself, rather than by any instances that this classifier may contain. Is Service If Is Service check box is true, it indicates that this port is used to provide the published functionality of a classifier. If Is Service check box is false, this port is used to implement the classifier but is not part of the essential externally. Provided/Rquired Name Shows the name of the provided/required interface. Interfaces Type Shows what type of interface specifies port. Add Drop down menu appears. Choose Provided or Required item and select iterface in the opened Select Interface dialog box. Remove Removes item from the Provided/Required Interfaces list.

© 2005 No Magic, Inc 7-210 7 MODEL ELEMENTS

Data types

A data type is a type whose values have no identity; that is, they are pure values. Data type is a classifier and inherits the general features of the classifier: visibility, generalizable element properties, and operations. MagicDraw provides the following predefined data types: boolean, byte, char, date, double, float, int, Integer, long, short, void, String. You may also create Enumeration or Primitive data types.

To create a new Data Type, including Enumeration or Primitive

• From the Browser: Choose New from the class or New Element from the package, subsystem, or model shortcut menu, and then choose Data Type, Enumeration, or Primitive.

• In the Class, Package, Subsystem, and Model Specification dialog boxes, Inner Elements tab, click Create and select a data type for creation. NOTE: You may create an enumeration by clicking the Enumeration button from the class diagram toolbar:

To create symbol of the created data type From the created data type shortcut menu in the Browser, choose Create Symbol command.

7-211 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Data Type or Primitive Specification dialog box

Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box Function General Owner Shows element, which contains data package. Set general Default data packages contains UML Standard information Profile. about the data type Inner Elements Name Displays constraint name. Add constraint Type Shows item type, in this case Constraint. Click button to data t ype. to open the Constraint Specification dialog box. Create The Constraint Specification dialog box opens. Define the constraint. Delete Removes the selected constraint from inner elements list.

E NUMERATION Enumeration defines a kind of data type whose range is a list of predefined values, called enumeration literals. An Enumeration may have operations, but they must be pure functions (this is the rule for all data type elements). Define an enumerations in the Enumeration Specification dialog box.

© 2005 No Magic, Inc 7-212 7 MODEL ELEMENTS

Enumeration Specification dialog box

Figure 8 -- Enumeration Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box Function General Owner Shows name of element, which contains Set general enumeration. information about the enumeration Enumeration Name The name of the enumeration literal. Literals An enumeration Enumeration Owner of enumeration literal. Click button to open literal defines an the Enumeration Literal Specification dialog box and element of the edit information about enumeration literal. run-time extension Create The Enumeration Literal Specification dialog box of an enumeration appears. Define a new enumeration literal. data type. Delete Remove the selected enumeration literal from the enumeration. Inner Elements Name Displays constraint name. Add constraint to Type Shows item type, in this case Constraint. Click button enumeration to open the Constraint Specification dialog box. Create The Constraint Specification dialog box opens. Define the constraint. Delete Removes the selected constraint from inner elements list.

To add an enumeration literal An enumeration literal defines an element of the run-time extension of an Enumeration data type. It has no relevant substructure, that is, it is atomic.

7-213 © 2005 No Magic, Inc. MODEL ELEMENTS 7

1 Open the Enumeration Specification dialog box. 2 In the Enumeration Literals tab, click Create button. 3 The Enumeration Literal Specification dialog box appears. Define an enumeration literal. Click Back to return to Enumeration Specification dialog box. • Choose Insert New Enumeration Literal command from the Enumeration shortcut menu.

To suppress enumeration literals

1 From the enumeration shortcut menu, choose Presentation Options. 2 Select the Suppress Enumeration Literals check box. • Use smart manipulation button with minus sign on the diagram pane, enumeration symbol.

To open the Enumeration Literal Specification dialog box

1 Open the Enumeration Specification dialog box. 2 In the Enumeration Literals tab expand tree and double-click the desired literal, or click the Edit, or Create button.

P RIMITIVE A primitive defines a predefined data type without possessing any relevant UML substructure; that is, it has no UML parts. A primitive data type may have an algebra as well as operations defined outside of UML (for example, mathematically). Primitive data types used in UML include Integer, Unlimited Integer, and String.

Design Patterns

In MagicDraw, you may create and edit design patterns for the selected class. The detailed description of templates is in the Design Patterns of Reusable Object-Oriented Software.

To create the design pattern for the selected class

1 From the class shortcut menu, choose Tools, and then choose Apply Pattern. The Pattern Wizard dialog box appears. 2 Select the design pattern you want to apply and choose the desired options. Click OK. • Select class and choose Apply Pattern from the Tools menu. For a detailed description of this dialog box, see Section “Pattern Wizard” on page 10-378.

© 2005 No Magic, Inc 7-214 7 MODEL ELEMENTS

Class presentation options

To organize class data on the class shape

• Choose Presentation Options from the class shortcut menu. The following choices are available in the Presentation Options submenu.

• Class presentation options you may also define in the Project Options dialog box. For a detailed description of this dialog box, see Section “Project Options ” on page 4-49.

Figure 9 -- Presentation Options submenu Command Function (when selected) Show Operations Signature Shows operation signature (arguments, return value and etc). Show Full Classifier Type Shows the full track of the type of an attribute from the root package.

7-215 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Command Function (when selected) Show Initial Attribute Value Shows Initial attribute value. Show Attributes Visibility Shows attribute visibility (public, package, private, or protected). Show Operations Visibility Shows operation visibility (public, package, private, or protected). Suppress Attributes Attributes compartment is suppressed. Suppress Operations Operations compartment is suppressed. Show Only Public Members Shows only public attributes and operations. Show all Members The default settings are restored and shows all attributes and operations. Attributes Sort Mode Choose the sorting parameter: • By Name • Sort attributes by name. • By Stereotype • Sort attributes by stereotype • By Visibility • Sort attributes by visibility (public, package, private, or • No Sorting protected) • No sorting is executed. Operations Sort Mode Choose the sorting parameter: • By Name • Sort operations by name. • By Stereotypes • Sort operations by stereotype. • By Visibility • Sort operations by visibility (public, package, private, • No Sorting or protected) • No sorting is executed. Show More Sign For Additional information sign '…' in the class attributes Attributes list, when a portion of attributes are omitted by editing a class compartment. Show More Sign For Additional information sign '…' in the class operations Operations list, when a portion of operations are omitted by editing a class compartment. Show Stereotypes Shows stereotypes on a class. Show Constraints Shows constraints on a class. Show Tagged Values Shows tagged values on a class. Show Owner Shows the owner (package, subsystem, or model) name on a class.

Packages

A package groups together classes and other model elements. All types of UML model elements can be organized into packages. Each diagram must be owned by one package and packages themselves can be nested within other packages. Special kinds of packages are subsystems and models.

© 2005 No Magic, Inc 7-216 7 MODEL ELEMENTS

Packages may have dependency, generalization, realize, containment, and association relationships. All relationships are usually derived from the relationships between the classes that are placed inside those packages.

W ORKING WITH PACKAGES For more general information about working with symbols, see Chapter 5, "Diagrams Basics." Define the selected package in the Package Specification dialog box.

Package Specification dialog box

Figure 10 -- Package Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section.

To add inner elements to the selected package

1 Open the Package Specification dialog box. 2 Click the Inner Elements tab. 3 Click the Create button, and then click the element you wish to add. 4 After selecting element, the corresponding element Specification dialog box opens. If you select a diagram, the Diagram Specification dialog box opens. 5 Define information and click Back to return to Package Specification.

To change package header (name, stereotypes, tagged values, and constraints) position

• From the package shortcut menu, choose Header Position and then choose Top or In Tab.

• Choose Symbol(s) Properties from the package shortcut menu, and choose Header Position Top or In Tab in the Properties dialog box.

7-217 © 2005 No Magic, Inc. MODEL ELEMENTS 7

To show the list of elements assigned to a package on the package shape Choose Show Elements List from the package shortcut menu.

Profile

A Profile is a kind of Package that extends a reference metamodel. The primary extension construct is the Stereotype, which are defined as part of Profiles. A profile introduces several constraints, or restrictions, on ordinary metamodeling through the use of the metaclasses defined in this package. A profile is a restricted form of a metamodel that must always be related to a reference metamodel, such as UML, as described below. A profile cannot be used without its reference metamodel, and defines a limited capability to extend metaclasses of the reference metamodel. The extensions are defined as stereotypes that apply to existing metaclasses. A profile is defined as a package – it has package properties – in the Profile Specification dialog box. For a detailed description of packages, see Section “Packages” on page 7-216.

Profile Specification dialog box

Figure 11 -- Subsystem Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section.

© 2005 No Magic, Inc 7-218 7 MODEL ELEMENTS

Model

Model contains a (hierarchical) set of elements that together describe the physical system being modeled. A Model may also contain a set of elements that represents the environment of the system, typically Actors, together with their interrelationships, such as Associations and Dependencies. A model is presented as a package with a small triangle in the upper right corner of the large rectangle. The triangle can be shown in the tab. A model is defined as a package – it has package properties - in the Model Specification dialog box. For a detailed description of packages, see Section “Packages” on page 7-216.

Model Specification dialog box

Figure 12 -- Model Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section..

Collaboration

A collaboration is represented as a kind of classifier and defines a set of cooperating entities to be played by instances (its roles), as well as a set of connectors that define communication paths between the participating instances. The cooperating entities are the properties of the collaboration.

7-219 © 2005 No Magic, Inc. MODEL ELEMENTS 7

A collaboration specifies a view (or projection) of a set of cooperating classifiers. It describes the required links between instances that play the roles of the collaboration, as well as the features required of the classifiers that specify the participating instances. Several collaborations may describe different projections of the same set of classifiers. Define a collaboration in the Collaboration Specification dialog box.

Collaboration Specification dialog box

Figure 13 -- Collaboration Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box Function Behaviors Name Name of adde behavior. Any behavior Type Type of behavior attached to the collaboration type Create Choose what kind of behavior you want to create - applies to the set Activity, Interation, or State Machine. The of roles and coresponding Specification dialog box opens. connectors bound within a given collaboration use. Delete Remove selected behavior from collaboration. Inner Elements Name Name of inner collaboration element. Type Type of inner collaboration element. Create Choose element from a list. Coresponding Specification dialog box opens. Define element and click Back to return to Collaboration Specification. Delete Remove inner element from collaboration.

© 2005 No Magic, Inc 7-220 7 MODEL ELEMENTS

To assign a new behavior to the collaboration

• In the Collaboration Specification dialog box, Behaviours tab, click the Create button. Define a behaviour in the opened Specification dialog box.

• From the collaboration shortcut menu in the Browser, choose New, and then choose Activity, Interaction, or State Machine. Type a name of the behavrior and modify it in the opened Specification dialog box. NOTE You may edit the assigned classifier role in the Collaboration Specification dialog box, Behaviours tab.

Generalization

Generalization is the relationship from the child element (the more specific element, such as a subclass) to the parent (the more general element, such as a superclass) that is fully consistent with the first element and that provides additional information. Generalization is used between elements of the same kind, such as classes, packages, use cases, but never for instances, such as an object. MagicDraw is not yet adapted to draw generalization between associations. A generalization is shown as a solid-line path from the child element (the more specific element, such as a subclass) to the parent element (the more general element, such as a superclass), with a large hollow triangle at the end of the path where it meets the more general element. Generalization lines can be combined into trees. For more general information about working with symbols, see Chapter 5, "Diagrams Basics." Define the generalization in the Generalization Specification dialog box.

7-221 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Generalization Specification dialog box

Figure 14 -- Generalization Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box Function General Target The name of the parent element. Set general Source The name of the child element. information about the generalization relationship

To group generalization paths into a tree

1 Draw a generalization path between the child element and the parent element. 2 Click the generalization path button on the diagram toolbar. 3 Click the other child shape. 4 Drag the path to the other generalization path and drop it there. • Choose Make Sub Tree from the parent class shortcut menu.

• Choose Make Sub Tree from the parent package shortcut menu.

To ungroup a generalization tree

1 Click the generalization tree’s hollow triangle pointing to a parent element. 2 From the tree shortcut menu, choose Ungroup Tree.

To separate the generalization path from the generalization tree

• From the generalization path shortcut menu, choose Remove From Tree.

• Drag one generalization path to another class.

© 2005 No Magic, Inc 7-222 7 MODEL ELEMENTS

NOTE This command is available if the same tree contains the selected generalization path.

G ENERALIZABLE ELEMENTS A generalizable element is a model element that may participate in a generalization relationship. Name Function Is Abstract Specifies whether the generalizable element may or may not have a direct instance. True indicates that an instance of the generalizable element must be an instance of a child of the generalizable element. False indicates that there may an instance of the generalizable element that is not an instance of a child. An abstract generalizable element is not instantiable since it does not contain all necessary information. Is Leaf Specifies whether the generalizable element is without descendents. True indicates that it may not have descendents False indicates that it may have descendents (whether or not it actually has any descendents at the moment.)

To define a generalizable model element (class, package, use case, etc.) as abstract or leaf

1 Open the corresponding Specification dialog box. 2 Select the Is Abstract or Is Leaf check box(es) in the General tab.

Association

An association in class diagrams represents the semantic relationship between two or more classifiers, which specifies connections between their instances. An association relationship is the most general of all relationships and the most semantically weak. An association in use case diagrams represents the participation of an actor in a use case, i.e., when instances of the actor and instances of the use case communicate with each other. This is the only relationship between actors and use cases. Sometimes an association relationship is called communication association. An association is drawn as a solid path connecting two classifier symbols. For general information about working with symbols, see Chapter 5, "Diagrams Basics." Specify an association in the Association Specification dialog box.

7-223 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Association Specification dialog box

Figure 15 -- Association Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box Function General Association End A Set general Name The name of the class A. Click the ‘…’ button, information about to open the Name dialog box. the association Navigable If selected, a navigable owned end of the association indicates that the association is navigable from the opposite ends, otherwise the association is not navigable from the opposite ends. Multiplicity The multiplicity value of an association end A. Default Value Click the ‘...’ button to open the Select Elements dialog box and choose value for the model elements tree. Association End B

© 2005 No Magic, Inc 7-224 7 MODEL ELEMENTS

Tab name Box Function Name The name of the association end B. Click the ‘…’ button, to open the Name dialog box. Navigable If selected, a navigable owned end of the association indicates that the association is navigable from the opposite ends, otherwise the association is not navigable from the opposite ends. Multiplicity The multiplicity value of an association end B. Default Value Click the ‘...’ button to open the Select Elements dialog box and choose value for the model elements tree.

To show the direction arrow near the association name From the association shortcut menu, select the Show Direction Arrow check box.

To draw an association class In the class diagram, you may add attributes to an association using an association class. The association class is a simple class that has a dashed line connection to the association. 1 Draw two classes and the association path between them. 2 Draw the third class. 3 Click the Association Class button on the diagram toolbar. 4 Click the third class shape (path source). 5 Drag the path to the association path (path destination) and drop it there. 6 If you need to model a relationship among a number of classes, N-ary association is used.

To draw N-ary association class N-ary association is drawn as a big diamond with all the associations attached to its points. Every involved class may have role name and multiplicity. 1 Draw three classes on the Diagram pane. 2 Draw N-ary association connector icon. 3 Connect all classes and N-ary association connector icon using association path.

A SSOCIATION END Associations ends are represented by properties, each of which is connected to the type of the end. When a property is an association end, the value or values are related to the instance or instances at the other end(s) of the association. An association end is the connection between the line depicting an association and the icon (often a box) depicting the connected classifier.

7-225 © 2005 No Magic, Inc. MODEL ELEMENTS 7

To open the Association End Specification dialog box

1 Double-click the association path. The Association Specification dialog box appears. 2 Select the Association Ends group in the specification tree and expand it by clicking the plus sign. 3 Double click the selected Association End. The Property Specification dialog box opens. • From the association end shortcut menu, choose Specification. An association end is defined as a property – it has attribute properties in the Property Specification dialog box. For a detailed description of attributes, see Section “Attribute” on page 7-198.

Association End Specification dialog box

Figure 16 -- Association End Specification dialog box Click the Expert in the Properties field for showing more properties of the association end. Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box Function General Type Shows association end type - name of the class, to Set general which the association end is related. information Default Value Click the ‘...’ button to open the Select Elements about the dialog box and choose value for the model elements association end tree. Owner Shows class name, containing association end as a property.

© 2005 No Magic, Inc 7-226 7 MODEL ELEMENTS

Tab name Box Function Type Modifier Additional information about the type. • & - one class has a reference to other model element. • * - one class has a pointer to other model element. • [] – one class has an array of other model elements. Navigable If selected, a navigable owned end of the association indicates that the association is navigable from the opposite ends, otherwise the association is not navigable from the opposite ends. Multiplicity The multiplicity value of an association end A. Is Read Only If true, the association end may only be read, and not written. Is Static This property scope means that values returned by the property have no duplicates. Aggregation When placed on a target end, specifies whether the target end is an aggregation with respect to the source end. Only one end can be an aggregation. • None. The end is not an aggregate. • Shared. The end is an aggregate; therefore, the other end is a part and must have the aggregation value of none. The part can be contained in other aggregates. • Composite. The end is a composite; therefore, the other end is a part and must have the aggregation value of none. The part is strongly owned by the composite and may not be part of any other composite. Is Derived Specifies whether the Property is derived, i.e., whether its value or values can be computed from other information. Is Ordered If the multiplicity is greater than one, then the set of related elements can be ordered or unordered. • False - the elements form an unordered set. This is the default and need not be shown explicitly. • True - the elements of the set have an ordering, but duplicates are still prohibited. This generic specification includes all kinds of ordering. Is Unique If true , the collection of values may not contain duplicates. Qualifiers Name The name of the assigned attribute of association Define qualifiers end. of the Type The type of the assigned attribute of association end. association end. A qualifier is an Poperty Shows owner of the qualifier - to which property it attribute of an belongs. association end. Default value Initial value of an attribute of an association end. Up Move item in upper possition in the list Down Move item to down possition in the list.

7-227 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Tab name Box Function Create The Property Specification dialog box appears. Delete Remove the qualifier.

To define the association end name

1 Open the Property Specification dialog box. 2 Type association end name in the Name box. • Choose Role A of or Role B of from the association shortcut menu, and then choose the Edit Name subcommand, then type or edit name directly on the Diagram pane.

To make a special case of an association path (aggregation/composition)

1 Open the Prperty Specification dialog box. 2 Click the desired option button for an aggregation kind (None, Shared or Composite). • From the association shortcut menu, choose Role A of (class name) or Role B of (class name), and the choose None, Shared, or Composite.

• Click the Composition or Aggregation buttons and draw appropriated path on a diagram.

• Right click an association path end and choose Shared or Composite command from the shortcut menu.

To change an association’s navigability An association’s navigability indicates whether it is possible to traverse an association within expression of a classifier to obtain the object or set of objects associated with the instances. Navigability is shown as an arrow that can be attached to the end of the path to indicate that navigation is supported toward the classifier attached to the arrow. 1 Open the Association End Specification dialog box. 2 Select/clear the Navigable check box. • Choose Role A of (class name) or Role B of (class name) from the association shortcut menu, and then select/clear the Navigable check box. NOTE By default, an association is navigable in both sides and its navigability is not visible.

To define the association end’s visibility A role indicates a role played by the class in terms of an association. The role name is placed at the association end, near the class playing that role. The role name at the implementation level maps into the reference name to the opposite class. Roles may have visibility (public, package, protected, and private). 1 Open the Prperty Specification dialog box.

© 2005 No Magic, Inc 7-228 7 MODEL ELEMENTS

2 From the Visibility drop-down list box, choose public, package, protected, or private.

To place multiplicity values in the association path ends The association end multiplicity describes how many entities are participating at the each association end: 0 – zero and only zero. 1 – one and only one. 0..1 – zero or one. 0..* – from zero to any positive integer. 1..* – from one to any positive integer. * – any positive integer.

1 Open the Property Specification dialog box. 2 Type or choose from the list multiplicity value (1, *, 0..*, etc.) in the Multiplicity box. • Open the Association Specification dialog box and from the Multiplicity drop- down list box, choose or type the multiplicity value for the desired association end.

• From the association shortcut menu, choose Role A of (class name) or Role B of (class name), and choose the multiplicity value (1, *, 0..*, etc.)

To add, edit, or remove a qualifier to/from an association end A qualifier is an attribute or list of attributes whose values serve to partition the set of instances associated with an instance across an association. The qualifiers are attributes of the association. A qualifier is shown as a small rectangle attached to the end of an association path between the final path segment and the symbol of the classifier that it connects to. The qualifier rectangle is part of the association path, not part of the classifier. The qualifier rectangle drags with the path segments. The qualifier is attached to the source end of the association. 1 Open the Association End Specification dialog box, the Qualifiers group. 2 Click the Create button. The Property Specification dialog box appears. Define a qualifier. 3 To remove a qualifier, click the Delete button.

Realization

Realization is a specialized abstraction relationship between two sets of model elements, one representing a specification (the supplier) and the other represents an implementation

7-229 © 2005 No Magic, Inc. MODEL ELEMENTS 7

of the latter (the client). Realization can be used to model stepwise refinement, optimizations, transformations, templates, model synthesis, framework composition, etc. Realization relationships are drawn as a dashed line with a solid triangular arrowhead (a “dashed generalization symbol”). The client (the one at the tail of the arrow) supports at least all of the operations defined in the supplier (the one at the arrowhead), but without the necessity of supporting the data structure of the supplier (attributes and associations). For more general information about working with symbols, see Chapter 5, "Diagrams Basics." Realization paths can be grouped in the tree. This feature makes a diagram appear both more structural and understandable. NOTE In MagicDraw, you will find three kinds of a realization relationship:

• Interface Realization. A dashed line with a solid triangular arrowhead. An Interface Realization is a specialized Realization relationship between a Classifier and an Interface. This relationship signifies that the realizing classifier conforms to the contract specified by the Interface.

• Realization. A relationship that is placed between a classifier and an interface that is shown as a solid line.

• Substitution. A dashed line with an arrowhead and <> stereotype. A substitution is a relationship between two classifiers signifies that the substituting classifier complies with the contract specified by the contract classifier. This implies that instances of the substituting classifier are runtime substitutable where instances of the contract classifier are expected.

To create a realization tree if a class or an interface already has a number of realization paths attached to it Choose the Make Sub Tree command from the class or the interface shortcut menu.

To remove a realization from the tree or to ungroup a tree

• Select the realization and choose the Remove From Tree command from the path shortcut menu.

• Select tree head and choose the Ungroup Tree command from the tree shortcut menu.

To specify the selected realization path in the Specification dialog box

• Double-click the path.

• Choose Specification from the path shortcut menu.

• Select the path and press ENTER.

© 2005 No Magic, Inc 7-230 7 MODEL ELEMENTS

Realization and its kinds Specification dialog boxes Realization, interface realization and substitution relationships are defined in the dialog box of the same structure. Differs from one another only by corresponding Specification name..

Figure 17 -- Realization Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box Function General Source The name of the child element. Set general Target The name of the parent element. information about the realization Mapping Type value, or click the ‘...’ button and edit value in relationship the Edit Mapping dialog box. Note: Available in the Substitution Specification dialog box only.

Dependency

A dependency is a relationship that signifies that a single or a set of model elements requires other model elements for their specification or implementation. This means that the complete semantics of the depending elements is either semantically or structurally dependent on the definition of the supplier element(s). A dependency is shown as a dashed arrow between classes or packages. The model element at the tail of the arrow (the client element) depends on the model element at the arrowhead (the supplier element). The arrow can be labeled with an optional stereotype and an optional individual name. NOTE You may also draw a dependency between a class and other class elements, such as attributes and operations.

7-231 © 2005 No Magic, Inc. MODEL ELEMENTS 7

For more general information about working with the symbols, see Chapter 5, "Diagrams Basics."

Dependency and its kinds Specification dialog boxes Dependency, abstraction, and usage relationships defined in the dialog box of the same structure. Differs from one another only by corresponding Specification name.

Figure 18 -- Dependency Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box name Function General Source Shows the name of the dependency’s supplier element. Target Shows the name of the dependency’s client element.

T EMPLATE BINDING DEPENDENCY A template binding represents a relationship between a templateable element and a template. A template binding specifies the substitutions of actual parameters for the formal parameters of the template. Define a binding dependency in the Template Binding Specification dialog box.

© 2005 No Magic, Inc 7-232 7 MODEL ELEMENTS

Template Binding Specification dialog box

Figure 19 -- Binding Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box name Function General Source Shows the name of the dependency’s supplier element. Target Shows the name of the dependency’s client element. Template Name The name of the template parameter. Parameter Substitutions Type The type of the template parameter. The parameter Actual Reference to a formal template parameter of the substitutions target template signature. owned by this template binding. Create The Select Template Parameter dialog box opens. Select the item from the list and click OK. Delete Remobe the template parameter substitution.

A BSTRACTION An abstraction is a relationship that relates two elements or sets of elements that represent the same concept at different levels of abstraction or from different viewpoints. In the metamodel, an abstraction is a dependency in which there is a mapping between the supplier and the client. Define an abstraction relationship in the Abstraction Specification dialog box. For a detailed description of this dialog box, see Section “Dependency and its kinds Specification dialog boxes” on page 7-232.

U SAGE A usage is a relationship in which one element requires another element (or set of elements) for its full implementation or operation. In the metamodel, a usage is a dependency in which the client requires the presence of the supplier.

7-233 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Define a usage relationship in the Usage Specification dialog box. For a detailed description of this dialog box, see Section “Dependency and its kinds Specification dialog boxes” on page 7-232.

P ACKAGE MERGE A package merge is a directed relationship between two packages, that indicates that the contents of the two packages are to be combined. It is dependency relation with applied stereotype <>. Define a merge relationship in the Dependency Specification dialog box. For a detailed description of this dialog box, see Section “Dependency and its kinds Specification dialog boxes” on page 7-232.

P ACKAGE IMPORT A package import is a relationship between an importing namespace and a package, indicating that the importing namespace adds the names of the members of the package to its own namespace. It is dependency relation with applied stereotype <>. Define an import relationship in the Dependency Specification dialog box. For a detailed description of this dialog box, see Section “Dependency and its kinds Specification dialog boxes” on page 7-232.

E LEMENT IMPORT An element import is defined as a directed relationship between an importing namespace and a packageable element. The name of the packageable element or its alias is to be added to the namespace of the importing namespace. It is dependency relation with applied stereotype <>. Define an import relationship in the Dependency Specification dialog box. For a detailed description of this dialog box, see Section “Dependency and its kinds Specification dialog boxes” on page 7-232.

© 2005 No Magic, Inc 7-234 7 MODEL ELEMENTS

Containment

A containment shows a class, package or other model element declared within another model element. Such a declared class is not a structural part of the enclosing class but merely has scope within the namespace of the enclosing class, which acts like a package toward the inner class.

Actors

Actors represent roles played by human users, external hardware, and other subjects. An actor does not necessarily represent a specific physical entity but merely a particular facet (that is, "role") of some entity that is relevant to the specification of its associated use cases. An actor requires task solutions from a system. This task is represented as a use case. An actor is shown as a “stick man” figure with the name below the figure.

W ORKING WITH ACTORS General information about working with shapes is offered in Chapter 5, "Diagrams Basics." Define an actor in the Actor Specification dialog box.

7-235 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Actor Specification dialog box

Figure 20 -- Actor Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for information on specification elements.

Tab name Box Function Inner Elements Name Constraint name. Add constraint to Type Constraint type. a actor Create The Constraint Specification dialog box appears. Define the constraint in the dialog box. Delete Removes selected constraint element from the actor.

To define an actor as abstract

1 Double-click the selected actor or choose Specification from the actor shortcut menu. The Actor Specification dialog box opens. 2 Select the Is Abstract check box in the general properties group.

Use Cases

A use case represents a typical interaction between a user and a system. It captures some of the functionality and data that the user works with. A use case is a type of behaviored classifier that represents a declaration of an offered behavior. Each use case specifies a type of behavior, including variants, that the subject can perform in collaboration with one or more actors. The subject of a use case could be a physical system or any other element that may have behavior, such as a component, subsystem or class.

© 2005 No Magic, Inc 7-236 7 MODEL ELEMENTS

An extension point is a reference to one location within a use case where action sequences from other use cases can be inserted. Each extension point has a unique name within a use case and a description of the location within the behavior of the use case. A use case is shown as an ellipse containing the name inside. Extension points are listed in the Extension Points compartment of the use case. Define the selected use case in the Use Case Specification dialog box.

Use Case Specification dialog box

Figure 21 -- Use Case specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for information on specification elements.. Group name Box Function General Load Profile Loads the Use Case description profile that contains specific extensions. Behaviors Type The type of the created element. From the drop down Name The name of the created element. list, choose activity, state machine or Create The list of elements to create appears. Choose the interaction to create element and define properties in the opened within a use case. properties list. Delete Remove the selected diagram from the use case. Extension Points Create Define a new extension point. Delete Remove the selected extension point from the use case.

7-237 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Group name Box Function Inner elements Name Type the name for the newly created diagram. From the drop down Type The type of created diagram. list, choose diagrams or constraints to create Create The list of diagrams appears. Choose a diagram or as an inner element of constraint and define properties in the opened the use case. properties list. Delete Remove the selected inner element from the use case. For more general information about working with symbols, see Chapter 5, "Diagrams Basics."

To add an extension point for the use case

1 Open the Use Case Specification dialog box. 2 Click the Extension Points group. 3 Click Create. The Extension Point properties window opens. Here you may specify the extension point. • Press CTRL+ALT+E.

• From the use case shortcut menu, choose Insert New Extension Point.

• From the use case shortcut menu in the Browser, choose New Element, and then Extension Point. Type the name of the extension point. TIPS: You may create an extension point directly on a diagram: Draw an extension path between two use cases. Then click YES in the message window. Once the extension point is created, specify its name. You may define a use case as abstract (for the detailed description, see Section “Generalizable elements” on page 7-223.)

Use Case Extensions

MagicDraw presents UseCase description extensions. Now you may define pre-conditions and post-conditions for the use cases and other extensions, which are implemented as tag definitions. MagicDraw contains UseCase Description profile, which may be loaded from Use Case Specification dialog box. Tag defitions available in UseCase Description profile: Group Tag Defitions Conditions PostCondition PreCondition

© 2005 No Magic, Inc 7-238 7 MODEL ELEMENTS

Group Tag Defitions Description Goal Implementation Issues Non Functional Requirements Notes Flow of Events Alternative Flow of Events Alternative Flow of Events Diagrams Basic Flow of Events Basic Flow of Events Diagrams Exceptional Flow of Events Exceptional Flow of Events Diagrams Identity Author Date Priority Other Assumption Component Complexity Component Type Out-standing Issue Use Case Complexity IMPORTANT Tag definitions from UseCase Description profile are not visible on diagrams, only in generated reports. The detailed description about reports, see in Section “Reports” on page 10-332. For the detailed description of working with tag definitions, see in Section “Tag Definitions” on page 8-291.

To display tag definitions from the UC Description profile on the diagram

1 Open the UseCase Description profile UseCase_Profile.xml as a project (this profile is located in the /profiles folder). 2 In the Browser tree select the property, which represents tag definition and open its Specification dialog box. 3 In the Applied Stereotype field, remove <>. 4 Save the project. 5 Reload the profile in the project you are working: from the UseCase Description Profile shortcut menu in the Browser tree, choose Modules, and then choose Reload Module.

Relationships in Use Case Diagrams

There are several standard relationships among use cases, or between actors and use cases.

7-239 © 2005 No Magic, Inc. MODEL ELEMENTS 7

A SSOCIATION The participation of an actor in a use case, i.e. instances where an actor and a use case communicate with each other. This is the only relationship between actors and use cases. Association relationships are also known as communication associations For more on defining associations, see Section “Association” on page 7-223.

E XTEND A relationship from an extending use case to an extended use case that specifies how and when the behavior defined in the extending use case can be inserted into the behavior defined in the extended use case. The extension takes place at one or more specific extension points defined in the extended use case. Define extend relationships in the Extend Specification dialog box.

Extend Specification dialog box

Figure 22 -- Extend Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for information on specification elements not covered in this section. Group name Box Function General Condition An expression specifying the condition, which must be Set general fulfilled if the extension is to take place. information about the extend relationship

© 2005 No Magic, Inc 7-240 7 MODEL ELEMENTS

Group name Box Function Extension Points Assign Select predefined extension points you wish to assign Select the to the extend relationship in the Extension Points extension points to dialog box. be assigned to the Unassign Remove an already created extension point from the extend use case. relationship Up Move the selected extension point to an upper position. Down Move the selected extension point to a lower position.

To open the Extension Point Specification dialog box

1 Choose Specification from the use case shortcut menu, or double-click the use case shape. The Use Case Specification dialog box opens. 2 Expand the Extension Points group and then click on the created extension point. (Double-clicking opens an independent Extension Points Specification window).

Extension Point Specification dialog box

Figure 23 -- Extension Point Specification dialog box Refer to the Section “Specification dialog boxes” on page 5-118 for information of specification elements not covered in this section. Tab name Box name Function General Owner The name of the use case, which owns the extension General point. information about the extension point is displayed.

7-241 © 2005 No Magic, Inc. MODEL ELEMENTS 7

I NCLUDE An include (uses) relationship from use case A to use case B indicates that an instance of the use case A will also contain the behavior as specified by B. The include relationship is intended for use when there are common parts of the behavior among two or more use cases. This common part is then extracted to a separate use case, to be included by all the base use cases having this part in common. Since the primary use of the include relationship is for reuse of common parts, what is left in a base use case is usually not complete in itself but dependent on the included parts for meaning and context. This is reflected in the direction of the relationship, indicating that the base use case depends on the addition but not vice versa. Define your extend relationships in the Include Specification dialog box.

Include Specification dialog box

Figure 24 -- Include Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for information of specification elements not covered in this section. Tab name Box Function General Owner The name of the use case, which owns the include Set general relationship. information about the include relationship Including Case Name of the use case to where the relationship goes. Addition Name of the use case from where the relationship comes.

G ENERALIZATION For more on defining generalizations, see Section “Generalization” on page 7-221. A generalization from use case A to use case B indicates that A is a specialization of B.

© 2005 No Magic, Inc 7-242 7 MODEL ELEMENTS

D EPENDENCY For more on defining dependencies see Section “Dependency” on page 7-231. A dependency indicates a semantic relationship between two model elements (or two sets of model elements). It relates the model elements themselves and does not require a set of instances for its meaning. It indicates a situation in which a change to the target element may require a change to the source element in the dependency.

R EALIZATION For more on defining realizations see Section “Dependency” on page 7-231

Instance Specification

An instance specification specifies existence of an entity in a modeled system and completely or partially describes the entity. The description may include:

• Classification of the entity by one or more classifiers of which the entity is an instance. If the only classifier specified is abstract, then the instance specification only partially describes the entity.

• The kind of instance, based on its classifier or classifiers - for example, an instance specification whose classifier is a class describes an object of that class, while an instance specification whose classifier is an association describes a link of that association.

• Specification of values of structural features of the entity. Not all structural features of all classifiers of the instance specification need be represented by slots, in which case the instance specification is a partial description.

• Specification of how to compute, derive or construct the instance (optional). MagicDraw allows you to create instances of classifiers – class, interface, enumeration, use case, actor, node, component, artifact and other classifiers. Instances are shown using a rectangle by underlining the name string of an instance element. Instance of an actor is shown as an actor stick man figure with an actor’s name string below the symbol. For more general information about working with symbols, see Chapter 5, "Diagrams Basics." Define the selected instance in the Instance Specification dialog box.

I NSTANCE SPECIFICATION DIALOG BOXES An instance is an individual unit with its own identity and value. Each instance has a descriptor – model element. MagicDraw allows you to create instances of classifiers.

7-243 © 2005 No Magic, Inc. MODEL ELEMENTS 7

To open the Instance Specification dialog box Choose Specification from the appropriated instance shortcut menu or double-click the instance shape.

Figure 25 -- Instance Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box name Function General Owner The name of the element, containing instance. Set general options for Classifier The name of the assigned classifier. the instance. Deployed Artifacts Name Name of the artifact or instance. List of an artifacts or Type Element, which appears as type of deployed artifact instances that artifact. has been deployed to a deployment target. Owner The name of the element, containing deployed artifact. Slots Type The name, which is the owner of the attribute. A named slot in an Attribute The name of the attribute. instance, which holds the value (the instance Instance The name of an instance, to which the current that is the value of the instance is set as a default value. AttributeLink) of an attribute (the attribute from which the AttributeLink originates)

To assign an already existing classifier to an instance

1 Right-click the instance shape and choose Type from the instance shortcut menu. 2 Choose the classifier you wish to assign to an instance.

© 2005 No Magic, Inc 7-244 7 MODEL ELEMENTS

• Open the Instance Specification dialog box and in the Classifiers field, click the ‘...’ button. The Select Elements dialog box opnes. Move classiefiers from All to Selected list and click OK.

To assign/unassign a previously existing classifier for an instance in the Instance Specification dialog box

1 Double-click an instance shape or choose Specification from the shape shortcut menu. 2 The Instance Specification dialog box appears. Click the ‘...’ button in the Classifiers property. • To assign a new classifier, select elements in All and click the Add button to move them to the Selected list.

• To unassign the assigned classifier, select element in the Selected list and click the Remove button.

To hide/show an assigned classifier From the instance shortcut menu, select/clear the Show Classifier check box.

To set initial value to an attribute of the assigned classifier

1 Double-click an instance’s shape or choose Specification from the shape shortcut menu. 2 The Instance Specification dialog box appears. Click the Slots tab. 3 Click the Edit Value button and type the name of the value.

To show/hide slots of the assigned classifier Clear/select Suppress Slots check box in the instance shortcut menu. NOTE By default slots of the classifier are suppressed.

Connector

Specifies a link that enables communication between two or more instances. This link may be an instance of an association, or it may represent the possibility of the instances being able to communicate because their identities are known by virtue of being passed in as parameters, held in variables or slots, or because the communicating instances are the same instance. The link may be realized by something as simple as a pointer or by something as complex as a network connection. In contrast to associations, which specify links between any instance of the associated classifiers, connectors specify links between instances playing the connected parts only.

7-245 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Each connector may be attached to two or more connectable elements, each representing a set of instances. For more general information about working with symbols, see Chapter 5, "Diagrams Basics." Define the selected connector in the Connector Specification dialog box.

Connector Specification dialog box

Figure 26 -- Connector Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box Function General Owner The name of the element, which owns connector. Set general Contract Assign activity, interaction or state machine to information about connector. Click the ‘...’ button and choose elements the include in the Select Elements dialog box. relationship Kind Possible choices: • delegation (default) • assembly

To open the Connector End Specification dialog box

1 In the Browser tree, expand Interaction, Relations branch and in the Connector group, select one of the roles. Choose Specification from the shortcut shortcut menu, or double-click the role. The Connector End Specification dialog box appears.

© 2005 No Magic, Inc 7-246 7 MODEL ELEMENTS

Connector End Specification dialog box

Figure 27 -- Connector End Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box name Function General Owner The name of the connector, which ones connector Set general end. information about the link end Role The name of the property, representing lifeline.

Lifeline

A lifeline represents an individual participant in the Interaction. Lifelines represent only one interacting entity. A lifeline is shown using a rectangle symbol. For more general information about working with symbols, see Chapter 5, "Diagrams Basics." Define the lifeline in the Lifeline Specification dialog box.

7-247 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Lifeline Specification dialog box

Figure 28 -- Lifeline Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box Function General Owner The name of the interaction, which owns lifeline. Set general Represents Property name, which represents lifeline in information about interaction. the lifeline

To assign a type (classifier) to a lifeline

1 Right-click the lifeline shape and choose Type from the shortcut menu. 2 Choose the classifier you wish to assign to a classifier role or click New and choose element from the list.

To hide/show a base classifier Select the Show Classifier check box from the lifeline shortcut menu.

Message

A Message is an element that defines one specific kind of communication in an Interaction. A communication can be, for example, raising a signal, invoking an Operation, creating or destroying an Instance. The Message specifies not only the kind of communication given by the dispatching Execution Specification, but also the sender and the receiver.

© 2005 No Magic, Inc 7-248 7 MODEL ELEMENTS

A message is shown as a line from the sender message end to the receiver message end. The form of the line or arrowhead reflect properties of the message:

Name Function Notation in Notation in Communication Diagram Sequence Diagram Asynchronou The sender is not s Message waiting for acceptance from the recipient.

Synchronous The operation Message that is called should be completed before the caller resumes execution. Call A call message Message represents the request to invoke a specific operation. Send A send message Message specifies the sending of a request to invoke a specific operation. Reply The reply Message message returns the values to the caller of the previous call, completing execution of the call. Create A create message Message is Message specifies the connected creation of directly to an specific object (not operation. lifeline). Destroy A destroy A large X mark is Message message displayed on the represents the object’s lifeline in destruction of the the message’s instance destination. described by the lifeline.

7-249 © 2005 No Magic, Inc. MODEL ELEMENTS 7

To open the Message Specification dialog box

• Choose Specification from the message shortcut menu or double-click the message.

• Open the Association Role Specification dialog box. Open the Messages tab and click the Edit button.

Message Specification dialog box

Figure 29 -- Message Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box name Function General Signature The definition of the message type, depending on Set general its kind. information about Owner The name of the interaction, which owns message. the message Message Type The type of the action: call, send, create, reply, destroy. Click the ‘…’ button to choose a type from the list. Send Event The name of the sender interaction. Receive Event The name of the receiver interatcion. Message Sort Possible choises: • synchCall • asynchCall • asynchSignal

© 2005 No Magic, Inc 7-250 7 MODEL ELEMENTS

Tab name Box name Function Arguments Create A list of arguments appears. Choose argument and Specify a message specify value in the Argument field. argument value that Delete Removes argument from the list. appears during execution. Up Move the selected item to an upper position. Down Move the selected item to a lower position.

To draw a message on the connector

1 Click the Message to Right or Left button on the diagram toolbar. 2 Click the desired connector on the Diagram pane. A message arrow is placed to the connector you click on the diagram. NOTE A message flow has two directions: right and left. Choose one of them by clicking an associated button on the diagram toolbar.

To set an action type for a message

1 Open the Message Specification dialog box. 2 Click the Message Type “...” button and choose the action type from the drop- down list. See Section “Message” on page 7-248.

To show/hide the numbers of the messages From the communication diagram shortcut menu, choose Numbering and then select/clear the Show Meesage Numbers check box.

To remove advanced automatic numbering of messages From the communication diagram shortcut menu, choose Numbering and then clear the Advaced Message Numbering check box and you will be able to number messages according your needs.

To change the numbering of the messages

1 From the communication diagram shortcut menu, choose the Change Numbering command.

7-251 © 2005 No Magic, Inc. MODEL ELEMENTS 7

2 Increase, decrease, and/or change the level of numbering in the Change Communication Numbering dialog box:

Figure 30 -- Change Communication Numbering dialog box Box name Function Number The number of the message. Name The type, name of the action of the corresponding message. Edit The Type Number dialog box opens. Type the number of the message. Increase Increases the selected number in one point. Decrease Decreases the selected number in one point. OK Saves changes and exits the dialog box. Cancel Exits the dialog box without saving changes. Help Displays the MagicDraw Help.

P REDECESSORS AND ACTIVATORS Predecessor is the set of messages whose completion enables the execution of the current message. The predecessor is a comma-separated list of sequence numbers followed by a slash (‘/’): sequence-number ‘,’ . . . ‘/’ The meaning is that the message is not enabled until all of the communications whose sequence numbers appear in the list have occurred. Therefore, the list of predecessors represents a synchronization of threads. The message corresponding to the numerically preceding sequence number is an implicit predecessor and need not be explicitly listed. All of the sequence numbers with the same prefix form a sequence. The numerical predecessor is the one in which the final term is one less. That is, number 3.1.4.5 is the predecessor of 3.1.4.6, where the number “3” is an activator.

© 2005 No Magic, Inc 7-252 7 MODEL ELEMENTS

To show predecessors on the message

• Choose Show Predecessors from the current message shortcut menu.

• Choose Symbol(s) Properties command from the message shortcut menu and select the Show Predecessors check box.

To change the activator number of the messages

1 Choose Activator command from the current message shortcut menu. 2 Choose the number of activator that you want to assign for the current message and predecessors. NOTE: If you change the activator number to one of the predecessor message, this number also changes for other predecessors. Define the selected message in the Message Specification dialog box. For a detailed description of this dialog box, see Section “Message Specification dialog box” on page 7-250.

Actions

An action is a named element that is the fundamental unit of executable functionality. The execution of an action represents some transformation or processing in the modeled system, be it a computer system or otherwise. An action execution represents the run-time behavior of executing an action within a specific behavior execution. As action is an abstract class, all action executions will be executions of specific kinds of actions. When the action executes and what its actual inputs are is determined by the concrete action and the behaviors in which it is used. There are two types of actions - Action and Call Operation Action. Specify actions in the Action Specification dialog box.

To open the Call Behavior Action Specification dialog box

• Draw action element in the Activity diagram. Double click the element.

• From the action shortcut menu in the Browser or Diagram pane, choose Specification.

7-253 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Call Behavior Action Specification dialog box

Figure 31 -- Call Behavior Action Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section.. Tab name Box Function General Owner Type an action expression that describes the effects of Set general the action. information about Behavior Choose activity, interaction or state machine from the the action list, or click “...” button and assign them from the Select Elements tree. In Interruptible An interruptible activity region is an activity group that Region supports termination of tokens flowing in the portions of an activity. Pins Input Pin Click ‘+’ button in the Argument field to add Action Input pin, Input Pin, Input Value. Corresponding Specification dialog box opens. Output Pin Click ‘+’ button in the Result field to add Output pin. The Output Pin Specification dialog box opens.

© 2005 No Magic, Inc 7-254 7 MODEL ELEMENTS

Call Operation Action Specification dialog box

Figure 32 -- Call Operation Action Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section.. Tab name Box Function General Owner Type an action expression that describes the effects of Set general the action. information about Operation Click the ‘...’ button to assign state machine the action operation. The Select Element dialog box opens. Click Create for adding a new operation to model. Pins Input Pin Click ‘+’ button to add Action Input Pin, Input Pin, Input Value. Corresponding Specification dialog box opens. Output Pin Click ‘+’ button to add Output Pin. The Output Pin Specification dialog box opens.

Interaction Use

Interactions are units of behavior of an enclosing Classifier. Interactions focus on the passing of information with Messages between the ConnectableElements of the Classifier. Reference to Interaction can be created.

7-255 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Interaction Use Specification dialog box

Figure 33 -- Interaction Use Specification dialog box Tab name Box Function Refers To Combobox A list of interactions, created in the project, opens. Reference to Click ‘...’ button, to add interaction from the Select specified diagram. Element tree. Click the Create button to create a new interaction. Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section.

Combined Fragment

Fragment is an abstract notion of the most general interaction unit. The Fragment is a piece of an interaction. Each interaction fragment is conceptually like an interaction by itself. Using Combined Fragment, a fragment of sequence diagram can be separated. MagicDraw represents twelve kinds of fragments: Alternatives, Loop, Option, Parallel, Break, Negative, Critical Region, Consider, Ignore, Weak Sequencing, Strict Sequencing, and Assertion.

© 2005 No Magic, Inc 7-256 7 MODEL ELEMENTS

Combined Fragment Specification dialog box

Figure 34 -- Combined Fragment Specification dialog box Tab name Property Function General Interaction Select the operator for fragment. Available: seq, alt, Operato opt, break, par, strict, loop, critical. Operands Guard Separated alternative part of interaction fragment. Create Creates a new gard value. Delete Removes value from the list. Up Moves item to upper position in the list. Down Moves item to lower postion in the list. Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section.

Lifelines in Sequence Diagram

A lifeline represents the existence of the object at a particular time. It stretches from the top to the bottom of the diagram. In a sequence diagram, an object lifeline denotes an Object playing a specific role. For more information about the Lifeline Specification dialog box, see Section “Lifeline Specification dialog box” on page 7-248.

To destroy a sequence object - a large “X” at the end of its lifeline marks its destruction

• Choose Destroy Mark from the lifeline shortcut menu.

• Set a message as destroyed.

7-257 © 2005 No Magic, Inc. MODEL ELEMENTS 7

When an object receives a message, an activity starts in that object. An activation (focus of control) shows the period during which an object is performing an action either directly or through a subordinate procedure. The activation bar is used to denote that activity.

To change activation bar size

1 Click the desired activation bar on the Diagram pane. 2 Drag an activation bar to the desired direction. NOTE After resizing, the lines on an activation bar are thickened and the size of an activation bar may not change automatically. The lifeline may split into two or more concurrent lifelines to show conditionality. Each corresponds to a conditional branch in the message flow. Lifelines may merge together at some subsequent point.

To add a recursive message to a lifeline Click the Recursive Message button on the diagram toolbar and click the lifeline on the desired place where you wish to draw this message.

Messages in Sequence Diagram

Messages are the main tool for displaying an interaction between objects, which is usually an operation call or creation and destruction event. Messages are labeled with the name (operation or signal) and their argument values. Define the selected message in the Message Specification dialog box. For more information on working with messages, Section “Message” on page 7-248 .

State

A state is a condition during the lifetime of an object or an interaction during which the object meets certain conditions, performs an action, or waits for an event. States are defined by the concepts of duration and stability. An object may not be in an unknown or undefined state. A state may have two compartments to provide more information about that state:

• The first compartment - name compartment - contains state name, for example: running, going up.

• The second compartment - activity compartment - events and actions of the state are listed.

© 2005 No Magic, Inc 7-258 7 MODEL ELEMENTS

For more general information about working with symbols, see Chapter 5, "Diagrams Basics." MagicDraw supports four types of the states. You can draw State, Composite State, Orthogonal State, and Submachine State. Define the selected state in the Composite State Specification dialog box.

State Specification dialog box

Figure 35 -- Composite State Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box name Function General State Invariant Type text or click ‘...’ to open the State Invariant Edit Contains the dialog box. state actions, Connection Click “+” to open the Connection Point Reference events and dialog box. Specify information for connection. buttons for editing list. Actions group box Entry Behavior Type Chose a type from the activity, interaction or state machine items list. Behavior Element Click ‘...’ and choose element from the activity, interaction or state machine items list. Corresponding dialog box appears.

7-259 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Tab name Box name Function Do Activity Behavior Type Chose a type from the activity, interaction or state machine items list. Behavior Element Click ‘...’ and choose element from the activity, interaction or state machine items list. Corresponding dialog box appears. Exit Behavior Type Chose a type from the activity, interaction or state machine items list. Behavior Element Click ‘...’ and choose element from the activity, interaction or state machine items list. Corresponding dialog box appears. Inner States Name The name of the inner state. The list of inner Type The type of the inner state. states and buttons for Region The region, to which inner state was added. editing them Internal Name The name of the internal transition. Transitions A set of Create The Transition Specification dialog box appears. transitions that, if Define the transition. triggered, occur Delete Remove the selected transition from the state. without exiting or entering the state.

To suppress/unsuppress actions compartment In the state shortcut menu, select/clear the Suppress Actions check box.

To insert a new region to state

• In the state shortcut menu, choose Insert New Region.

To insert a new inner state to the state

• In the Browser, drag&drop selected state to a Region.

• On the diagram pane, select state and drag&drop it on the state symbol.

Composite State

A composite state either contains one region or is decomposed into two or more orthogonal regions. Each region has a set of mutually exclusive disjoint subvertices and a set of transitions. A given state may only be decomposed in one of these two ways.

© 2005 No Magic, Inc 7-260 7 MODEL ELEMENTS

Any state enclosed within a region of a composite state is called a substate of that composite state. It is called a direct substate when it is not contained by any other state; otherwise it is referred to as a indirect substate. Each region of a composite state may have an initial pseudostate and a final state. A transition to the enclosing state represents a transition to the initial pseudostate in each region. For more general information about working with symbols see Chapter 5, "Diagrams Basics." Define the selected composite state in the State Specification dialog box. For a detailed description of this dialog box, see Section “State Specification dialog box” on page 7-259. For more information on working with states, see Section “State” on page 7-258.

To add a new region to the composite state Choose Add New Region from the composite state shortcut menu.

To remove any region from the composite state (at least two regions have to be left) Choose Remove Region from the composite state shortcut menu and choose a region you want to remove.

Submachine

A submachine state specifies the insertion of the specification of a submachine state machine. The state machine that contains the submachine state is called the containing state machine. The same state machine may be a submachine more than once in the context of a single containing state machine. A submachine state is semantically equivalent to a composite state. The regions of the submachine state machine are the regions of the composite state. The entry, exit and behavior actions, and internal transitions, are defined as part of the state. Submachine state is a decomposition mechanism that allows factoring of common behaviors and their reuse. For more general information about working with symbols see, Chapter 5, "Diagrams Basics." Define the selected submachine in the State Specification dialog box. For a detailed description of this dialog box, see Section “State Specification dialog box” on page 7-259. For more information on working with states, see Section “State” on page 7-258.

7-261 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Pseudo State

Pseudo state are typically used to connect multiple transitions into more complex state transitions paths. For example, by combining a transition entering a fork pseudo state with a set of transitions exiting the fork pseudo state, we get a compound transition that leads to a set of orthogonal target states. For more general information about working with symbols, see Chapter 5, "Diagrams Basics." Specify pseudostates in the Pseudo State Specification dialog box.

Pseudo State Specification dialog box

Figure 36 -- Pseudo State Specification dialog box Tab name Property Function General Owner The region, containing pseudo state. Kind The kind, showing pseudo state purpose. Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section.

I NITIAL Every object is in some particular state as soon as it is created, so it is useful to explicitly show that state. A solid filled circle represents the initial state of an object. There can only be one initial state for an object. An initial state denotes the starting place for a transition, the target of which is a composite state.

© 2005 No Magic, Inc 7-262 7 MODEL ELEMENTS

F INAL STATE To represent the object’s destruction, use the final state symbol (a circle surrounding a smaller solid circle). The final state is optional in the diagram because there is a system that runs without interruption after the start of the activities. Also, there can be several final states in the same state diagram, denoting that the object’s life may finish depending to several conditions.

T ERMINATE Entering a terminate pseudo state implies that the execution of this state machine by means of its context object is ter-minated. The state machine does not exit any states nor does it perform any exit actions other than those associated with the transition leading to the terminate pseudostate.

E NTRY POINT An entry point connection point reference as the target of a transition implies that the target of the transition is the entry point pseudostate as defined in the submachine of the submachine state. As a result, the regions of the submachine state machine are entered at the corresponding entry point pseudo states.

E XIT POINT An exit point connection point reference as the source of a transition implies that the source of the transition is the exit point pseudostate as defined in the submachine of the submachine state that has the exit point connection point defined. When a region of the submachine state machine has reached the corresponding exit points, the submachine state exits at this exit point.

D EEP HISTORY Deep History represents the most recent active configuration of the composite state that directly contains this pseudo state; e.g. the state configuration that was active when the composite state was last exited. A composite state can have at most one deep history vertex.

S HALLOW HISTORY Shallow History represents the most recent active substate of its containing state (but not the substates of that substate). A composite state can have at most one shallow history vertex. A transition coming into the shallow history vertex is equivalent to a transition coming into the most recent active substate of a state.

J UNCTION Junction vertices are semantic-free vertices that are used to chain together multiple transitions. They are used to construct compound transition paths between states. For example, a junction can be used to converge multiple incoming transitions into a single outgoing transition representing a shared transition path (this is known as an merge). Con- versely, they can be used to split an incoming transition into multiple outgoing transition segments with different guard conditions.

C HOICE Choice vertices which, when reached, result in the dynamic evaluation of the guards of the triggers of its outgoing transitions. This realizes a dynamic conditional branch. It allows

7-263 © 2005 No Magic, Inc. MODEL ELEMENTS 7

splitting of transitions into multiple outgoing paths such that the decision on which path to take may be a function of the results of prior actions performed in the same run-to- completion step.

F ORK/JOIN Fork vertices serve to split an incoming transition into two or more transitions terminating on orthogonal target vertices (i.e. vertices in different regions of composite state). The segments outgoing from a fork vertex must not have guards or triggers. Join vertices serve to merge several transitions emanating from source vertices in different orthogonal regions. The transitions entering a join vertex cannot have guards or triggers.

Transition

A transition is a directed relationship between a source vertex and a target vertex. It may be part of a compound transition, which takes the state machine from one state configuration to another, representing the complete response of the state machine to an occurrence of an event of a particular type. Define the selected transition in the Transition Specification dialog box.

Transition Specification dialog box

Figure 37 -- Transition Specification dialog box

© 2005 No Magic, Inc 7-264 7 MODEL ELEMENTS

Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section.

Tab name Box name Function General Guard A guard is expression that is attached to a transition Set general as a fine-grained control over its firing. The guard is information about evaluated when an event instance is dispatched by the transition the state machine. Target The name of the model element, which is the target of the transition. Source The name of the model element, which is the source of the transition. Trigger group box Event Type The type of the event Effect group box Behavior Type The type of the effect action. Behavior Click ‘...’ and choose element from the activity, Element interaction or state machine items list. Corresponding dialog box appears.

To define an event type

• In the Transition Specification dialog box, General tab, click arrow down in Trigger group box, Event Type field.

7-265 © 2005 No Magic, Inc. MODEL ELEMENTS 7

E VENT TYPES Name Description Any Receive A transition trigger associated with AnyReceiveEvent specifies that Event the transition is to be triggered by the receipt of any message that is not explicitly referenced in another transition from the same vertex. Call Event A call event represents the reception of a request to invoke a specific operation. A call event is distinct from the call action that caused it. A call event may cause the invocation of a behavior that is the method of the operation referenced by the call request, if that operation is owned or inherited by the classifier that specified the receiver object. Change Event A change event models an event that occurs when an explicit boolean expression becomes true as a result of a change in value of one or more attributes or associations. A change event is raised implicitly and is not the result of some explicit change event action. Expression specifies the change event: keyword when followed by an expression. Creation Event A creation event models the creation of an object. Destruction A destruction event models the destruction of an object. Event Execution Event An execution event models the start or finish of an execution occurrence. Send Operation A send operation event specifies the sending of a request to Event invoke a specific operation on an object. Send Signal A send signal event specifies the sending of a message to a Event receiver object. Siganl Event A signal event represents the reception of a particular (asynchronous) signal. Signal Event is a child of Event. Time Event A Time Event models the expiration of a specific deadline. Note that the time of occurrence of a time event instance (i.e., the expiration of the deadline) is the same as the time of its reception. Expression specifies the corresponding time deadline: keyword after, followed by an expression.

Internal transitions

In all other cases, the action label identifies the event that triggers the corresponding action expression. These events are called internal transitions and are semantically equivalent to self transitions except that the state is not exited or re-entered. This means that the corresponding exit and entry actions are not performed. For more information on defining transitions, see Section “Transition” on page 7-264.

© 2005 No Magic, Inc 7-266 7 MODEL ELEMENTS

Specify internal transition in the Transition Specification dialog box. For a detailed description of this dialog box, see Section “Transition Specification dialog box” on page 7-264.

To define an internal transition

1 Double-click the state or choose Specification from the state shortcut menu. The State Specification dialog box appears. 2 Click the Internal Transitions goup. 3 Click the Create button. The Transition Specification dialog box appears. Specify an internal transition. To remove an internal transition, click the Delete button.

Flow Final Node

It is a final node that terminates a flow. Destroys all tokens that arrive at it. It has no effect on other flows in the activity. See example for flow final element notation in MagicDraw project.

For more information defining flow final node, see Section “Pseudo State” on page 7-262.

Decision Node

Decisions are made using guard conditions. They help protect transitions that depend on a guarding condition. The symbol used for the decision is a large diamond, which may have one or more incoming transitions and two or more outgoing transitions. A decision in an activity diagram is used much like a choice or junction point in state diagrams. Decision points allows to separate and merge transition paths back together. Decision Node can be converted to Merge Node. Right-click to open the shortcut menu and choose Convert to Merge Node.

7-267 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Object Node

An object node is an activity node that indicates an instance of a particular classifier, possibly in a particular state, may be available at a particular point in the activity. Object nodes can be used in a variety of ways, depending on where objects are flowing from and to, as described in the semantics section. For more general information about working with symbols, see Chapter 5, "Diagrams Basics." Define the selected object node in the Central Buffer Node Specification dialog box.

Central Buffer Node Specification dialog box

Figure 38 -- Central Buffer Node Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box name Function General Type The list of classifiers. Select a classifier you wish to Set general assign to an object node shape. Click the ‘…’ button information about to open the Select Element dialog box for choosing the object node type from the elements tree. In State Click the “...” button to assign existing final state or state from model in the Select Elements dialog box, or click Create for defining a new one.

© 2005 No Magic, Inc 7-268 7 MODEL ELEMENTS

To set a classifier to an object node

1 Double-click the object node or choose Specification from the shape shortcut menu. The Central Buffer Node Specification dialog box appears. 2 Choose a classifier you wish to assign to an object node from the Type drop- down box.

To assign a state or final state to object node

1 Click the “...” button in the Central Buffer Node Specification dialog box, In State field. The Select Elements dialog box appears. 2 Select state from the existing model elements or click Create. The State Specification dialog box opens. Specify new state, which will be assigned to object node.

Send Signal Action

Send Signal Action is an action that creates a signal instance from its inputs, and transmits it to the target object, where it may cause the firing of a state machine transition or the execution of an activity. The argument values are available to the execution of associated behaviors. The requestor continues execution immediately. Any reply message is ignored and is not transmitted to the requestor. For more general information about working with symbols, see Chapter 5, "Diagrams Basics." Define the selected send signal action in the Send Signal Action Specification dialog box.

7-269 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Send Signal Action Specification dialog box

Figure 39 -- Send Signal Action Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box name Function General Signal Click the “...” button to assign existing signal from Set general model in the Select Elements dialog box, or click information about Create for defining a new one. the object node

Accept Event Action

Accept Event Action is an action that waits for the occurrence of an event meeting specified conditions. If an Accept Event Action has no incoming edges, then the action starts when the containing activity or structured node does, whichever most immediately contains the action. In addition, an Accept Event Action with no incoming edges remains enabled after it accepts an event. It does not terminate after accepting an event and outputing a value, but continues to wait for other events. An Accept Event Action with no incoming edges and contained by a structured node is terminated when its container is terminated. For more general information about working with symbols, see Chapter 5, "Diagrams Basics." Define the selected accept event action in the Accept Event Action Specification dialog box.

© 2005 No Magic, Inc 7-270 7 MODEL ELEMENTS

Accept Event Action Specification dialog box

Figure 40 -- Send Signal Action Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box name Function General Is Unmarshall Indicates whether there is a single output pin for the Set general event, or multiple output pins for attributes of the information about event. the object node Trigger Cick the “+” to open the Trigger Specification dialog box.Defined trigger will be assigend to accept event action.

To set a trigger to a accept event action

1 Double-click the accept event action shape or choose Specification from the shape shortcut menu. 2 Click “+” in Trigger field. The Trigger Specification dialog box opens. Specify trigger, which will be assigned for accept event action.

Swimlanes

Actions and subactivities can be organized into swimlanes in activity diagrams. Swimlanes are used to organize responsibility for actions and subactivities according to class. They often correspond to organizational units in a business model.

7-271 © 2005 No Magic, Inc. MODEL ELEMENTS 7

An activity diagram can be divided visually into “swimlanes,” each separated from neighboring swimlanes by vertical or horizontal solid lines on both sides. Each swimlane represents responsibility for part of the overall activity, and may eventually be implemented by one or more objects. The relative ordering of the swimlanes has no semantic significance, but might indicate some affinity. Each action is assigned to one swimlane. Transitions may cross lanes. There is no significance to the routing of a transition path. Horizontal and vertical swimlanes are supported:

Also multidimentional swimlanes can be created (from the swimlane shortcut menu, choose the Insert Vertical Swimlane or Insert Horizontal Swimlane commands):

To open the Activity Partition Specification dialog box Choose Specification from the partition (swimlane) shortcut menu, or double- click the partition line.

© 2005 No Magic, Inc 7-272 7 MODEL ELEMENTS

Activity Partition Specification dialog box

Figure 41 -- Activity Partition Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Tab name Box name Function General Owner Shows the name of the activity diagram where the Set general partition is placed. information about the partition Represents Clicke the “...” button to open the Select Elements dialog box. Assign model element that represents the partition.

To draw a swimlane on the diagram Click the Swimlane button on the diagram toolbar and click the diagram.

To set a name for a swimlane

1 Double-click the swimlane line or choose Specification from the line shortcut menu. 2 The Activity Partition Specification dialog box opens. Type a name in the Name box. • Type the name directly on the Diagram pane.

7-273 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Components

A component represents all kinds of elements that pertain to piecing together software applications. They can be simple files, such as DLLs or executables. According to UML 2.0, now there is possibility to list component properties. The following compartment are available for component:

• Provided/required interfaces

• Realizations

• Artifacts

For more general information about working with symbols, see Chapter 5, "Diagrams Basics." Define the selected component in the Component Specification dialog box.

© 2005 No Magic, Inc 7-274 7 MODEL ELEMENTS

Component Specification dialog box

Figure 42 -- Component Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section.

Tab name Box Function Ports Name Name of the port. Type Type, assigned to the port. Provided Provided classifier is displayed. Required Required classifier is displayed. Classifier Name of classifier, owning port. Create Creates a new port. Delete Removes existing port from component. Provided/Required Name Name of provided/required interface. Interfaces Type Possible values - provided or required. Add Adds provided/required interface. Remove Removes provided/required interface from the list.

7-275 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Tab name Box Function Realizing Name Name of the realizing classifier Classifiers Type Type of the classifier (class, interface, etc.) Owner Model element name, owning classifier. Click this button to open classifier Specification dialog box.

Add The Select Elements dialog box opens. Choose element from model element tree. Remove Remove realizing classifier from the list. Behaviours Name Name of the behavriours. Type Type, assigned to the behaviour. Create Choose item from the list - activity, interaction, state machine. Delete Removes behaviour from class. Inner Elements Name Model element name. Add another Type Model element type. element to a component. Create Choose element from the list. The corresponding specification dialog box appears. Define the selected model element in the dialog box. Delete Removes the selected model element from the component.

Nodes

Any computer or device that is relevant to the implemented system can be shown as a node. A node is drawn as a three-dimensional cube with a name inside it. Devices in a system are typically represented with a stereotype that specifies the device type. Nodes can be represented as types and as instances. A node is shown as a figure that looks like a 3-dimensional view of a cube. For more general information about working with symbols see Chapter 5, "Diagrams Basics." Define the selected node in the Node Specification dialog box.

© 2005 No Magic, Inc 7-276 7 MODEL ELEMENTS

Node Specification dialog box

Figure 43 -- Node Specification dialog box Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section.

Tab name Box Function Ports Name Name of the port. Type Type, assigned to the port. Provided Provided classifier is displayed. Required Required classifier is displayed. Classifier Name of classifier, owning port. Create Create a new port. Delete Remove existing port from node. Deployed Artifacts Name Name of the deployed artifact. Type Type of the item - artifact. Add Add artifact to the list. Remove Remove artifact from the list. Behaviours Name Name of the behavriours. Type Type, assigned to the behaviour. Create Choose item from the list - activity, interaction, state machine. Delete Removes behaviour from class.

7-277 © 2005 No Magic, Inc. MODEL ELEMENTS 7

Tab name Box Function Nested Nodes Name Name of the nested noder Type Type of the classifier (class, interface, etc.) Click this button to open classifier Specification dialog box.

Create Select node, device, or execution environment from list. The element Specification dialog box opens. Remove Removes node from the list. Inner Elements Name Model element name. Add another Type Model element type. element to a node Create Choose element from the list. The corresponding specification dialog box appears. Define the selected model element in the dialog box. Delete Removes the selected model element from the node.

© 2005 No Magic, Inc 7-278 7 MODEL ELEMENTS

7-279 © 2005 No Magic, Inc. UML EXTENSION MECHANISMS 8

STEREOTYPE A stereotype is an extension mechanism that defines a new and more specialized element of the model based on an existing element. Stereotype can be based on all types of elements including classes, packages, components, and notes, as well as such relationships as associations, generalizations, and dependencies. A stereotyped element derives all base element properties and may have additional constraints. Stereotypes are treated as separate model elements. For more general information about working with symbols see Chapter 5, "Diagrams Basics." Define the selected stereotype in the Stereotype Specification dialog box.

To open the Stereotype specification dialog box

• Double-click the stereotype shape or choose Specification from the stereotype shortcut menu.

S TEREOTYPE SPECIFICATION DIALOG BOX

Figure 1 -- Stereotype Specification dialog box

© 2005 No Magic, Inc. 8-280 8 UML EXTENSION MECHANISMS Stereotype

Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section. Group name Box name Function General Name Name of the stereotype. Set general Owner Name of the element, which owns stereotype. information about the stereotype. Icon The file name of the icon image file that represents the current stereotype. To choose the icon for the selected stereotype. Click the ‘…’ button. The Open dialog box appears. ToDo Note about stereotype. Tag Definitions Name Name of the stereotype attribute. Specify Type In the general case, where the tag type is a data type, this information for specifies the range of values of the tagged values associated tag definition with the tag definition. In the special case, where the tag type refers to a metaclass that is not a data type, the tag value references model elements that are instances of the metaclass. Classifier Classifier element of the stereotype attribute. Default value Default value for tag definition. Create Creates a new tag definition. Delete Deletes existing tag definition. Stereotyped Name The name of the affected model element. Elements Shows the model Type The type (class, use case, etc.) of that model element. elements affected by the stereotype. Add Adds a new element which can be stereotyped. Remove Removes element from stereotyped elements list. Relations Name A list of extensions is displayed. Element Creates value for selected tagged definition. Direction Specifies direction between elements with arrow. Tags List A list of default tagged definitions appears. Create Value Creates value for selected tagged definition. Edit Value The Slots Specification dialog box appears. Specify information for the selected tag definition. Constraints Name Name of the constraint. Click the “...” button to change name. Specification Information about constraint. Select item and click the “...” button to edit constraint specification. Create Creates a new constraint for stereotype. Apply Applies allready created constraint from the model. Choose constraint in the Select Elements dialog box. Unapply Removes constraint from the list.

8-281 © 2005 No Magic, Inc. UML EXTENSION MECHANISMS 8 Stereotype

To create a new stereotype

• Use the Stereotype button on the class diagram toolbar. 1 From the package shortcut menu in the Browser, choose New, and then choose Stereotype. -or- From the Tools menu, choose Profiles. Choose the desired profile, and then open the Stereotypes tab. Select the base class from the list and click the Add button. 2 The Select Extension Elements Storage dialog box appears. Click OK and specify a new stereotype in the Stereotype Specification dialog box. For a detailed description of this dialog box, see Section “Stereotype Specification dialog box” on page 8-280.

To export/import stereotypes Beginning with MagicDraw version 7.0, stereotypes must be exported using modules functionality. The detailed description about model partitioning in MagicDraw, see Section “Reusing project parts in modules” on page 4-61.

To create a stereotype with an image

1 From the Tools menu, choose Profiles. Choose the desired profile and then open the Stereotypes tab. Choose a model element for which you would like to create a stereotype with an icon. 2 Click the Add button. The Stereotypes Specification dialog box appears. 3 Click the Icon “...” button and from the Open dialog box, select an image you want to place for a stereotype. Click the Open button. 4 Type the name of a stereotype and click Close in opened dialog box and OK in the Profiles dialog. • Chosse stereotype element in the Browser and specify icon in the Specification dialog box.

To display a stereotype icon, as a main shape, on the diagram pane From the shape, that has an assigned stereotype with an icon, shortcut menu, choose Suppress Content.

P ROFILES DIALOG BOX, STEREOTYPES TAB

To open the Profiles dialog box, Stereotypes tab

• From the Tools menu, choose Profiles. The Profiles dialog box appears. Select the desired profile and Stereotypes tab. Here you may define your own stereotypes and edit them.

© 2005 No Magic, Inc 8-282 8 UML EXTENSION MECHANISMS Stereotype

• In the element Specification dialog box, Stereotypes tab, click the Edit button. Select the desired profile and Stereotypes tab.

Figure 2 -- Profiles dialog box. Stereotypes tab The Profiles dialog box, Stereotypes tab contains the following elements. Element name Function For Contains the names of model elements to which stereotypes apply (base classes.) Available Contains stereotypes that apply to the selected model element. Edit Edit the selected stereotype in the Stereotype Specification dialog box. Add The Stereotype Specification dialog box appears. Add a new stereotype to the selected model element. Remove Deletes the selected stereotype. NOTE If you remove the predefined stereotype, that removed stereotype will be automatically imported after loading project for the next time. OK Saves all actions performed during the session and exits the dialog box. Cancel Cancels all actions performed during the session and exits the dialog box. Help Displays the MagicDraw Help.

8-283 © 2005 No Magic, Inc. UML EXTENSION MECHANISMS 8 Stereotype

UML WEB EXTENSION STEREOTYPES This Web extension to the UML defines a set of stereotypes, tagged values and constraints that enable us to model Web applications. The stereotypes and constraints are applied to certain components that are particular to Web applications and allows us to represent them in the same model, and on the same diagrams that describe the rest of the system. The principal element specific to Web applications is the Web page. There are several stereotypes that can be applied to a Web page, and additional stereotypes are assigned to other elements of HTML that represent architecturally significant components of the system (frames, targets and forms).

© 2005 No Magic, Inc 8-284 8 UML EXTENSION MECHANISMS Stereotype

Server Page Stereotype Metamodel Class Class Description A server page represents a Web page that has scripts executed by the server. These scripts interact with resources on the server (databases, business logic, external systems, etc). The object operations represent the functions in the script, and it’s attributes represent the variables that are visible in the page’s scope (accessible by all functions in the page). Icon

Client Page Stereotype Metamodel Class Class Description An instance of a client page is an HTML formatted Web page. Like any HTML page it is a mix of data, presentation and even logic. Client pages are rendered by client browsers, and may contain scripts that are interpreted by the browser. Client page functions map to functions in scripts tags in the page. Client page attributes map to variables declared in the pages script tags that are accessible by any function in the page (page scoped). Client pages may have the associations’ relations with other pages, client or server. Icon

Form Stereotype Metamodel Class Class Description A class with stereotype «form» is a collection of input fields that are part of a client page. A form class maps directly to the HTML form tag. Its attributes represent the HTML form input fields (input boxes, text areas, radio buttons, check boxes, and hidden fields). A «form» has no operations - they cannot be encapsulated in a form. Any operations that interact with the form would be the property of the page that contains the form. Icon

8-285 © 2005 No Magic, Inc. UML EXTENSION MECHANISMS 8 Stereotype

Frame Set Stereotype Metamodel Class Class Description A frame set is a container of multiple Web pages. The rectangular viewing area is divided up into smaller rectangular frames. Each frame may be associated with a single frame named «target», although not necessarily. The contents of a frame may be a Web page or another frame set. A frame set stereotyped class maps directly to a frameset Web page, as well as the HTML frame tag. Because a frameset is a «client page», it may have operations and attributes; browsers that do not render frames activate them. Icon

Target Stereotype Metamodel Class Class Description A target is a named compartment in a browser window in which Web pages can be rendered. The name of the stereotyped class is the name of the target. Typically a target is one frame in a window defined by a frameset. However, a target could be a completely new browser instance or window. «Targeted link» associations specify targets as the place where a new Web page is to be rendered. Icon

JavaScript Stereotype Metamodel Class Class Description On a JavaScript enabled browser it is possible to simulate user- defined objects with JavaScript functions. Icon

© 2005 No Magic, Inc 8-286 8 UML EXTENSION MECHANISMS Stereotype

Link Stereotype Metamodel Association Class Description A link is a pointer from a client page to another «Page». In a class diagram a link is an association between a «client page» and either another «client page» or a «server page». A Link association maps directly to the HTML anchor tag. Icon None

Targeted Link Stereotype Metamodel Association Class Description Similar to a «link» association, a «targeted link» is a link where the associated page is rendered in another target. This association maps directly to the HTML anchor tag, with the target specified by the tag target attribute. Icon None

Frame Content Stereotype Metamodel Association Class Description A frame content association is an aggregation association expressing a frame containment of another page or target. A frame content association can also point to another frameset, indicating nested frames. Icon None

Submit Stereotype Metamodel Association Class Description A «submit» association is always between a «form» and a «server page». Forms submit their field values to the server through «server pages» for processing. The Web server processes the «server page», which accepts and uses the information in the submitted form. This relationship indicates which page (or pages) is able to process the form, and which forms a «server page». Icon None

Builds Stereotype Metamodel Association Class

8-287 © 2005 No Magic, Inc. UML EXTENSION MECHANISMS 8 Stereotype

Description The «builds» relationship is a special relationship that bridges the gap between client and server pages. Server pages only exist on the server. They are used to build client pages. The «builds» association identifies which server page is responsible for the creation of a client page. This is a directional relationship, since the client page contains no knowledge of how it came into existence. A server page can build multiple client pages, but a client page can only be built by one server page. Icon None

© 2005 No Magic, Inc 8-288 8 UML EXTENSION MECHANISMS Stereotype

Redirect Stereotype Metamodel Association Class Description A «redirect» relationship is a unidirectional association with another Web page. It can be directed both from and to client and server pages. If the relationship originates from a «server page» then it indicates that the processing of the page request may continue on with the other page. This does indicate that destination page always participates in the building of a client page, only that it could. This particular relationship is not completely structural, since the actual invocation of a redirection operation must be done programmatically in the code of the originating page. If the relationship originates from a «client page» then this indicates that the browser automatically requests the destination page, without user input. A time delay value can be set that specifies a delay (in seconds) before the second page is requested. This use of redirection corresponds to the META tag and HTTP- EQUIV value of "Refresh". Icon None

Object Stereotype Metamodel Association Class Description An association between a client page and an object that is embedded in it. The object is typically a Java Applet or ActiveX control. This association maps in part to the HTML tag. Icon None

IIOP Stereotype Metamodel Association Class Description IIOP (Internet Inter-Orb Protocol) is a special type of relationship between objects on the client and objects on the server. It represents a communication mechanism other than HTTP for client server communications. Typically this relationship is between Java Beans on the client and Enterprise Java Beans on the server. Icon None

RMI Stereotype Metamodel Association Class Description RMI (Remote Method Invocation) is a mechanism for Java Applets and Beans to send messages to other Java Beans on different machines. Typically this relationship is between Java Beans or Applets on the client and Enterprise Java Beans on the server. Icon None

8-289 © 2005 No Magic, Inc. UML EXTENSION MECHANISMS 8 Stereotype

Input Element Stereotype Metamodel Property Class Description An Input Element is a propertyof a «Form» object. It maps directly to the tag in an HTML form. It is used to input a single word or line of text. The tagged values associated with this stereotyped property correspond to the tag property. To complete the required values for the HTML tag; the property name is used as the tag name, and the propertie’s initial value is the tag value. Icon None

Select Element Stereotype Metamodel Property Class Description An input control used in forms. The select control allows the user to select one or more items from a list. Most browsers render this control as a combo or list box. Icon None

TextArea Element Stereotype Metamodel Property Class Description An input control used in forms that allows multiple line input. Icon None

Page Stereotype Metamodel Component Class Description A page component is a Web page. A browser may request it by name. A Page component may or may not contain client or server scripts. Typically Page components are text files accessible by the Web server, but they can also be compiled modules that are loaded and invoked by the Web server. Ultimately, when accessed by the Web server (as either a file or executable) a page produces an HTML formatted document that is sent in response to a browser’s request. Icon

© 2005 No Magic, Inc 8-290 8 UML EXTENSION MECHANISMS Stereotype

Tag Definitions

A tag definition specifies the tagged values that can be attached to a kind of model element. Among other things, tag definitions can be used to define the virtual meta attributes of the stereotype to which they are attached. A tagged value adds extra information to a model element that is secondary to the element’s semantics. It is often used to store management data about the state and progress of the project such as author, status, and tested. A tagged value is another way of adding language implementation data to a model for code generation tools. A tag definition consist of two parts: name and value (example: Author = Joe). There are certain tags predefined in UML, others can be defined by the user. Add tag definitions in the Tags tab of model element Specification dialog box.

To create a new tag definition

1 Create a new stereotype. Open the Stereotype Specification dialog box. 2 Click the Tag Definitions tab and use the Create button to add a new tag definition for stereotype. This new property will appear as tag definition for element. 3 Click Close in the Stereotype Specification dialog to save changes. Click OK. 4 Apply stereotype for model element. 5 Open element Specification dialog box, Tags group. A new tag with stereotype name and tagged definition appears in the tags tree.

Refere to the Section “Stereotype Specification dialog box” on page 8-280 for more information about Stereotype Specification dialog box fields not covered in this section.

8-291 © 2005 No Magic, Inc. UML EXTENSION MECHANISMS 8 Stereotype

T AGGED VALUE EDITION

To create a new tagged value

• In the element Specification dialog box, Tags group, click the Create Value button.

Figure 3 -- Tags dialog box

Button Description Moves created value to upper possition in the list.

Up Moves created value to lower possition in the list.

Down Opens an editable window for value.

Edit

© 2005 No Magic, Inc 8-292 8 UML EXTENSION MECHANISMS Stereotype

Adds new tagged value to the list.

Add Removes tagged value from the list.

Remove

To open the Slots dialog box

• In the element Specification dialog box, Tags group, click the Edit Value button.

Figure 4 -- Tagged Value Specification Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section.

Tab name Box name Function General Owner Displays owner profile of the tagged value. Set general Applied Click “...” to apply stereotype for tagged value. information about Stereotypes the tagged value Value Tag definition that specifies the tagged value. Defining Feature Specifies type of the value. ToDo Additonal information can be added. Documentation/ Documentation Set tagged value documentation. It can be HTML text Hyperlinks also. Hyperlink Choose hyperlink for tagged value. It can be file, model element or web site. Tags Creates, edits and removes tagged definitions. Constraints Creates, applies and removes constraint for tag.

8-293 © 2005 No Magic, Inc. UML EXTENSION MECHANISMS 8 Stereotype

TODO ITEM MagicDraw presents a TODO list. It is so called a list of tasks needed to do in the future and added by the user. In MagicDraw, TODO tasks are added as tag definitions with a name TODO, where a value is a text you need to use in the future.

To add a TODO task

1 Open the element Specification dialog box. 2 In the General properties list, select the Todo item. Click the “...” button. The To Do dialog box appears. 3 Type the desired text in the Value text box. 4 Click OK.

To display TODO tasks

1 From the Edit menu, choose Find TODO. 2 All model elements that contain TODO items will be displayed in the Browser, Search Results tree. 3 To open the desired model element on the Diagram pane, double-click it in the From Diagrams tree or choose Go To from element shortcut menu.

Constraints

A Constraint represents additional semantic information attached to the constrained elements. A constraint is an assertion that indicates a restriction that must be satisfied by a correct design of the system. The constrained elements are those elements required to evaluate the constraint specification. In addition, the context of the Constraint may be accessed, and may be used as the namespace for interperting names used in the specification. Constraint is represented as a linguistic, enclosed in braces ({}), statement in some formal (OCL, C++, and other), or natural language. There are 14 standard constraints in the UML such as association, global, parameter. You may also define your own constraints. Object Constraint Language (OCL) is a formal language used to express constraints. These typically specify invariant conditions that must hold for the system being modeled. OCL can be used for a number of different purposes:

• To specify invariants on classes and types in the class model.

• To specify type invariant for Stereotypes

• To describe pre- and post conditions on Operations and Methods

• To describe Guards

• As a navigation language

© 2005 No Magic, Inc 8-294 8 UML EXTENSION MECHANISMS Stereotype

• To specify constraints on operations Edit constraints in the Constraints tab of model element Specification dialog box.

To define a new constraint

• From the element shortcut menu in the Browser, choose New, and then choose Constraint.

• Click the Inner Elements tab in the Specification dialog box for each model element and click the Create button (choose Constraint from the appeared list, if needed). Specify information about constraint in the opened Constraint Specification dialog box.

• Click the Constraints tab in the Specification dialog box for each model element and click the Create button. Type the name and specification of the constraint. NOTE! If constraint is displayed in the Constraints tab of the element Specification dialog box, it means this constraint is valid and applied for element. If constraint is displayed in the Inner Elements list, this constraint is only owned by element.

To apply constraint to element

1 Click the Constraints tab in the Specification dialog box for each model element and click the Apply button. 2 The Select Elements dialog box appears. Select constraint, existing in the model from the All Data tree and click the Add button to move it to the Selected Objects list. 3 Click OK.

8-295 © 2005 No Magic, Inc. UML EXTENSION MECHANISMS 8 Stereotype

C ONSTRAINT SPECIFICATION DIALOG BOX

To open the Constraint Specification dialog box In the Edit Constraints dialog box, click the Add or Edit button.

Figure 5 -- Constraint Specification dialog box

Tab name Box Function General Name Enter the name of the constraint. Set general Owner The name of the model element to which the current information about constraint is assigned the constraint Specification Enter an expression of the constraint. Click “...” button and in the Edit Specification window, choose OCL. Specification will be checked according to Object Constraint Language (OCL) ToDo Additonal information can be added. Documentation/ Documentation Set tagged value documentation. It can be HTML text Hyperlinks also. Hyperlink Choose hyperlink for tagged value. It can be file, model element or web site. Tags Creates, edits and removes tagged definitions. Constraints Creates, applies and removes constraint for tag.

© 2005 No Magic, Inc 8-296 8 UML EXTENSION MECHANISMS Stereotype

8-297 © 2005 No Magic, Inc. EXTENSION DIAGRAMS 9

MagicDraw supports an extension to UML diagrams:

• Content diagram

• Robustness diagram Also MagicDraw provides various types of other diagrams:

• Time diagram

• Struts diagram

• Web diagram

• CORBA IDL diagram

• DDL diagram

• WSDL diagram

• XML Schema diagram

• Business Process diagram

Working with Diagrams General information about working with diagrams see in Chapters “Diagrams Basics” and “UML Diagrams”. In the Environment Options dialog box, Plugins pane, you may select what extension diagrams you want to be enabled or disabled.

Patterns Various types of classes you may create in every class diagram using a Pattern Wizard. It contains GOF, Java, Junit, CORBA IDL, XML Schema, and WSDL design patterns. You may also create new patters and edit existing ones using Java code or JPython scripts. For a detailed description, see MagicDraw Open Api user’s guide. The detailed description of the Pattern Wizard, see in Section “Pattern Wizard” on page 10-378.

To open the Pattern Wizard

• In the class diagram, click the Class by Pattern button.

• From the class shortcut menu, choose Tools and then choose the Apply Pattern subcommand.

© 2005 No Magic, Inc. 9-298 9 EXTENSION DIAGRAMS Content Diagram

• Select a class and choose Apply Pattern from the Tools main menu.

CONTENT DIAGRAM A Content Diagram is an extension of UML notation. The purpose of it is to generate or represent a project structure (diagrams) and relations between them. Content table works as a table of contents for a project. All created diagrams have their own Specifications, in which you may specify their name, documentation, view relationships in which they participate, also add stereotypes, tagged values and constraints.

9-299 © 2005 No Magic, Inc. EXTENSION DIAGRAMS 9 Content Diagram

Content Diagram Elements

Toolbar Button Button (Hot Notation key) Sticky Button

(Z) Selection

(Escape)

Text Box

(X)

Text Box (HTML Text)

(SHIFT+X)

Note

(N)

Note (HTML Text)

(SHIFT+N)

Anchor to Note

(H) Constraint

(SHIFT+H)

© 2005 No Magic, Inc 9-300 9 EXTENSION DIAGRAMS Content Diagram

Toolbar Button Button (Hot Notation key) Content Shape Creates a table of contents of all diagrams of the project.

Package

Dependency A relationship showing that one diagram depends on the other. Class Diagram Creates a class diagram.

Use Case Diagram Creates a use case diagram.

Communication Diagram Creates a communication diagram.

Sequence Diagram Creates a sequence diagram.

9-301 © 2005 No Magic, Inc. EXTENSION DIAGRAMS 9 Content Diagram

Toolbar Button Button (Hot Notation key) State Diagram Creates a state diagram.

Activity Diagram Creates an activity diagram.

Implementation Diagram Creates an implementation diagram.

Composite Structure Diagram Creates composite structure diagram. Time Diagram Creates a time diagram.

Struts Diagram Creates a struts diagram.

Web Diagram Creates a web diagram.

CORBA IDL Diagram Creates a CORBA IDL diagram.

© 2005 No Magic, Inc 9-302 9 EXTENSION DIAGRAMS Robustness Diagram

Toolbar Button Button (Hot Notation key) WSDL Diagram Creates a WSDL diagram.

XML Schema Diagram Creates a xml schema diagram.

Robustness Diagram Creates a robustness diagram.

Generic DDL Diagram Creates a DDL diagram.

Oracle DDL Diagram Creates an Oracle DDL diagram. Content Diagram Creates a content diagram.

Separator

(W)

ROBUSTNESS DIAGRAM Robustness Analysis involves analyzing the narrative text of use cases, identifying a first- guess set of objects that will participate in those use cases, and classifying these objects based on the roles they play.

• Boundary or Interface objects are what actors use in communicating with the system.

• Entity objects are usually objects from the domain model.

9-303 © 2005 No Magic, Inc. EXTENSION DIAGRAMS 9 Robustness Diagram

• Control objects (which usually are called controllers because they often aren't real objects), which serve as the “glue” between boundary objects and entity objects. Robustness analysis serves as preliminary design within the project life cycle and provides the missing link between analysis and detailed design. Four basic rules apply: 1 Actors can only talk to boundary objects. 2 Boundary objects can only talk to controllers and actors. 3 Entity objects can only talk to controllers. 4 Controllers can talk to boundary objects and entity objects, and to other controllers, but not to actors Both boundary objects and entity objects are nouns, and that controllers are verbs. Nouns cannot talk to other nouns, but verbs can talk to either nouns or verbs.

© 2005 No Magic, Inc 9-304 9 EXTENSION DIAGRAMS Robustness Diagram

Robstness Diagram Elements

Toolbar Button/Model Element Button (Hot key) Notation Sticky Button

(Z) Selection

(Escape)

Text Box

(X)

Text Box (HTML Text)

(SHIFT+X)

Note

(N)

Note (HTML Text)

(SHIFT+N)

Anchor to Note

(H) Constraint

(SHIFT+H) Actor An actor represents a role played by an external person, process or a thing interacting (A) with a system. One physical object may play several roles.

9-305 © 2005 No Magic, Inc. EXTENSION DIAGRAMS 9 Web Diagram

Toolbar Button/Model Element Button (Hot key) Notation Boundary Actors use boundary objects to communicate with the system (sometimes called interface (B) objects.) Class with stereotype “boundary” Control Serves as the “glue” between boundary objects and entity objects. (C) Class with stereotype “control”

Entity Entity objects usually are objects from the domain model. (E) Class with stereotype “entity”

Robustness Association Association with default Association End A navigability = false and Association End B (S) navigability = true values.

Separator

(W)

WEB DIAGRAM Web system consists from server applications, network, communicating protocol, and browser. Basically, user’s requests begin from starting browser and requesting document through network from server (host computer). Web server running on host computer, catches user request, locates document and delivers it to the requestor. UML is a standard language for modeling software. However modeling specific web components cannot be done using just standard UML. Web-UML diagram provides extension to UML model, which enables to model web applications. MagicDraw Web-UML diagram includes Web-UML elements (stereotyped UML elements) for modeling: client, server pages, web form, frame classes, java script class representation and target class, and web page component. The detailed description of all stereotypes, find in the Section “UML Web Extension stereotypes” on page 8-284.

© 2005 No Magic, Inc 9-306 9 EXTENSION DIAGRAMS Web Diagram

Reference: Building Web Applications with UML by Jim Conallen Copyright ©2000 by Addison Wesley Longman, Inc.

9-307 © 2005 No Magic, Inc. EXTENSION DIAGRAMS 9 Web Diagram

Web Diagram Elements

Toolbar Button (Hot Some examples Button/Model key) Element Sticky Button

(Z) Selection

(Escape)

Text Box

(X)

Text Box (HTML Text)

(SHIFT+X)

Note

(N)

Note (HTML Text)

(SHIFT+N)

Anchor to Note

(H) Constraint

(SHIFT+H)

© 2005 No Magic, Inc 9-308 9 EXTENSION DIAGRAMS Web Diagram

Toolbar Button (Hot Some examples Button/Model key) Element Client Page

(SHIFT+C)

Server Page

(SHIFT+S)

Form

(SHIFT+F)

Frame

(SHIFT+E)

Target

(SHIFT+T)

Java Script

(SHIFT+J)

Class

(C)

9-309 © 2005 No Magic, Inc. EXTENSION DIAGRAMS 9 Web Diagram

Toolbar Button (Hot Some examples Button/Model key) Element Interface

(I) Package

(P) Subsystem

(Y) Model

(M) Realize

(R) Realization

(E) Dependency

(D) Generalization

(G) Association

(S) Aggregation

A Composition

(F)

© 2005 No Magic, Inc 9-310 9 EXTENSION DIAGRAMS Web Diagram

Toolbar Button (Hot Some examples Button/Model key) Element Builds

(B)

Link

(L)

Targeted Link

(SHIFT+L)

Frame Content

(SHIFT+O)

Submit

(U)

Object

(O) RMI

(SHIFT+R) IIOP

(SHIFT+I)

9-311 © 2005 No Magic, Inc. EXTENSION DIAGRAMS 9 CORBA IDL Diagram

Toolbar Button (Hot Some examples Button/Model key) Element Page

(SHIFT+P)

Separator

(W)

CORBA IDL DIAGRAM CORBA IDL diagram facilitates the creation of CORBA IDL elements. Also the following patterns are available for CORBA IDL: Interface, Value Type, Type Definition, Sequence, Array, Fixed, Union, Enumeration, Struct, Exception. More information about CORBA IDL usage in MagicDraw, find in the MagicDraw Code Engineering User’s Guide, Chapter “ CORBA IDL Mapping to UML”. Reference: UMLTM Profile for CORBATM Specification, Version 1.0, April 2002. http://www.omg.org/technology/documents/formal/profile_corba.htm

© 2005 No Magic, Inc 9-312 9 EXTENSION DIAGRAMS CORBA IDL Diagram

CORBA IDL Diagram Elements

Toolbar Button/ Button (Hot Model Element key) Sticky Button

(Z) Selection

(Escape)

Text Box

(X)

Text Box (HTML Text)

(SHIFT+X)

Note

(N)

Note (HTML Text)

(SHIFT+N)

Anchor to Note

(H) Constraint

(SHIFT+H) CORBA IDL Module

(M)

9-313 © 2005 No Magic, Inc. EXTENSION DIAGRAMS 9 CORBA IDL Diagram

Toolbar Button/ Button (Hot Model Element key) CORBA IDL Interface

(I) CORBA IDL Value

(V) Class by Pattern The Pattern Wizard appears. SHIFT+P Generalization

(G) Truncatable Generalization

Value Support Generalization

CORBA IDL Association

Association

(S) Aggregation

(A) Composition

(F) Package

(P)

© 2005 No Magic, Inc 9-314 9 EXTENSION DIAGRAMS DDL Diagram

Toolbar Button/ Button (Hot Model Element key) Class

(C) Interface

(I) Dependency

(D) Binding Dependency

(B) Containment

(SHIFT+C) Separator

W

DDL DIAGRAM DDL diagram is used to draw database definition elements. DDL diagram simplifies creation of primary key, foreign key, triggers and etc. The detailed description about DDL usage in MagicDraw, see MagicDraw Code Engineering User’s Guide, Chapter “DDL Script Engineering”.

9-315 © 2005 No Magic, Inc. EXTENSION DIAGRAMS 9 DDL Diagram

DDL Diagram Elements

Toolbar Button/ Button (Hot Model Element key) Sticky Button

(Z) Selection

(Escape)

Text Box

(X)

Text Box (HTML Text)

(SHIFT+X)

Note

(N)

Note (HTML Text)

(SHIFT+N)

Anchor to Note

(H) Constraint

(SHIFT+H) Table

(T)

© 2005 No Magic, Inc 9-316 9 EXTENSION DIAGRAMS WSDL Diagram

Toolbar Button/ Button (Hot Model Element key) View

(V) Relationship

(R) Foreign Key

(F) database

(D) schema

(S) Separator

W

WSDL DIAGRAM WSDL diagram is used to draw WSDL elements. Allows to create all elements used in wsdl file, except schema. Schema elements can be created using XMLSchema diagram. WSDL plugin has pattern for creating binding element. WSDL plugin requires XMLSchema plugin.

9-317 © 2005 No Magic, Inc. EXTENSION DIAGRAMS 9 WSDL Diagram

WSDL Diagram Elements

Model Element Button (Hot key) Sticky Button

(Z) Selection

(Escape)

Text Box

(X)

Text Box (HTML Text)

(SHIFT+X)

Note

(N)

Note (HTML Text)

(SHIFT+N)

Anchor to Note

(H) Constraint

(SHIFT+H) WSDLmessage

(M)

© 2005 No Magic, Inc 9-318 9 EXTENSION DIAGRAMS WSDL Diagram

Model Element Button (Hot key) WSDLporttype

(T) WSDLbinding

(B) WSDLport

(SHIFT+P) WSDLservice

(S) WSDLdefinitions

(D) WSDLtypes

(Y) WSDLimport

(I) Xmlns

(SHIFT+L) XDSnamespace

(P) Realization

(E) Separator

(W)

9-319 © 2005 No Magic, Inc. EXTENSION DIAGRAMS 9 XML Schema Diagram

XML SCHEMA DIAGRAM Diagram purpose is to create structure of xml schema file. Diagram allows quick draw of xml schema elements. These elements are stereotyped UML elements from class and implementation diagrams. Also the following patterns are available for XML Schema: XSDcomplexType, XSDcomposition, XSDsimpleType, XSDsimpleType(XSDlist), XSDsimpleType(XSDunion), and Simple XSDrestriction. The detailed description about XML Schema usage in MagicDraw, see MagicDraw Code Engineering User’s Guide, Chapter “XML Schema”. Reference: http://www.w3.org/TR/xmlschema-2/

© 2005 No Magic, Inc 9-320 9 EXTENSION DIAGRAMS XML Schema Diagram

XML Schema Diagram Elements

Toolbar Button/ Button (Hot Model Element key) Sticky Button

(Z) Selection

(Escape) Text Box

(X) Text Box (HTML Text)

(SHIFT+X) Note

(N) Note (HTML Text)

(SHIFT+N) Anchor to Note

(H) Constraint

(SHIFT+H) Class by Pattern

(SHIFT+P) XSDcomplexType

(C)

9-321 © 2005 No Magic, Inc. EXTENSION DIAGRAMS 9 XML Schema Diagram

Toolbar Button/ Button (Hot Model Element key) XSDsimpleType

(S) XSDsimpleType(XSDlist)

(SHIFT+S) XSDsimpleType(XSDunion)

(U) XSDall

(L) XSDchoice

(O) XSDsequence

(Q) XSDgroup

(G) XSDattributeGroup

(T) XSDschema

(SHIFT+M) Containment

(SHIFT+C) XSDnamespace

(P)

© 2005 No Magic, Inc 9-322 9 EXTENSION DIAGRAMS Time Diagram

Toolbar Button/ Button (Hot Model Element key) Aggregation

(A) Composition

(F) Binding Dependency

(B) XSDrestriction

(R) XSDextension

(E) XSDimport

(M) XSDinclude

(D) XSDredefine

(SHIFT+F) xmlns

(SHIFT+L) Separator

W

TIME DIAGRAM

9-323 © 2005 No Magic, Inc. EXTENSION DIAGRAMS 9 Time Diagram

Time Diagram Elements

Toolbar Button/ Button (Hot Model Element key) Sticky Button

(Z) Selection

(Escape) Text Box

(X) Text Box (HTML Text)

(SHIFT+X) Note

(N) Note (HTML Text)

(SHIFT+N) Anchor to Note

(H) Constraint

(SHIFT+H) Classifier Role

(O) Classifier Role <>

© 2005 No Magic, Inc 9-324 9 EXTENSION DIAGRAMS Business Process Diagram

Toolbar Button/ Button (Hot Model Element key) Classifier Role <>

Concurrent Lifeline

(L) Message: synchronous uninterpreted

(M) Message <>, <>

Message <>

Message <>

) Message to Self: synchronous uninterpreted (S) Recursive Message

(R) Diagonal Message: synchronous uninterpreted (D) Separator

W

BUSINESS PROCESS DIAGRAM BPMN (Business Process Modeling Notation) is the most recognized standard used by business users for end-to-end business process modeling. MagicDraw with business- oriented notation support has become one tool for business users and IT users. Working

9-325 © 2005 No Magic, Inc. 9 EXTENSION DIAGRAMS Business Process Diagram

with business models and IT models in one tool saves time and solves model interchange problems. Business Process Diagrams convey business processes of different participants in a modeled system. In a MagicDraw model, Process contains Business Process Diagram, depicting it as a graph of Flow Objects. BP diagrams can be used for three basic BPMN sub-models creation:

• Private (internal) business processes

• Abstract (public) processes

• Collaboration (global) processes Within and between these three BPMN sub-models, many types of Diagrams can be created (High-level private process activities, detailed private business processes, Collaboration Processes, etc.). Since a BPMN Diagram may depict the Processes of different Participants, each Participant may view the diagram differently.

Business Process Diagram Elements

Toolbar Button/ Button Element Description Model Element Start Event None Start Event indicates where a particular process will start.

Start Event Message

Start Event Timer

Start Event Rule

Start Event Link

Start Event Multiple

9-326 © 2005 No Magic, Inc. 9 EXTENSION DIAGRAMS Business Process Diagram

Toolbar Button/ Button Element Description Model Element Intermediate Event None Intermediate Events occur between a Start Event and an End Event. It will affect the flow of the process, but will not start or (directly) terminate the process. Intermediate Event Message

Intermediate Event Timer

Intermediate Event Error

Intermediate Event Cancel

Intermediate Event Compensation

Intermediate Event Rule

Intermediate Event Link

Intermediate Event Multiple

9-327 © 2005 No Magic, Inc. 9 EXTENSION DIAGRAMS Business Process Diagram

Toolbar Button/ Button Element Description Model Element End Event None End Event indicates where a process will end.

) End Event Message

End Event Error

End Event Cancel

End Event Compensation

End Event Link

End Event Terminate

End Event Multiple

9-328 © 2005 No Magic, Inc. 9 EXTENSION DIAGRAMS Business Process Diagram

Toolbar Button/ Button Element Description Model Element Task A Task is used when the work in the Process is not broken down to a finer level of Process Model detail.

Loop Task

Multiple_Instance Task

Compensation Task

Collapsed Sub-Process A Sub-Process is a compound activity that is included within a Process. It is compound in that it can be broken down into a finer level of detail (a Process) through a set of subactivities. Collapsed Transaction

Collapsed Loop Sub- Process

Collapsed Multiple- Instance Sub_Process

Collapsed Compensation Sub-Process

Collapsed Ad-Hoc Sub- Process

Expanded Sub-Process

9-329 © 2005 No Magic, Inc. 9 EXTENSION DIAGRAMS Business Process Diagram

Toolbar Button/ Button Element Description Model Element Expanded Transaction

Expanded Loop Sub- Process

Expanded Multiple- Instance Sub-Process

Expanded Compensation Sub-Process

Expanded Ad-Hoc Sub- Process

Gateway A Gateway is used to control the divergence and convergence of multiple Sequence Flow.

Data-Based XOR

Event-Based XOR

OR

Complex

AND

9-330 © 2005 No Magic, Inc. 9 EXTENSION DIAGRAMS Business Process Diagram

Toolbar Button/ Button Element Description Model Element Sequence Flow A Sequence Flow is used to show the order that activities will be performed in a Process.

Conditional Sequence Flow

Default Sequence Flow

Compensation Association Compensation Association occurs outside the Normal Flow of the Process and is based upon an event (a Cancel Intermediate Event) that is triggered through the failure of a Transaction or a Compensate Event. Message Flow A Message Flow is used to show the flow of messages between two entities that are prepared to send and receive them.

Horizontal/Vertical Pool A Pool represents a Participant in a Process.

Data Object Data Objects provide information about what activities require to be performed and/or what they produce.

Association An Association is used to associate information with Flow Objects.

Directional Association

Group A grouping of activities that does not affect the Sequence Flow.

9-331 © 2005 No Magic, Inc. TOOLS 10

MagicDraw provides the following tools and wizards to help you perform the design tasks in your job quickly and easily:

• Reports – prepares HTML, PDF, or RTF report documents describing the model.

• Class Diagram Wizard – helps to create and customize new class diagrams.

• Package Overview Diagram Wizard – generates the package dependency diagram for packages in your project.

• Tools for Analysis – prepares diagrams and report documents of the relationships between classes in the UML model.

• Hierarchy Diagram Wizard

• Realization Diagram Wizard

• Content Diagram Wizard - generates content of diagrams that are used in the project.

• Sequence Diagram from Java Source Wizard - creates sequence diagram of Java method implementation.

• Pattern Wizard – creates various GOF, Java, Junit, CORBA IDL, and XML Schema design patterns.

• Creating Setters / Getters – creates getting and setting operators for attributes defined in the class.

• Implementing or Overriding Operations – creates defined operations down the inheritance tree.

• Model Transformation Wizard - is a data set, which fully describes the action of applying model transformation on a set of packages. Transformation type, parameters, packages set to transform and the destination of the model transformation results are the parts of model transformation.

• Metrics - allows measuring project by different viewpoints.

REPORTS The Report dialog box is used for selecting the options to generate a report of the opened project to the HTML, PDF, RTF, XSL-FO, and PostScirpt formats. MagicDraw report generation is based on XSL transformation and formatting.

© 2005 No Magic, Inc. 10-332 1 TOOLS Reports

In XSL transformation, an XSLT processor reads XML document and XSLT style sheet. The processor outputs new XML document based on the instructions it finds in the XSLT style sheet. There is also special support for HTML output. In XSL formatting, XML data is formatted for output to screen, paper or other media. The figure below shows the report generation mechanism.

Since version 7.1, it is possible to generate reports from command line - Report Generator tool is presented. The description about Report Generator tool, see in Section “Report Generator Tool” on page 10-350.

To open the Report dialog box Choose the Report command from the Tools menu. The Report dialog box appears.

Template Management tab

The Report dialog box allows you to select from an array of predefined report templates (styles), or you can create your own report template. The information in the Template Management tab

10-333 © 2005 No Magic, Inc. TOOLS 1 Reports

is organized into trees. You may edit, delete, import, export, create your own template, make one of the templates as the default one.

Figure 1 -- Report dialog box. Template Management tab The following report templates are available:

• Model Report. Describes your UML model from different viewpoints, which are already predefined in MagicDraw or you may create your own. Predefined templates:

• Behavioral Model Report. Includes behavioral elements in the report: class diagram elements, collaboration, activity, and state diagrams and their elements.

• Built-In. Includes all available model elements into the report.

• Static Model Report. Includes class and implementation diagrams elements.

• Use Case Report. Describes system functionality and actors. UC report is generated from tag definition values, which are listed in UC profile. NOTE: Use Case report requires specifying model enrichment information (model actors and top-level UC diagrams).

© 2005 No Magic, Inc 10-334 1 TOOLS Reports

• Software Design Description. Describes software design of your system. The document includes sections that describe software design goals, strategies, constraints and guidelines, system architecture and detailed design. NOTE: Software Design Description report requires specifying model enrichment information.

• Model Extension Report. Describes common UML model extension mechanisms (stereotypes, tagged values and constraints).

To create your own report template

1 In the left pane of the Report dialog box, select Model Report, Use Case Report, Software Design Description report, or Model Extension Report. 2 In the right pane, select the template, according which, you would like to create your own template and click the Clone button. 3 The Enter Style Name dialog box appears. Type the name of the new template and click OK. 4 Double click the newly created report template and specify its options in the appeared tabs.

To rename the selected report template

1 In the left pane of the Report dialog box, select Model Report, Use Case Report, Software Design Description report, or Model Extension Report. 2 In the right pane, select the template and click the Rename button. 3 Type the new name in the Enter Style Name dialog box.

To delete the selected report template

1 In the left pane of the Report dialog box, select Model Report, Use Case Report, Software Design Description report, or Model Extension Report. 2 In the right pane, select the template and click the Delete button.

Import the desired report template

1 In the left pane of the Report dialog box, select Model Report, Use Case Report, Software Design Description report, or Model Extension Report. 2 In the right pane, click the Import button. 3 The Open dialog box appears. Choose the template you want to import and click Open. NOTE All MagicDraw report templates (*.rst) are located in the /data/report/report_types.

Export the selected report template

1 In the left pane of the Report dialog box, select Model Report, Use Case Report, Software Design Description report, or Model Extension Report.

10-335 © 2005 No Magic, Inc. TOOLS 1 Reports

2 In the right pane, select the template you want to export and click the Export button. 3 The Save dialog box appears. Select the directory where you want to save the selected template and click Save.

Set the selected report template as default

1 In the left pane of the Report dialog box, select Model Report, Use Case Report, Software Design Description report, or Model Extension Report. 2 In the right pane, select the template you want to set as default and click the Make Default button.

© 2005 No Magic, Inc 10-336 1 TOOLS Reports

D OCUMENT OPTIONS Property Name Description Report Title The general title of the report. By default, the name of the report template is given. Document Title The title of the generated document. Company Name The name of the company. Footer Text Text that will be displayed in the footer of the document. Show Revision History If True, shows the table of revision history. Revision History Table Specify the number of rows in the revision history table. Rows Revision Number Enter the number of the revision. Revision Details Specify the status of the revision. By default - Initial Version. Revision Author Type that name of the author. Show Number of Total Select this check box, if you want that the number of pages Pages will be displayed as e.g. 5-26. Table of Contents Choose the place where the table of contents will be placed: Location Beginning of the Document, End of the Document, Not Only for model report, use Included. case report, and software In the table of contents, the list of hyperlinks of generated design description. elements that represent classes, packages and diagrams. The hierarchy of the contents is listed top down: from packages to the elements that are included into the packages. Documentation as HTML Documentation is generated in html format (available only in Only for model report. HTML output reports) Include Documentation Includes documentation of the model elements in the Only for model report. generated report. Include Full Descriptions Includes the location (parent element) of the model element in Only for model report. the model dictionary index. Include Model Dictionary Includes UML model dictionary table to the report. Only for model report. Preformatted Documentation is shown as it is entered. If not selected, Documentation documentation text is wrapped Only for model report. Preserve Line Breaks Documentation has line breaks, even if the Preformatted Only for model report. Documentation is not selected. It has no effect is Documentation as HTML is selected. Show Introduction Section Includes Introduction section with Purpose, Scope and Only for use case report, Overview subsections (if selected). software design description, and model extension report. Show Purpose Section Includes Purpose subsection in the Introduction section. Only for use case report, software design description, and model extension report.

10-337 © 2005 No Magic, Inc. TOOLS 1 Reports

Property Name Description Document Purpose Type the purpose of the generated document. This text will be Only for use case report, included in the Purpose subsection. software design description, and model extension report. Show Scope Subsection Includes Scope subsection in the Introduction section. Only for use case report, software design description, and model extension report. Document Scope Type the scope of the generated document. This text will be Only for use case report, included in the Scope subsection. software design description, and model extension report. Show Overview Includes Overview subsection in the Introduction section. Subsection Only for use case report and software design description. Document Overview Type an overview of the generated document. This text will be Only for use case report and included in the Overview subsection. software design description. Include MagicDraw Includes a text “This document is generated by MagicDraw Trademark UML” in the footer.

M ODEL REPORT

Elements Every Model Report template contains the specific list of elements (diagrams and model elements), which information will be included in the report. You may select elements that will be included in the report in the Elements section. NOTE The list includes only those elements that contains unique data. E.g. you may not select Class, Implementation, and Sequence diagrams in this list as they do not contain specific data. You may include images of those diagrams in the Select Diagrams tab. Element name Function (if True) Activity Includes activity in the generated report. Actor Includes all available actors in the generated report. Artifact Includes artifact report. Attributes Includes all available attributes in the generated report. Class Includes all available classes in the generated report. Collaboration Includes collaboration in the generated report. Communication Diagram Includes communication diagrams in the generated report. Component Includes all available components in the generated report.

© 2005 No Magic, Inc 10-338 1 TOOLS Reports

Element name Function (if True) Composite Structure Includes composite structure diagram in the generated Diagram report. Constraint Includes all available constraints in the generated repor.t Data Types Includes all available data types in the generated report. Enumeration Includes all available enumerations in the generated report. Enumeration Literal Includes all available enumeration literals in the generated report. Extension Point Includes all available use case extension points in the generated report. Instance Specification Includes all available instances in the generated report. Interaction Includes all available interactions in the generated report. Interface Includes all available interfaces in the generated report. Node Includes all available nodes in the generated report. Operation Includes all available operations in the generated report. Port Includes all available ports in the generated report. Relations Includes relationships in the generated report. Signal Includes all available signals in the generated report. State Machine Includes all available state machines in the generated report. Stereotype Includes all available stereotypes in the generated report. Use Case Includes all available use cases in the generated report.

Model Elements Options In the Model Elements Options tab you may define general options how the model elements will be described in the report. Option name Function Filter By Visibility Only operations and attributes with the selected type of visibility are included in the report. Possible choices: All, Public, Not Private. Report empty values Defines if properties with empty values have to be used in reports. Show Abstract Includes the Abstract section, informing if the described element is abstract. Show Attributes Section Includes Attributes section when describing an element. Show Constraints Section Includes Constraints section when describing an element. Show Hyperlinks Section Includes Hyperlinks section when describing an element. Show Inner Elements Includes Inner Elements section when describing an Section element.

10-339 © 2005 No Magic, Inc. TOOLS 1 Reports

Option name Function Show Inner Relations Includes Inner Relations section when describing an Section element. Show Leaf Includes the Leaf section, informing if the described element is leaf. Show Operations Section Includes Operations section when describing an element. Show Relations Section Includes Relations section when describing an element. You may choose to show only associations. Show Stereotypes Section Includes Stereotypes section when describing an element. Show Tagged Values Includes Tagged Values section when describing an Section element. Show Template Includes Template Parameter section when describing an Parameters Section element. Use General properties Defines if properties from Standard or Expert mode have to be used in reports (General info section for every element).

U SE CASE REPORT Use Case Report describes systems functionality and actors. UC report is generated from tag definition values, which are listed in UC profile. Use Case report requires specifying model enrichment information - the defining of model actors and top-level UC diagrams - in the Use Case Model Wizard.

Use Case Model Wizard Use Case Model Wizard is used for predefining the specific diagrams that describe different views of the use case model:

• Actors diagrams describes actors relationships in the system.

• Use case model diagrams represents use case model of the system. These a

To open the Use Case Model Wizard

• From the Tools menu, choose Use Case Model Enrichment.

• Open the Report dialog box, select Use Case Report, and then click the Model Enrichment button.

Model Options In the Model Options tab, select the sections that will be included in the Use Case Report. Property name Function (if true) Show Actors Includes the description of actors in the report. Section

© 2005 No Magic, Inc 10-340 1 TOOLS Reports

Property name Function (if true) Show Use Case Includes the description of use case model in the report. Model Section Show Package Includes the information of packages. Details Show Classifier Includes the information of classifiers. Details Generate Includes sections for tagged values, which do not have created sections for values. empty tagged values

Use Case Options In this list select tag definitions you want include in the report. Navigate with buttons on the right.

S OFTWARE DESIGN DESCRIPTION Software Design Description report describes software design of your system. The document includes sections that describe software design goals, strategies, constraints and guidelines, system architecture and detailed design. This report is modeled according RUP, with some modifications. Software Design Description report requires specifying model enrichment information, where you select diagrams, depicting software design views.

Model Options Software Design Description report contains the following sections and subsections that you may choose to be included: 1 Introduction 1.1 Purpose 2 Scope 3 Overview 4 System Overview 5 Design Considerations 5.1 Assumptions and Dependencies 6 General Constraints 7 Goals and Guidelines 8 Architectural Strategies 9 System Architecture 9.1 Use Case View 10Conceptual View 11Deployment View 12Process View 13Detailed Design 13.1 Design Model

10-341 © 2005 No Magic, Inc. TOOLS 1 Reports

13.1.1 Component View 13.1.2 Data 13.1.3 MagicDraw Profile 13.1.4 UML Standard Profile 14Implementation Model Option name Function Show System Overview Includes System Overview section in the report. Section System Overview Click the “...” button and type the text you want to be displayed in the System Overview section. Show Design Consideration Includes Design Considerations section in the report. Section Show Dependencies Includes Assumptions and Dependencies subsection in the Subsection report. System Dependencies Click the “...” button and type the text you want to be displayed in the Dependencies section. Show Constraints Subsection Includes Constraint subsection in the report. System Constraints Click the “...” button and type the text you want to be displayed in the System Overview section. Show Goals Subsection Includes Goals subsection in the report. System Goals Click the “...” button and type the text you want to be displayed in the Goals section. Show Architectural Strategies Includes Architectural Strategies section in the report. Section Architectural Strategies Click the “...” button and type the text you want to be displayed in the Strategies section. Show System Architecture Includes System Architecture section in the report. Section Show Use Case View Includes Use Case View subsection in the report. Select the Subsection diagrams that represent Use Case View in the Software Design Model Wizard. Show Conceptual View Includes Conceptual View subsection in the report. Select the Subsection diagrams that represent Conceptual View in the Software Design Model Wizard. Show Deployment View Includes Deployment View subsection in the report. Select the Subsection diagrams that represent Deployment View in the Software Design Model Wizard. Show Process View Subsection Includes Process View subsection in the report. Select the diagrams that represent Process View in the Software Design Model Wizard. Show Detailed Design Section Includes Detailed Design Show Design Model Includes Design Model subsection in the report. Select the diagrams that represent Design Model View in the Software Design Model Wizard.

© 2005 No Magic, Inc 10-342 1 TOOLS Reports

Option name Function Show Subsystem Details Includes subsection in the report. Select the diagrams that Section represent Design Model View in the Software Design Model Wizard. Show Subsystem Classes Includes the description of classes of the subsystem. Show Subsystem Process Includes Functionality and Processing section in the subsystem’s description. Show Subsystem Actions Includes detailed description of actions, performed by subsystem. Show Subsystem Interactions Includes Uses/Interactions section in the description of subsystem. Show Subsystem Resources Includes Resources section in the description of subsystem. Show Implementation Model Includes Implementation Model subsection in the report. Select the diagrams that represent Implementation View in the Software Design Model Wizard.

M ODEL EXTENSION REPORT Model Extension report describes common UML model extension mechanisms (stereotypes, tagged values and constraints) of your project. Property name Function (if true) Show Includes stereotypes description in the report. Stereotypes Stereotypes Choose table style of the description of stereotypes: Simple or Table Style Extended. Show Stereotype Includes properties of stereotype, which contains tag definitions. Properties Show Includes constraints in the report. Constraints Show Global Include default constraints. Constraints

10-343 © 2005 No Magic, Inc. TOOLS 1 Reports

Select Packages tab

From the Select Package tab, select one package from which you want the report will be generated. By default, the Data package is selected and all model elements are included in the report.

Figure 2 -- Report dialog box. Select Packages tab

© 2005 No Magic, Inc 10-344 1 TOOLS Reports

Select Diagrams tab

From the Select Diagrams tab, select diagrams from which images are added to the report. By default, no diagrams are selected.

Figure 3 -- Report dialog box. Select Diagrams tab Include All Diagrams includes all available diagrams in the report. Include Selected Diagrams allows to choose the diagrams you want to include in the report.

10-345 © 2005 No Magic, Inc. TOOLS 1 Reports

Output Options tab

Figure 4 -- Report dialog box. Output Options tab Element name Function Report File Enter the directory and the name of the report where the generated report will be saved, or click the ‘…’ button, to select the location directory and the file name in the Open dialog box. NOTE Follow the file naming rules of the operation system you are using. If an incorrect name is provided, MagicDraw notifies you with the error message.

© 2005 No Magic, Inc 10-346 1 TOOLS Reports

Element name Function Report Output Select the type of the report you want to be displayed: Format • HTML Browsable (*.html) Generates a report that is easy to browse. With the browsable table of contents, you may easily find information you want on different pages. NOTE: HTML report is not available for Use Case Report, Software Design Description, and Model Extension Report. • XSL Formatting Objects (*.fo) • Portable Document Format (*.pdf) • Post Script (*.ps) • Rich Text Format (*.rtf) Report Paper Choose the size or paper for all reports, excluding HTML reports. Size Page Choose the Portrait or Landscape page orientation for all reports, Orientation excluding HTML reports. Generate Generate the report according to the appropriated options. Export Create report.properties file according to options specified in the Report Wizard. Choose the directory where you want to save this file. This file is used for generating reports from console.The description about Report Generator tool, see in Section “Report Generator Tool” on page 10-350. Display in After the generation, the generated report is opened in the corresponding Viewer viewer. Save Customize the report and save its configuration if you want to generate the Configuration report from command line, or you would like other users to use your configuration. Select Import already created report configuration. Configuration Close Close and exit the Report dialog box. Help Display MagicDraw Help.

Report Customization

There is possibility to customize MagicDraw reports by editing XSL files. The final report generation result is determined by the three parameters: report type (e.g. Model Report), report style (e.g. Default) and report output format (e.g. PDF). Each report type can have one ore more report styles, and each report style can have up to six report output formats (HTML browsable, XSL Formatting Objects, PDF, PS and RTF). The concrete values of these three parameters (report type, style and output format) define the location of the "Main.xsl" file. MagicDraw takes the project file (XML) and appropriate "Main.xsl" file (XSLT) as input for report generation. The "Main.xsl" file location pattern is:

10-347 © 2005 No Magic, Inc. TOOLS 1 Reports

/data/report/report_types//xsl///Main.xsl, -where-

is MagicDraw installation directory,

- report type name,

- report style name,

- report output format has two possible values (HTML_BROWSABLE and XSL_FO). Some location examples: Report Type Report Output Format "Main.xsl" file location directory Style (under "/data/report/report_types" directory) Model Report Default HTML Browsable Model Report/xsl/Default/HTML_BROWSABLE Model Report Default XSL Formatting Model Report/xsl/Default/XSL_FO Objects Model Report Custom XSL Formatting Model Report/xsl/Custom/XSL_FO Objects Use Case Report Default XSL Formatting Use Case Report/xsl/Custom/XSL_FO Objects

NOTE There is no need to have separate XSL files for PDF, PS and RTF output formats, as XSL-FO is converted to one of these formats by FO formatter.

N EW REPORT STYLE CREATION EXAMPLE Task: Add new report style (named "My Style") for Model Report. Only HTML browsable report output format will be implemented. Implementation: Step Create item Where Item Description 1 Directory "My "/data/report/report_types/ Model Report/xsl 2 Directory "/data/report/report_types/ browsable report generation will be SABLE Model Report/xsl/My Style stored here. 3 XSL file "/data/report/report_types/ will be used to generate "Model Model Report/xsl/My Report" with "My Style" report style and Style/HTML_BROWSABLE HTML browsable output format. After completion of these steps the new item "My Style" in the "Report Style" combo box (for "Model Report") will be available. Select this style and the "HTML Browsable" report

© 2005 No Magic, Inc 10-348 1 TOOLS Reports

output format to make MagicDraw use the newly created (or customized) XSL file for report generation.

NOTE The "Main.xsl" file is placed in the "HTML_BROWSABLE" directory and is intended to generate HTML (browsable) report. But this is not necessary. The real output format depends on the XSL file, which will describe the transformation. In principle the destination output format can be any format the XSL transformation can produce - HTML, XML or plain text. The real meaning of placing the "Main.xsl" file in "HTML_BROWSABLE" directory is that this transformation (without formatting) will be performed when the "HTML Browsable" report output format is selected during report generation.

F ONTS IN PDF AND PS REPORTS Support for custom fonts is added by creating font metric files (written in XML) from the actual font files, and registering them with FOP (FO formatter for PDF and PS reports). Currently only Type 1 and TrueType fonts can be added.

1. Font metric file creation FOP includes TTFReader, which reads the TTF file and generates an appropriate font metrics file for it. FOP also includes PFMReader, which reads the PFM file that normally comes with a Type 1 font, and generates an appropriate font metrics file for it.

10-349 © 2005 No Magic, Inc. TOOLS 1 Reports

To facilitate the metrics file creation the batch file is shipped with MagicDraw installs (data/report/conf/fonts/fontMetricsFile.bat). Usage example: "fontMetricsFile.bat C:\WINNT\Fonts\tahoma.ttf tahoma" The font metrics file "tahoma.xml" will be created. NOTE All font metrics files must reside in the "data/report/conf/fonts" directory.

2. Registering fonts FOP should know how to find and use the font metrics files. It is done by registering them. Add entries for your custom fonts, regardless of font type, to the configuration file (data/report/conf/userconfig.xml) in a manner similar to the following:

After registering fonts it is possible to use them in PDF and/or PS reports. For more detailed information please follow the link: http://xml.apache.org/fop/fonts.html.

Report Generator Tool

S TARTING REPORT GENERATOR Report generator launcher is generate_reports.exe. It requires to pass project and config parameters. Project parameter value is path to project file. config parameter value is path to report configuration file. For example: generate_reports.exe -Dproject=c:\test\project.xml.zip - Dconfig=c:\config.properties

G ENERATING CONFIGURATION FILE Configuration file contains report generation options. Configuration file can be generated in the Report: open the Report, select all needed options and click Save Configuration button to save the selected options. Configuration file options: Option Name Description GENERATE_ALL_DIAGRAMS true to generate all project diagrams otherwise generate diagrams listed in DIAGRAM_LIST option. GENERATE_RECURSIVELY Generate recursively: true or false PAGE_SIZE Report page size for *.rtf, *.pdf, and xsl_fo output formats. REPORT_STYLE Style name

© 2005 No Magic, Inc 10-350 1 TOOLS Class Diagram Wizard

Option Name Description REPORT_PACKAGES Package ID, separated by commas. If no value is specified, the report is generated for root package (Data package) REPORT_FILE Name of the report, which also shows the directory of the report where the generated report will be save, e.g. C:\Reports\shop\index.html IMAGE_FORMAT Image format: PNG or JPG REPORT_PROPERTIES Template of the report: e.g. for Model Report: Built-In, Behavioral Model Report, or Static Model Report. REPORT_TYPE Name of the used report type: Model Report, Use Case Report, Software Design Description, or Model Extension Report. DIAGRAM_LIST List of diagrams to generate, if GENERATE_ALL_DIAGRAMS value is false. Values are diagram ID separated by comma. OUTPUT_FORMAT Output format: HTML_BROWSABLE, HTML_PRINTABLE, RTF, PDF, XSL_FO, or PS Generated reports are placed in the same directory where MagicDraw UML is installed or you may choose other directory.

CLASS DIAGRAM WIZARD The Class Diagram Wizard helps you create a new class diagram when all classes and their relationships are already created and specified. You may choose which classes, packages, and relationships will be included in a new class diagram, and the details of class representation (attributes, operations, accessibility) to be configured. The Class Diagram Wizard frees you from creating the class diagram manually. The Class Diagram Wizard, along with its dialog boxes, guide you through several steps and collect information along the way. It will automatically create a new class diagram and all the necessary elements.

To start the Class Diagram Wizard

1 From the Tools menu, choose Model Visualizer. The Model Visualizer dialog box opens. 2 From the wizards list, select the Class Diagram Wizard.

10-351 © 2005 No Magic, Inc. TOOLS 1 Class Diagram Wizard

3 Click Start. The Class Diagram Wizard opens.

Figure 5 -- Class Diagram Wizard. Diagram name Type or leave the default the name of a new diagram in the Type Class Diagram name text box. Choose the package that will contain the created diagram. The hierarchy of UML model packages is displayed in the Select package for diagram list window. Choose the package that will be the parent for the newly created diagram from the Data tree or create a new package by clicking the New button. When you select the Specify name and package option, the following functions are available:

• Next > - proceed to the next step (in this case, Select Elements.)

• Cancel – cancel the wizard.

© 2005 No Magic, Inc 10-352 1 TOOLS Class Diagram Wizard

• Help – displays MagicDraw Help.

Figure 6 -- Class Diagram Wizard. Select Elements • All list – contains all model elements.

• Selected list – contains the elements that are added to the class diagram. When you select the Select Element option, the following functions are available:

• Add – add selected model elements from the All to the Selected list.

• Add All – add all elements located in the same hierarchy level as the selected element to the Selected list.

• Add Recursively – add all selected elements in the selected package and all elements from nested packages to the Selected list.

• Remove – removes the selected element from the Selected list.

• Remove All – removes all selected elements.

• < Back – return to the previous dialog box.

• Next > – proceed to the next step (in this case, Select relationships.)

• Finish – finish the configuration of your class diagram. All other options will be set by default. The Class Diagram Wizard exits and the created class diagram is displayed.

• Cancel – cancel the wizard.

10-353 © 2005 No Magic, Inc. TOOLS 1 Class Diagram Wizard

• Help – displays MagicDraw Help.

Figure 7 -- Class Diagram Wizard. Select Relationships

Select relationships to include in the class diagram:

• Generalization – relationship between a more general and a more specific element (inheritance, extension).

• Realization – relationship between model elements where one of the elements implements the interface defined by the other model element.

• Association – semantic relationship between classes.

• Dependency – usage relationship between UML model elements. When you select the Select relationships option, the following functions are available:

• < Back – return to the previous dialog box.

• Next > – proceed to the next step (in this case, Specify Symbols Properties.)

• Finish – finish the configuration of your class diagram. All other options will be set by default. The Class Diagram Wizard exits and the created class diagram is displayed.

• Cancel – cancel the wizard.

© 2005 No Magic, Inc 10-354 1 TOOLS Package Dependency Wizard

• Help – display MagicDraw Help

Figure 8 -- Class Diagram Wizard. Specify Symbols Properties Select options for elements to be represented in the class diagram. NOTE If the Suppress Attributes and the Suppress Operations check boxes are selected, the class is displayed only as a rectangular with the class name in it. When you select the Specify symbols properties option, the following functions are available:

• Reset To Defaults - if changes were made to element properties, values will be set to default.

• < Back – return to the previous dialog box.

• Finish – finish the configuration of your class diagram. All other options will be set by default. The Class Diagram Wizard exits and the created class diagram is displayed.

• Cancel – cancel the wizard.

• Help – display MagicDraw Help.

PACKAGE DEPENDENCY WIZARD The Package Dependency Diagram Wizard generates diagrams containing packages (created within a project) and shows the relationships between them. The diagram may reflect

10-355 © 2005 No Magic, Inc. TOOLS 1 Package Dependency Wizard

all packages in the project, or just those chosen. The Package Dependency Diagram Wizard collects all the information needed to both analyze dependencies and to generate a new diagram.

To start the Package Dependency Diagram Wizard

1 From the Tools menu, choose Model Visualizer. The Model Visualizer dialog box opens. 2 From the wizards list, select the Package Dependency Diagram Wizard. 3 Click Start. The Package Dependency Diagram Wizard opens.

Figure 9 -- Package Dependency Diagram Wizard. Diagram name Type the name for a newly created diagram in the Type Class Diagram name text box. Choose the package that will contain the created diagram. The hierarchy of UML model packages is displayed in the Select package for diagram list window. Choose the package that will be the parent for the newly created diagram from the Data tree or create a new package by clicking the Create button.

When you select the Specify name and package option, the following functions are available:

• Next > – proceed to the next step (in this case, Select Packages.)

• Cancel – cancels the wizard.

© 2005 No Magic, Inc 10-356 1 TOOLS Package Dependency Wizard

• Help – display MagicDraw Help

Figure 10 -- Package Dependency Diagram Wizard. Select Package. • All list – contains all packages.

• Selected list – contains all packages that are added to the diagram. When you select the Specify Packages option, the following functions are available:

• Add – add selected package from the All to the Selected list.

• Add All – add all packages located in the same hierarchy level as the selected element to the Selected list.

• Add Recursively – add all selected elements in the selected package and all elements from nested packages to the Selected list.

• Remove – remove the selected element from the Selected list.

• Remove All – remove all selected elements.

• < Back – return to the previous dialog box.

• Next > – proceedsto the next step (in this case, Specify Symbols Properties.)

• Finish – finishes the configuration of your class diagram. All other options will be set by default. The Package Dependency Diagram Wizard exits and the created class diagram is displayed.

• Cancel – cancel the wizard.

10-357 © 2005 No Magic, Inc. TOOLS 1 Package Overview Diagram Wizard

• Help – display MagicDraw Help

Figure 11 -- Package Dependency Diagram Wizard. Specify Symbols Properties Select options for elements to be represented in the class diagram. When you select the Specify symbols properties option, the following functions are available:

• Reset To Defaults - if changes were made to element properties, values will be set to default.

• < Back – return to the previous dialog box. Correct data is entered in the previous step.

• Finish – finish the configuration of your class diagram. All other options will be set by default. The Package Dependency Diagram Wizard exits and the created class diagram is displayed.

• Cancel – cancel the wizard.

• Help – display MagicDraw Help.

PACKAGE OVERVIEW DIAGRAM WIZARD The Package Overview Diagram Wizard allows to create diagram for every package from selected scope (reversed packages). Created diagram displays content of packages – inner packages with inner elements connected with available relations.

© 2005 No Magic, Inc 10-358 1 TOOLS Package Overview Diagram Wizard

To start the Package Overview Diagram Wizard

• Choose the Package Overview Diagram Wizard from the Diagrams menu, Diagram Wizards submenu.

• Invoke the package shortcut menu, choose Tools and then Package Overview Diagram Wizard.

• From the Tools menu, choose the Model Visualizer command. The Model Visualizer dialog box opens. In the wizards list, select the Package Overview Diagram Wizard. Click the Start button.

Figure 12 -- Package Dependency Diagram Wizard. Diagram name Type the name for a newly created diagram in the Type Class Diagram name text box. The Add diagrams into their own package option button -while creating new package overview diagrams, adds diagrams in the same package they are created. The Add all diagrams into selected package - while creating new package overview diagrams, add diagrams in the selected package. Choose the package that will contain the created diagram. The hierarchy of UML model packages is displayed in the Select package for diagram list window. Choose the package that will be the parent for the newly created diagram from the Data tree or create a new package by clicking the New button.

When you select the Specify name and package option, the following functions are available:

• Next > – proceeds to the next step (in this case, Select Packages.)

10-359 © 2005 No Magic, Inc. TOOLS 1 Package Overview Diagram Wizard

• Cancel – cancel the wizard.

• Help – display MagicDraw Help.

Figure 13 -- Package Overview Diagram Wizard. Select Package. Select the packages, which will be represented in new diagram. For every selected package diagram will be created. If some selected package is read-only and package for diagrams is not specified, warning on pressing the Next button will be displayed When you select the Select Package option, the following functions are available:

• < Back – return to the previous dialog box.

• Next > – proceed to the next step (in this case, Define Advanced Options.)

• Cancel – cancel the wizard.

© 2005 No Magic, Inc 10-360 1 TOOLS Package Overview Diagram Wizard

• Help – display MagicDraw Help

Figure 14 -- Package Overview Diagram Wizard. Define Advanced Options Set the advanced properties for elements to be represented in the diagrams. If you want to see created class diagram all elements structure in the created diagram, select the Show all elements option button (default option). If Show only packages option will be selected, only package content class diagram will be created. The Analyze and show package dependencies check box - creates dependencies among, on level packages. Analyzes are performed of all inner elements, recursively by all criteria. The Show inner packages in the package shape check box - displays one level inner packages in every package shape, connected with dependencies. The Assign hyperlinks to created diagrams check box - adds active hyperlink to every package, referenced to inner diagram of this package. When you select the Define Advanced Options option, the following functions are available:

• < Back – return to the previous dialog box. Correct data is entered in the previous step.

• Next > – proceed to the next step (in this case, Select Relationships.)

• Finish – finish the configuration of your diagram. All other options will be set by default. The Package Overview Diagram Wizard exits and the created diagram is displayed.

10-361 © 2005 No Magic, Inc. TOOLS 1 Package Overview Diagram Wizard

• Cancel – cancel the wizard.

• Help – display MagicDraw Help.

Figure 15 -- Package Overview Diagram Wizard. Select Relationships

Select a relationships you wish to include in the class diagram:

• Generalization – relationship between a more general and a more specific element (inheritance, extension).

• Realization – relationship between model elements where one of the elements implements the interface defined by the other model element.

• Association – semantic relationship between classes.

• Dependency – usage relationship between UML model elements. When you select the Select relationships option, the following functions are available:

• < Back – return to the previous dialog box.

• Next > - proceed to the next step (in this case, Specify Symbols Properties.)

• Finish – finish the configuration of your class diagram. All other options will be set by default. The Package Dependency Diagram Wizard exits and the created class diagram is displayed.

• Cancel – cancel the wizard.

© 2005 No Magic, Inc 10-362 1 TOOLS Tools for Analysis

• Help – display MagicDraw Help.

Figure 16 -- Package Overview Diagram Wizard. Specify symbols properties Select options for elements to be represented in the diagram. When you select the Specify symbols properties option, the following functions are available:

• Reset To Defaults - if changes were made to element properties, values are set to default.

• < Back – return to the previous dialog box.

• Finish – finish the configuration of your diagram. All other options will be set by default. The Package Overview Diagram Wizard exits and the created diagram is displayed.

• Cancel – cancel the wizard.

• Help – display MagicDraw Help.

TOOLS FOR ANALYSIS MagicDraw contains tools that help you analyze the relationships between elements created in the UML model. It is also possible to analyze the inheritance and dependency relationships between classes. Select a class in the Browser tree or on the Diagram pane. Choose Tools from the class shortcut menu, and then choose analysis tool.

10-363 © 2005 No Magic, Inc. TOOLS 1 Tools for Analysis

Hierarchy Diagram Wizard

The Hierarchy Diagram Wizard collects largest hierarchies and allows to display every of them as separate diagram or all in one diagram.

To start the Hierarchy Diagram Wizard

• From the Diagrams main menu, choose the Diagram Wizards command and then Hierarchy Diagram Wizard.

• From the Tools menu, choose the Model Visualizer command. The Model Visualizer dialog box appears. From the wizards list, select the Hierarchy Diagram Wizard.

• From the model element shortcut menu, choose Tools and then Hierarchy Diagram Wizard.

Figure 17 -- Hierarchy Diagram Wizard. Specify Name and Package Type the name for a new diagram in the Type diagram name field. Choose the package that will contain the created diagram. The hierarchy of UML model packages is displayed in the Select package for diagram list window. Choose the package that will be the parent for the newly created diagram from the Data tree or create a new package by clicking the Create button.

When you select the Specify name and package option, the following functions are available:

© 2005 No Magic, Inc 10-364 1 TOOLS Tools for Analysis

• Next > – proceed to the next step (in this case, Select Scope.)

• Cancel – cancel the wizard.

• Help – display MagicDraw Help

Figure 18 -- Hierarchy Diagram Wizard. Select Scope Select packages where to search hierarchy elements and add the from the All to the Selected list. When you select the Select scope option, the following functions are available:

• < Back – return to the previous dialog box.

• Next> – proceed to the next step (in this case, Select Hierarchies.)

• Cancel – cancel the wizard.

10-365 © 2005 No Magic, Inc. TOOLS 1 Tools for Analysis

• Help – display MagicDraw Help

Figure 19 -- Hierarchy Diagram Wizard. Select Hierarchies. The Add all hierarchies into one diagram check box creates only one diagram for all selected hierarchies. This option is enabled only if selected hierarchies can be added into one diagram (the same diagram type). All available hierarchies are listed in the Parent Element column. In the Children Count column, number of model elements is presented. The Show outside parent check box shows hierarchies, when derived packages are in the scope, but specializations is from outside scope. The Show outside children check box counts outside derived elements from displayed hierarchies. Otherwise hierarchy will be not fully displayed and diagram may be not valid. When you select the Select hierarhies option, the following functions are available:

• < Back – return to the previous dialog box.

• Next> – proceeds to the next step (in this case, Specify Symbols Properties.)

• Finish – finish the configuration of your class diagram. All other options will be set by default. The Hierarchy Diagram Wizard exits and the generation starts.

• Cancel – cancel the wizard.

© 2005 No Magic, Inc 10-366 1 TOOLS Tools for Analysis

• Help – display MagicDraw Help

Figure 20 -- Hierarchy Diagram Wizard. Specify Symbols Properties Select options for elements to be represented in the diagram. When you select the Specify symbols properties option, the following functions are available:

• Reset To Defaults - if changes were made to elemet properties, values are set to default.

• < Back – return to the previous dialog box.

• Finish – finish the configuration of your class diagram. All other options will be set by default. The Hierarchy Diagram Wizard exits and the created diagram is displayed.

• Cancel – cancel the wizard.

• Help – display MagicDraw Help.

Realization Diagram Wizard

The Realization Diagram Wizard shows table of largest elements groups that realizes some interface.

10-367 © 2005 No Magic, Inc. TOOLS 1 Tools for Analysis

To start the Hierarchy Diagram Wizard

• From the Diagrams main menu, choose the Diagram Wizards command and then Realization Diagram Wizard .

• From the Tools menu, choose the Model Visualizer command. The Model Visualizer dialog box appears. From the wizards list, select the Realization Diagram Wizard.

• From the model element shortcut menu, choose Tools and then Realization Diagram Wizard.

Figure 21 -- Realization Diagram Wizard. Specify Name and Package Type the name for a new diagram in the Type diagram name field. Choose the package that will contain the created diagram. The hierarchy of UML model packages is displayed in the Select package for diagram list window. Choose the package that will be the parent for the newly created diagram from the Data tree or create a new package by clicking the Create button.

When you select the Specify name and package option, the following functions are available:

• Next > – proceed to the next step (in this case, Select Scope.)

• Cancel – cancel the wizard.

© 2005 No Magic, Inc 10-368 1 TOOLS Tools for Analysis

• Help – display MagicDraw Help

Figure 22 -- Realization Diagram Wizard. Select Scope Select packages where to search hierarchy elements and add them from the All to the Selected list. When you select the Select scope option, the following functions are available:

• < Back – return to the previous dialog box.

• Next > – proceed to the next step (in this case, Select Implementations.)

• Cancel – cancel the wizard.

10-369 © 2005 No Magic, Inc. TOOLS 1 Tools for Analysis

• Help – display MagicDraw Help

Figure 23 -- Realziation Diagram Wizard. Select Implementations The Add all implementations into one diagram check box creates only one diagram for all selected realizations. This option is enabled only if selected realizations can be added into one diagram (the same diagram type). All available implementations are listed in the Specialization Element column. In the Implementations Count column, number of model elements is presented. The Show outside specializations check box show realizations, when derived interfaces are in the scope, but specializations is from outside scope. The Show outside implementations check box count outside derived elements from displayed realizations. Otherwise realization will be not fully displayed and diagram can be not valid. When you select the Select Implementations option, the following functions are available:

• < Back – return to the previous dialog box.

• Next > – proceed to the next step (in this case, Spedify Symbols Properties.)

• Finish – finish the configuration of your class diagram. All other options will be set by default. The Realization Diagram Wizard exits and the generation starts.

• Cancel – cancel the wizard.

© 2005 No Magic, Inc 10-370 1 TOOLS Tools for Analysis

• Help – display MagicDraw Help

Figure 24 -- Realization Diagram Wizard. Specify Symbols Properties Select options for elements to be represented in the diagram. When you select the Specify symbols properties option, the following functions are available:

• Reset To Defaults - if changes were made to elemet properties, values will be set to default.

• < Back – return to the previous dialog box.

• Finish – finish the configuration of your class diagram. All other options will be set by default. The Realization Diagram Wizard exits and the created diagram is displayed.

• Cancel – cancel the wizard.

• Help – display MagicDraw Help.

10-371 © 2005 No Magic, Inc. TOOLS 1 Content Diagram Wizard

CONTENT DIAGRAM WIZARD The Content Diagram Wizard generates content of all diagrams, usable in the project.

To start the Content Diagram Wizard

• From the Diagrams main menu, choose the Diagram Wizards command and then Content Diagram Wizard .

• From the Tools menu, choose the Model Visualizer command. The Model Visualizer dialog box appears. From the wizards list, select the Content Diagram Wizard..

Figure 25 -- Content Diagram Wizard. Specify Name and Package Type the name for a new diagram in the Type Content Diagram name text box. Choose the package that will contain the created diagram. The hierarchy of UML model packages is displayed in the Select package for diagram list window. Choose the package that will be the parent for the newly created diagram from the Data tree or create a new package by clicking the Create button. When you select the Specify name and package option, the following functions are available:

• Next > – proceed to the next step (in this case, Parent package.)

• Cancel – cancel the wizard.

© 2005 No Magic, Inc 10-372 1 TOOLS Content Diagram Wizard

• Help – display MagicDraw Help

Figure 26 -- Content Diagram Wizard. Select Diagrams Types. Select what types of the diagrams will be included to the content diagram. When you select the Select diagrams types option, the following functions are available:

• < Back – return to the previous dialog box.

• Next > – proceed to the next step (in this case, Select objects.)

• Cancel – cancel the wizard.

10-373 © 2005 No Magic, Inc. TOOLS 1 Sequence Diagram from Java Source Wizard

• Help - display MagicDraw Help.

Figure 27 -- Content Diagram Wizard. Select diagrams. When you select the Select Diagrams option, the following functions are available:

• Add – add selected objects from the All list to the Selected list.

• Add All – add all packages located in the same hierarchy level as the selected element to the Selected list.

• Add Recursively – add all selected elements in the selected package and all elements from nested packages to the Selected list.

• Remove – remove the selected element from the Selected list.

• Remove All – remove all selected elements.

• < Back – return to the previous dialog box.

• Finish – finish the configuration of your content diagram. All other options will be set by default. The Content Diagram Wizard exits and the created content diagram is displayed.

• Cancel – cancel the wizard.

• Help – display MagicDraw Help.

SEQUENCE DIAGRAM FROM JAVA SOURCE WIZARD The Sequence Diagram from Java Source Wizard enables the visualization of Java method implementation with UML Sequence diagrams. Because UML Sequence diagrams cannot yet show Java code with 100% accuracy, MagicDraw provides a mechanism to generate a diagram that reflects essential Java method content.

© 2005 No Magic, Inc 10-374 1 TOOLS Sequence Diagram from Java Source Wizard

To start the Sequence Diagram from Java Source Wizard

1 From the Tools menu, choose Model Visualizer. The Model Visualizer dialog box opens. 2 From the wizards list, select the Sequence Diagram from Java Source Wizard. 3 Click Start. The Sequence Diagram from Java Source Wizard opens. • From the Diagrams menu, choose Diagram Wizards, then Sequence Diagram from Java Source Wizard.

• Create a class with operation. Create a new code engineering Java set. Add a class to this set. In the Browser, Code engineering sets tree, select the RTMethod node. From its shortcut menu, select Reverse Implementation. The Sequence Diagram from Java Source Wizard opens (method is selected in wizard).

• Create a class with operation. Select the operation in the Browser. From the operation shortcut menu, choose the Reverse Implementation command. The Sequence Diagram from Java Source Wizard opens (method is selected in the wizard).

• In the Sequence diagram, create call message. Select it on the diagram pane. From the message shortcut menu, choose Reverse Implementation. The Sequence Diagram from Java Source Wizard opens (method is selected in wizard).

Figure 28 -- Sequence Diagram from Java Source Wizard. Specify Name and Package In the Type diagram name text box, type the name for a new sequence diagram. By default, the name of the class and method is assigned to the sequence diagram.

10-375 © 2005 No Magic, Inc. TOOLS 1 Sequence Diagram from Java Source Wizard

Choose the package that will contain the created diagram. The hierarchy of UML model packages is displayed in the Select package for diagram list window. From the Data tree, choose the package that will be the parent for the newly created diagram, or create a new package by clicking New. When you select Specify Name and Package, the following functions are available:

• Next > – proceed to the next step (in this case, Select Operation.)

• Cancel – cancel the wizard.

• Help – display MagicDraw Help

Figure 29 -- Sequence Diagram from Java Source Wizard. Select Operations. Select the operation, which will be displayed in the sequence diagram. When you start the wizard from either the operation shortcut menu or the Sequence diagram, both the operation and Java source file are selected by default. In the Select Java source file field, specify the Java source file (if this file cannot be found automatically). When you select Select Operation, the following functions are available:

• < Back – return to the previous dialog box. Correct data, entered in the previous step.

• Next > – proceed to the next step (in this case, Select Classes for Diagram.)

• Cancel – cancel the wizard.

© 2005 No Magic, Inc 10-376 1 TOOLS Sequence Diagram from Java Source Wizard

• Help - display MagicDraw Help.

Figure 30 -- Sequence Diagram from Java Source Wizard. Select Classes for Diagram. Select Classes for Diagram includes the following check boxes: Analyze and split long expressions in diagram - if the expression contains calls and cannot be displayed as a call message, every call is displayed as a separate call message with temporary variable initialization. In the final expression message, these calls are replaced with appropriate temporary variable names. Create return message - displays a return message for every call message. Wrap message text - specifies the maximum message text length in pixels for wrapping longer messages. When you select Select Classes for Diagram, the following functions are available:

• < Back – return to the previous dialog box.

• Next > - proceed to the next step (in this case, Specify Symbols Properties.)

• Finish – finish the configuration of your sequence diagram. All other options are set by default. The Sequence Diagram from Java Source Wizard exits and the created sequence diagram is displayed.

• Cancel – cancel the wizard.

10-377 © 2005 No Magic, Inc. TOOLS 1 Pattern Wizard

• Help – display MagicDraw Help.

Using Specify Symbol Properties, you can select options for the elements to be represented in your sequence diagram. Under this option, the following functions are available:

• < Back – return to the previous dialog box.

• Finish – finish the configuration of your sequence diagram. All other options are set by default. The Sequence Diagram from Java Source Wizard exits and the created sequence diagram is displayed.

• Cancel – cancel the wizard.

• Help – display MagicDraw Help. NOTE: You can extend the created sequence diagram by method: Select the method (message), which you want to be displayed with additional details (this can include referenced classes and other defining methods). Then, from the message shortcut menu, choose Reverse Implementation. The Sequence Diagram from Java Source Wizard opens.

PATTERN WIZARD In MagicDraw, you may find various GOF, Java, Junit, CORBA IDL, and XML Schema design patterns. You may also create new patters and edit existing ones using Java code or JPython scripts. For a detailed description, see MagicDraw Open Api user’s guide.

© 2005 No Magic, Inc 10-378 1 TOOLS Pattern Wizard

To open the Pattern Wizard

• Choose Tools from the class shortcut menu and then choose the Apply Pattern subcommand..

Figure 31 -- Pattern Wizard The Pattern Wizard has three main collections of customizable options, which are represented by hierarchy tree on the left side of the dialog box: Category Design Properties Pattern Gof Adapter Interface Class Templates described in Adapter Class the Design Patterns of Adaptee Class Reusable Object- NOTE The Next > button is activated. Oriented Software In the Adapter Operations screen, add or remove operations you want to use.

10-379 © 2005 No Magic, Inc. TOOLS 1 Pattern Wizard

Category Design Properties Pattern Bridge Abstraction Implementor Implementor is: Abstract Class or Interface Name of Reference Suffix of the Concrete Implementor NOTE The Next > button is activated. In the Deriver Classes screen, add or remove classes you want to use. Composite Component Class Composite Class NOTE The Next > button is activated. In the Composite Operations screen, add or remove operations you want to use. Decorator Component Class Decorator Class Concrete Decorator Class NOTE The Next > button is activated. In the Decorator Operations screen, add or remove operations you want to use. Observer Subject Class Observer Class Concrete Subject Class Concrete Observer Class Proxy Subject Class Proxy Class Real Subject Class NOTE The Next > button is activated. In the Proxy Operations screen, add or remove operations you want to use. Singleton Singleton class Visitor Visitor Class Implementation Style: visit (MyClass), visitMyClass (MyClass) NOTE The Next > button is activated. In the Elements to Visit screen, select classes and interfaces you want to visit.

Java Main Main class Specific Java design patterns

© 2005 No Magic, Inc 10-380 1 TOOLS Pattern Wizard

Category Design Properties Pattern RMI Java RMI classes Remote Interface NOTE The Next > button is activated. In the Remote methods screen, select methods from All to Selected list.

10-381 © 2005 No Magic, Inc. TOOLS 1 Pattern Wizard

Category Design Properties Pattern EJB

Entity Sichronize Names EJB Name EJB Class Remote Interface Home Interface Local Interface Local Home Interface Display Name Large Icon Small Icon Abstract Schema Name Cmp Version Persistence Type Reentrant Primary Key Class

Message EJB Name Driven EJB Class Display Name Large Icon Small Icon Acknowledge Mode Destination Type Subscripting Durability Message Selector Transaction Type

Session Sichronize Names EJB Name EJB Class Remote Interface Home Interface Local Interface Local Home Interface Display Name Large Icon Small Icon Session Type Transaction Type NOTE The Next > button is activated. In the Remote Methods screen, add or remove operations you want to use.

© 2005 No Magic, Inc 10-382 1 TOOLS Pattern Wizard

Category Design Properties Pattern JUnit TestCase TestCase Class JUnit is a regression Create suite() testing framework. It is Create Constructor TestCase(String) used by the developer Create runTest() who implements unit Create setUp() tests in Java. JUnit is Create tearDown() Open Source Software. The provided templates Tested Tested Class let to create the Class TestCase Class constructions, Create suite() implemented in the Create Constructor TestCase(String) JUnit framework. For Create runTest() more information, look Create setUp() at Create tearDown() http://www.junit.org. NOTE: The Next > button is activated. In the Tested Operations pane, add or remove operations you want to use. XML Schema XSD Target Class Specific XML design complex Content: XSDcomplex content, XSDsimple patterns Type content. XSD Target Class compositor Compositor: XSDall, XSDchoice, XSDsequence Particle XSD Target Class simpleType Content: XSDrestriction, XSDlist, XSDunion XSD Target Class simpleType Item Type (XSDlist) XSD Target Class simpleType (XSDunion) Simple Target Class XSD Stereotype: XSDsimpleType, XSDsimpleContent restricton Base Min Exclusive Max Exclusive Max Inclusive Min Inclusive Total Digits Fraction Digits Length Min Length Max Length White Space Pattern

10-383 © 2005 No Magic, Inc. TOOLS 1 Pattern Wizard

Category Design Properties Pattern WSDL Binding Use the Binding pattern when you want to Specific WSDL design create binding of some PortType. pattern CORBA IDL Interface Name Specific CORBA IDL Abstract design patterns Local Interface Value Type Name Abstract Custom Value Type Type Name Definition Type Definition Specifier: typedef, boxed value Base Type Sequence Name Base Type Sequence Size Anonymous Array Name Base Type Array Size Anonymous Fixed Name Digits Scale Anonymous Union Name Discriminator Type Enume Name ration Struct Name Exception Name < Back Go back to the Pattern screen. Next > Go to the other appropriated screen. Finish Finish and implement the wizard. The appropriated classes and interfaces are created. Cancel Cancel the wizard without implementing your actions. Help The MagicDraw Help is displayed.

© 2005 No Magic, Inc 10-384 1 TOOLS Creating Setters / Getters

CREATING SETTERS / GETTERS Setters and getters are common operations that contain almost every class. With the help of MagicDraw UML, set and get operations for class attributes can be generated automatically.

To create a setter or getter

• From the shortcut menu of the selected class, choose Tools, and then choose Create Setters/Getters. The Select Attributes/Association Ends dialog box appears.

• Add a tagged value "getter/setter for attribute=attribute_name" to the selected class.

Figure 32 -- Select Attributes dialog box Box Function All Contains names of all attributes defined within the selected class. Selected Contains the selected attributes. > Moves the selected attribute from the All list to the Selected list. Setter for that attribute will be generated. < Moves selected attribute from the Selected list to the All list. >> Moves all attributes from the All list to the Selected list. Setters for all of them will be generated. << Moves all attributes from the Selected to the All list. Prefix to Remove Type a prefix of an attribute (-, ….) you want remove while generating setters or getters. Create Setters Generates setters for the selected attributes.

10-385 © 2005 No Magic, Inc. TOOLS 1 Implementing or Overriding Operations

Box Function Create Getters Generates getters for the selected attributes. Prefix for Setter Choose a prefix for the generated setter (operation). Possible choices: set or Set Prefix for Getter Choose a prefix for the generated getter (operation). Possible choices: get;is, Get;Is; get, or Get. NOTE Get is used for every getter, is is used if the type of an attribute is set as Boolean. OK Generates setters or/and getters for attributes that are in the Selected Items list. Cancel Exits the dialog box without any changes. Help Displays MagicDraw Help The names of created operations (setters) are combined according to the following format: public void set + ( ) For example, if you have an attribute called x of type int, then the generated setter will look that way: public void setx (int x) The names of created operations (getters) are combined according to the following format: public get + ( ) For example, if you have an attribute called x of type int, then the generated setter will look this way: public int getx ();

IMPLEMENTING OR OVERRIDING OPERATIONS When you inherit classes from the base class, which has abstract functions, you have to redefine them in the inherited classes. The implement/override operations tool will help you generate operations that are defined as abstract in the base class. The command Implement/Override Operations command can be invoked in 2 cases:

• When one classifier inherits operations from the base classifier (Generalization relationship).

• When some classifier implements Interface (Realization relationship).

© 2005 No Magic, Inc 10-386 1 TOOLS Model Transformation Wizard

To start the Implement/Override Operations tool From the shortcut menu of the selected class, choose Tools. Then, choose Implement/Override Operations. The Select Operations to Implement/Override dialog box appears.

Figure 33 -- Select Operations to Implement/Override dialog box Box Function All Contains names of all operations defined within the selected class. Selected Contains the selected operations. > Moves the selected operation from the All list to the Selected list. < Moves selected operation from the Selected list to the All list. >> Moves all operations from the All list to the Selected list. << Moves all operations from the Selected to the All list. OK Generates operations that are in the Selected list. Cancel Exits the dialog box without any changes. Help Displays MagicDraw Help

TIP!: Double-click the item name, and it will be moved to the opposite list.

MODEL TRANSFORMATION WIZARD Model transformation is a data set that describes the action of applying model transformations to a set of packages. Components of model transformation include transformation types, parameters, packages set to transform, and the destination for the model transformation.

T YPES OF TRANSFORMATIONS Transformations can be categorized by the formats, models, and other entities they are being transferred from and to:

10-387 © 2005 No Magic, Inc. TOOLS 1 Model Transformation Wizard

• Any to Any - copies all or part of your model to another package without making changes. You can also change the destination model by applying transformation mapping rules.

• UML to XML Schema - creates XML Schema models from pure UML models. Once the source model is copied, the necessary stereotypes are applied according to the XML schema modeling rules.

• XML Schema to UML - creates a pure UML model from the XML Schema. The source model is copied, but stripped of all unnecessary stereotypes. Because it derives abstract models from more specific ones, reverse transformation can occasionally lose information in the destination model.

• Generic DDL to Oracle DDL - creates more specific Oracle DDL models from Generic DDL. In this transformation, mapping will be performed using appropriate Oracle DDL types.

• UML to Generic DDL - creates generic DDL models from UML models. Once the source's elements are copied to the destination, the appropriate stereotypes are applied. This transformation works only with classes, packages and association relationships.

• UML to Oracle DDL - creates Oracle DDL models from UML models. Mapping is performed using appropriate Oracle DDL types.

• DDL to UML - derives UML models from DDL models.

M ODEL TRANSFORMATION WIZARD

To start the Model Transformation Wizard

• From the Tools main menu, choose Model Transformations.

• Select the package(s). From the shortcut menu, choose Tools and then choose Transform.

© 2005 No Magic, Inc 10-388 1 TOOLS Model Transformation Wizard

Figure 34 -- Model Transformation Wizard. Select transformation type Transformation types are displayed in the list window. The following operations are available in the Select transformation type window:

• Next > – proceed to the next step step (in this case, Select source/destination.)

• Cancel – cancel the wizard.

• Help – display MagicDraw Help.

Figure 35 -- Model Transformation Wizard. Select source/destination

10-389 © 2005 No Magic, Inc. TOOLS 1 Model Transformation Wizard

The Transformation Source tree displays all project data - the packages and their inner elements - which can be selected as sources for transformation. Select the Place transformation model in package option button to specify the package to which the source will be transformed. Click the '...' button to display the Destination Package dialog box. Select an existing package from the Packages tree or create a new one. Select the Transform in place option button if you want the source package structure to correspond to the destination package. The following operations are available in the Select source/destination window:

• < Back – return to the previous dialog box.

• Next > – proceed to the next step (in this case, Select type mappings.)

• Finish – finish the transformation configuration. All other options will be set by default. The Model Transformations Wizard exits and transformation results appear in the project.

• Cancel – cancel the wizard.

• Help – display MagicDraw Help.

Figure 36 -- Model Transformation Wizard. Select type mappings To see a list of the default or manually created mapping profiles, click the down arrow in the Transformation type map field. These mapping profiles specify which mapping rules should be applied to the model during transformation. The From type and To type fields display the selected transformation profile's type mappings. The Run type mapping in reverse order check box creates opposite type mapping in transformations. The following operations are available in the Select type mapping window:

© 2005 No Magic, Inc 10-390 1 TOOLS Model Transformation Wizard

• < Back – return to the previous dialog box.

• Next > – proceed to the next step - Specify transformation details. (This button is disabled during Any to Any transformations.)

• Finish – finish the configuration of transformation. The Model Transformations Wizard exits and transformation results appear in the project.

• Cancel – cancel the wizard.

• Help – display MagicDraw Help.

Figure 37 -- Model Transformation Wizard. Specify transformation details The Transformation Details table displays a specific transformation's various properties (selected in Step 1 of the Model Transformation Wizard). Here you can change the element's default value. Click Reset to Defaults to change transformation properties to default values. The following operations are available in the Specify transformation details window:

• < Back – return to the previous dialog box.

• Finish – finish the transformation's configuration. The Model Transformations Wizard exits and transformation results appear in the project.

• Cancel – cancel the wizard.

• Help – display MagicDraw Help.

M ODEL TRANSFORMATION MAPPING When transforming your model, you can map the types used in the transformation's classes. This mapping is usually used to map primitive types from one domain to appropriate primitive types in another domain.

10-391 © 2005 No Magic, Inc. TOOLS 1 Model Transformation Wizard

The map is a collection of rules framed by the "from type - to type" relationship. The following elements can be used in creating mapping rules. They are stored in the Model Transformation Profile.

To create transformation mapping rules

1 Import or use Model_Transformation_Profile.xml.zip. 2 Apply the stereotype named <> to the newly created rules package. 3 Choose the standard types which will be used in transformation mapping, then create the desired dependency relationship between the two types. Apply the stereotype named <> to the dependency.

In the example above, after the transformation, all int types will be transformed to char. NOTE: To change behavior of the mapping, See “Transformation Mapping Options” on page 392. 4 Start the Model Transformations Wizard. In Step 3, select type mapping, click the Transformation type map profile field and choose the package containing mapping rules. 5 Click Finish. Transformation mapping, as specified by the newly-created rules, will be performed on the transformed model.

T RANSFORMATION MAPPING OPTIONS To change a mapping behavior, set appropriate tags on the dependency relationship:

© 2005 No Magic, Inc 10-392 1 TOOLS Model Transformation Wizard

• Default type mapping can be applied both ways. For example, you can use the type map from int to char to change all int types to char. But if you select the Run type mapping in reverse order check box under Select type mappings (Step 3 of the Model Transformation Wizard), the type map will be applied in reverse order - all char will be changed to int. To change this, create a value for the direction tag in the Dependency Specification dialog box, Tags tab. The default value is "both". Change this value to "forward" to make this mapping valid for forward dependencies. Change the value to "reverse" to have this mapping valid for reverse dependencies.

• To apply this order of direction for all dependencies, set the defaultDirection tag value in the Package Specification dialog box. This package contains the <> stereotype. Initially, the <> dependency's direction tag is checked. If not found <> package's defaultDirection tag value is set.

• You may have several <> relationships from one source, or to one destination. In these cases, the "default" tag for at least one of the relationships must be set. Dependencies from one source without (or with several) default tags are invalid. Also dependencies to one destination with "reverse" or "both" direction order set must have one with default tag.

• Transitive mapping for the elements (for example, Type1 -> Type2 -> Type3) is not supported.

• You may also control mapping behavior for the source model's type inheritance. By default, derived subtypes are also mapped by the rule governing the parent type (unless, of course, they have their own rules for mapping). If the blockInheritedSourceTypes tagged value is set, derived types are not affected by this rule.

Here T1, T2, and T5 are types in the source domain, while T2 and T4 are types in the destination domain. Given these two mappings (T1 ->T2 and T3 ->T4), the following statement is true: T1, and all types derived from it (such as T5), are mapped to the T2 type, except T3 and any of the types derived from it. These types are mapped to T4.

10-393 © 2005 No Magic, Inc. TOOLS 1 Model Transformation Wizard

Now consider an example where blockInheritedSourceTypes is set:

In this case, T3, along with the types derived from it, are still mapped to T4. T1 is still mapped to T2. However, unlike the previous example, T5 and all the types inherited from T1 are NOT mapped to T2.

• You can also control the mapping behavior of the type inheritance in the destination model. This is only effective on the second (and successive) applications of the transformation. By default, derived subtypes in the destination model are not overwritten, since they are considered suitable substitutes of their parent.

Here T1 is a type in the source domain, while T2 and T4 are types in the destination domain. Given this mapping (T1 ->T2), on the first application of the transformation, type T1 residing in the source model will be mapped to type T2 in the destination model. Now let us look at a case where the user refines the destination model - changing the type on the destination model attribute from T2 to - T4. This situation is quite common: for example, the user refines an attribute type from string to basic URI in the XML schemas, or from Integer to nonNegativeInteger, and so forth). In essence, the mapping for inherited types of T2 is performed as if there was a mapping T1->T2 (default), T1->T4, T1-> any_other_type_inherited_from_T2.

© 2005 No Magic, Inc 10-394 1 TOOLS Model Transformation Wizard

Now consider what happens when we apply the blockInheritedDestinationTypes tagged value:

In this case, type T4 has no special treatment. If the user applies the transformation, T1 is mapped to T2. In another scenario, the user refines the destination model, changing the attribute type from T2 to T4. If the user now reapplies (updates destination) the transformation, the attribute type is overwritten: T4 is reset back to T2. When the user loads the type map in reverse direction, roles of the "blockInheritedSourceTypes" and "blockInheritedDestinationTypes" are transposed (unless of course the "direction" mandates that this mapping is not used in reverse direction).

• The special type EmptySourceType is used to indicate that the attributes with no type should be mapped with this dependency.

• The special type EmptyDestinationType is used to indicate that the attributes in the destination classes should have no type after remapping (type removal).

• The special type AnySourceType - is a template that matches any type in the source model (see mapping rules for type inheritance). By using this type, together with the inheritance mapping rules, the user can specify that any other types not defined by the mapping should be interpreted by this mapping. According to this rule, any other type in the source model should be stripped in the destination model.

• The special type AnyDestinationType is a template that matches any type in the destination model (see mapping rules for type inheritance).

M ODEL TRANSFORMATION UPDATE When reapplying a transformation, relationships are retrieved from storage and used to find the model elements in the destination model corresponding to the given model element in the source model. The presence of unmapped model elements in the source model indicates that these are newly added elements. Apply the usual rules for the transformation using the same behavior as would be appropriate if this was the first application of the transformation. If the model elements already contain mapping, then the user can either update the mapped element's properties or leave the transformation model intact.

10-395 © 2005 No Magic, Inc. TOOLS 1 Metrics

To update a transformed model

• From the destination package shortcut menu, choose Tools and then choose Update Transformed Model. The Model Refresh Options dialog box opens:

Figure 38 -- Model refresh options dialog box The Change destination properties according to source option overwrites elements properties in the destination model with properties from the source model (but only elements connected with mapping dependencies). The Leave destination properties intact option does not overwrite properties in the destination model with properties from the source model (retaining changes made to the destination model while ignoring changes made to the source model). NOTE: This update option works only with data for elements that have already been created (renaming, changing type, and so forth), and which contain type mapping dependencies. If new elements are added to the source, once the update occurs, copies of the new elements will be created in the destination model. If an element is deleted from the source, it will not be removed from the destination after the update.

METRICS MagicDraw's metrics functionality, which is implemented as a plugin and accessible through Open API, enables you to measure your project from three different viewpoints:

• UML model metrics

• System metrics

• Requirements metrics. Using UML model metrics, you can measure your project using package, class, and diagram measurements (for example, measuring the number of classes, inheritance tree depth, and so on). System metrics analyze models using the most popular object oriented project metrics: Halstead, McCabe, Chidamber, and Kemerer defined metrics (for example, cyclomatic complexity and weighted methods per class. Requirements metrics consist of function points and use case metrics. These two metrics groups are so structurally similar that use case metrics are regarded as a subset of function points metrics. Use case metrics measure both the number of use cases in a project and the user case analysis through selected tagged values (priority, for example).

© 2005 No Magic, Inc 10-396 1 TOOLS Metrics

The results of these analyses are displayed in table, where you can select which metric you would like displayed. You can also export the metrics to a separate file. Metrics are implemented as a plugin and are accessible through Open API. A metric is a numeric value that measures a model or is counted according to model measuring. Each metric has both a lowest and highest limit specified. Metrics that fall outside of this range are marked:

• Values that are too low are displayed in a blue font

• Values that are too high value are displayed in a red font. Note: if the highest limit equals zero, the metric is never marked as too high.

Metric Suites

In MagicDraw, you can create your own metric suites or use one of the three predefined metric suites: System Metrics, UML Model Metrics, and Requirements Metrics. The metric suites contain the list of metrics that will be counted and the specified properties for each selected metric. To create your own metric suites, clone an existing suite and specify the suite properties. You can edit the predefined metrics suites, and all metric suites can be imported or exported, facilitating the exchange of ideas with other users.

Displaying Metrics

Metrics are counted according to properties defined in a selected metric suite and can be counted for an entire project or just selected packages, classes, interfaces or diagrams. The results are displayed in the Metrics window, which appears at the bottom of MagicDraw application window. The Metrics window contains two tabs:

• Data tab.The selected suite's counted metrics are displayed in a metrics table, which includes counted metrics only.

• Graphics tab. The selected metric is displayed as a graphic. Metrics tables display packages, classes, interfaces and diagrams. Additionally, elements that contain packages, classes, interfaces and diagrams, as inner elements, which are displayed using a tree structure, are not counted for these elements. The following is an example of a metrics table structure:

Model Element Metric1 Metric2 Metric3 … …. MetricN

PackageA value value value value value value

10-397 © 2005 No Magic, Inc. TOOLS 1 Metrics

The following is an example of a metrics table structure:

Inner class1 value value value value value value

Inner class2 value value value value value value

If a value is not counted for a class, interface, package, or diagram, the cell is left empty. You can apply the following filters to the metrics table:

• All

• Packages

• Classes (classes and interfaces are displayed)

• Diagrams

• Package Violations (only rows that contain package violations are displayed)

• Class Violations (only rows that contain class or interface violations are displayed) When the Classes, Diagrams, or Class Violations filters are selected, the owner is displayed next to the following element: c1 (Classes::Package1)

Starting Metrics

To start Metrics: Click Metrics on the Tools menu, or on the class/package/interface/diagram shortcut menu, click Tools and then click Metrics. The Metrics dialog box opens.

Figure 39 -- Metrics dialog box Element Desription Metrics Suite Lists all the available metrics suites.

© 2005 No Magic, Inc 10-398 1 TOOLS Metrics

Calculate For Lists two values: • Whole Project – calculates metrics for the entire project. • Selection – calculates metrics for selected items only. Click the "…" button to open the Select Elements dialog box. Metrics Options Opens the Metrics Options dialog box. Calculate Opens the Metrics window.

10-399 © 2005 No Magic, Inc. TOOLS 1 Metrics

To set element options for Metrics, click the "…" button to open the Select Elements dialog box:

Figure 40 -- Select Elements dialog box Packages, classes and diagrams are displayed in the Select Elements dialog box. If you select the box next to a parent element (for example, the Data check box in the image above), all its related child elements are automatically selected. Conversely, clearing the box next to a parent element clears all its related child elements. If you clear the box next to a child element, the parent box is also cleared. For example, if the Data box is selected, all its related child elements are selected. If you then clear the Package View box, its child elements are also cleared, as is the box next to Data, but all the other boxes remain selected.

© 2005 No Magic, Inc 10-400 1 TOOLS Metrics

M ETRICS WINDOW The Metrics window is implemented as a JIDE GUI window. Like the Messages window, it is available at the bottom of the MagicDraw application window.

Figure 41 -- Metrics window GUI element Desription Expand Current Expands all elements in the selected branch within the results table. Branch Collapse Current Collapses all elements in the selected branch within the results Branch table. Refresh Recalculates metrics results according to the current model. Metrics Options Opens the Metrics Options dialog box. Export Opens the Export Metrics dialog box. Compare Metrics Opens the Open dialog box, where you can select a text file to With… compare with the currently open metric set. Print Prints the metrics table. The Print dialog opens. Filter Contains these values: • All • Packages • Classes • Diagrams • Package Violations • Class Violations Selected metrics rows or cells can be copied to the clipboard by clicking Copy on the shortcut menu or by Ctrl+C on your keyboard.

Exporting Metrics

You can export selected metrics rows and columns, or the entire metrics table, to the metrics results file. Metrics results may be exported using *.txt and *.html formats.

10-401 © 2005 No Magic, Inc. TOOLS 1 Metrics

In the following example, metrics are presented in *.txt format and are separated by tabs:

Element Metric1 Metric2 Metric3 …. MetricN Package Package1 value value value …. Value Class class1 (Package1::class1) value value value …. Value Class class2 (Package2::class2) value value value …. Value

Here Metric1 .. MetricN – the metric name abbreviation. Technical information is displayed at the bottom of the file. Text "Element IDs" are added after the elements' metrics and are also printed. This information is needed for metrics comparison.

In the following example, information is presented in *.html format:

Metrics Report

Element Metric1 Metric2 Metric3 …. Metric N

Package Package1 (Package1) value value value …. Value

Class class1 (Package1::class1) value value value …. value

Here Metric1 .. MetricN – the metric name abbreviation. Each metric name is hyperlinked with its metric description. Metric descriptions can be opened in a separate window after clicking the hyperlink. NOTE: *.html format is best suited for viewing metrics. If you want to copy the metrics table to another program, use the *.txt format. To export Metrics, click the Export Metrics button in the Metrics window. The Export Metrics dialog box opens:

Figure 42 -- Export Metrics dialog box Element Description Metrics Output Displays the path and file names of the metrics results output file. File: Click the "…" button to select the location and file.

© 2005 No Magic, Inc 10-402 1 TOOLS Metrics

Output Type: Contains these values: • Text (*.txt) • HTML (*.html) Export Selected When selected, only selected table rows and the header row are Rows Only exported. When cleared, the entire metrics table is exported.

Comparing metrics

Counted metrics can be compared with metrics that are saved in a *.txt file. Metrics can be compared only when the metrics window is open. Comparison results are displayed in the same metrics table. If a cell contains a metric that has increased, it has a red fill color. If the metric has decreased, a blue fill color is used. Metrics that are not found in other file cells have a grey fill color. Metrics comparisons can be canceled using the ESC key.

Metrics Options

Metrics suites are managed in the Metrics Options dialog box.

To open the Metrics Options dialog box:

• From the Tools menu, choose Metrics and then Metrics Options

• In the Metrics dialog box, click Metrics Options. The left pane of the Metrics Options dialog box displays defined metrics suites. Using the buttons or shortcut menu, metrics suites can be cloned, renamed, removed, exported, and imported. Predefined metrics sets cannot be renamed or removed. Suite properties are displayed in the right pane:

10-403 © 2005 No Magic, Inc. TOOLS 1 Metrics

Figure 43 -- Metrics Options dialog box Element Description Metrics suites list Displays all created metrics suites in a list. Metrics suites list • Clone – clone the selected suite. buttons: • Rename – rename the selected suite. Clone • Remove – remove the selected suite. Rename • Import – import new suite. The Open dialog box opens. Remove • Export – export the selected suite. The Save dialog box opens. Import All these commands are available from each metric suite shortcut menu. Export Metrics tree Use this tree to select the metrics you want included in your metrics suite. All metrics are displayed in the metrics tree. Properties list Metrics properties are displayed individually for each property. Select All Selects all metrics. Clear All Clears all metrics.

© 2005 No Magic, Inc 10-404 1 TOOLS Metrics

Reset to Default Predefined MagicDraw metrics are reset to the default metrics suite. User-created metrics suites are reset to the selected predefined metrics suite. The Reset Metrics Suite Properties dialog box opens:

Description Displays the selected metric description. OK Saves all changes and closes the dialog box.

Metrics Properties

Properties Property Description Group General Calculate Defines what shall be counted: • Local – inside package (class). • Global - inside package (class) recursively • Average – metrics shall be counted from the lowest level of the elements tree. Each upper level metric shall be counted as an average of the current object metric and all lower level metrics: Average_element_metric = (Element_metric_value (if counted separately) + sum (inner_elements_metrics_values)) / (1 (if element_metric_value was counted) + count_of_inner_elements_that_have_metrics_counted) Average metric value should be rounded into the lower value (for example, 1.5 = 1, 1.6 =2) • Min – lowest level metrics shall be counted. Each upper level metric shall be set to the minimum of current object metric and all lower level metrics (except the metrics that are equal 0). Min_element_metric = min (Element_metric_value, min (inner_elements_metrics_values)) Here metric_value > 0 • Max – lowest level metrics shall be counted. Each upper level metric shall be set to the maximum of current object metric and all lower level metrics. Max_element_metric = max (Element_metric_value, max (inner_elements_metrics_values)) Here metric_value > 0

10-405 © 2005 No Magic, Inc. TOOLS 1 Metrics

Properties Property Description Group Lowest limit Package Recommended lowest metric value for the package. Editable. Class Recommended lowest metric value for class and interface. Editable. Diagram Recommended lowest metric value for the diagram. Editable. Highest limit Package Recommended highest metric value for package. Editable. Note: if highest limit is equal 0, the metric is never marked as too high (in red font color). Class Recommended highest metric value for class and interface. Editable. Note: if highest limit is equal 0, the metric is never marked as too high (in red font color). Diagram Recommended highest metric value for diagram. Editable. Note: if highest limit is equal 0, the metric is never marked as too high (in red font color). Include This properties group specifies whether the information is included when counting metrics. Weight This properties group specifies whether the information is included when counting metrics. The following is an example of a metrics calculation used for calculating the number of classes (NC) in this tree:

Calculated metric values with a different aggregation:

Element Local Global Average Min Max

Top 1 8 112

Inner1 2 4 122

C1 0 0 000

C2 2 2 122

c_in1 0 0 000

© 2005 No Magic, Inc 10-406 1 TOOLS Metrics

Calculated metric values with a different aggregation:

c_in2 0 0 000

Inner2 1 3 112

C3 2 2 122

c_in3 0 0 000

c_in4 0 0 000

C4 0 0 000

10-407 © 2005 No Magic, Inc. USER REFERENCE 9

MENU SYSTEM

File menu

Command Button Function /Hot keys New Project Creates a new project. A project is nameless until you close or save it by choosing the Save Project or Save Project As commands. CTRL+N You may simultaneously create as many new projects as you wish, without saving and closing the previous created or opened projects. You may work only with one opened or created project simultaneously. If you wish to work with another project, select the project name in the Projects list on the main window toolbar. New From Template Creates a new project based on a template. The project contains the C++ and Java classes that are most frequently used. The New From Template dialog box appears. Open Project Opens an existing project. The Open dialog box appears. Select a project you wish to open. You may open as many projects as you wish. If you wish to work with another project, just CTRL+O select project name in the Projects list on the main window toolbar.

Save Project Saves the opened project. To save the current project for the first time, type the name of the project and select the type of the file you wish to save the project. CTRL+S Save Project As Saves the project giving it a name. Use this command to save the current project for the first time or under a different name, the Save dialog box appears. Type the name of the project and select the type of the file you wish to save the project.

© 2005 No Magic, Inc. 9-432 9 USER REFERENCE Menu System

Command Button Function /Hot keys Close Project Closes the opened project. If the opened project has unsaved changes, the MagicDraw UML displays a message box asking whether the changes should be saved or not before the project is closed. Close All Projects Closes all opened projects. If the opened projects have unsaved changes, the MagicDraw UML displays a dialog box asking whether the changes should be saved before the each project is closed. Import The Import dialog box appears. Select the project you wish to import. You may import as many projects as you wish. Imports an existing project to a previously opened project. This is the recommended command for importing an existing project to the teamwork server.

Use Profile/Module The Use Profile/Module dialog box appears. Choose profile or module for using it in the project. Export • Share Packages - saves the package as a separate module/profile. • Profile/Module - saves the content of the selected objects into a separate file. • Template - saves the current project as template project. Save As Image Saves the opened diagram as image of various formats. The Save As Image command is used for saving any item or the groups of items selected in the diagram pane in the various image files. Print The Print dialog box appears. Print of active diagram, selected symbols or selected diagrams is available. Select the printer, set the options for the printer, specify the number of copies and select the specific CTRL+P pages to be printed. Print Preview Preview the diagram before printing. The Print Preview screen appears.

Print Options The Print Options dialog box appears.

9-433 © 2005 No Magic, Inc. USER REFERENCE 9 Menu System

Command Button Function /Hot keys Project Properties The Project Properties dialog box appears. This dialog box contains information where the project is located, the file size, when it was created and modified for the last time, and the number of diagrams in the project. In the Description tab, type the description of the project or other important information. The Modules tab shows a list of modules, that project is using. The list shows a specified number of recent project files. Specify the number of files in the Recent Files List Size property in the Environment Options dialog box. Projects The list of opened projects. Exit Exits the application.

All opened projects are closed. If the opened projects have unsaved changes, the MagicDraw UML displays a message box asking whether the changes should be saved before closing the project.

Edit menu

The MagicDraw UML allows you to use the Edit menu commands while drawing the diagrams on the Diagram pane. The commands allow selecting, cutting, copying,

© 2005 No Magic, Inc. 9-434 9 USER REFERENCE Menu System

pasting items and entire diagrams, reversing the actions you have taken while drawing, and finding an item in the current project. Command Button/ Function Shortcut keys Undo Reverses the last action you have performed while drawing the diagram on the Diagram pane (moving, dragging, resizing, cutting, copying, pasting, deleting, selecting, editing shapes, setting project and shape CTRL+Z properties, etc.). Actions are reversed in the order you have performed them. The Undo command reverses actions taken before loading the existing project or creating a new project. By default, the limit of the undo mechanism is 100 steps backwards. To change the limit, choose Environment from the Options menu. The Environment Options dialog box appears. Change the Undo List Size property. The Undo command is unavailable until you perform any action after loading the existing project or creating a new project. Each command has an easily recognized name. You will be able to see the command history and undo or redo one action or a group of actions. The main window will have two lists of commands: one for the undo commands, another one for the redo commands. Redo Reverses the action of the Undo command (moving, dragging, resizing, cutting, copying, pasting, deleting, selecting, etc.). The Redo command is unavailable until you use the Undo command. CTRL+Y Cut Cuts the selected items or groups of items on the Diagram pane. The cut items are removed from the Diagram pane and placed in the clipboard. Later they can be pasted back to CTRL+X the Diagram pane of the current or other project. The Cut command is unavailable until you select any item or any group of items on the Diagram pane of the current project. Copy Copies the selected items or groups of items on the Diagram pane.

The copied items are placed in the clipboard. The CTRL+C copied items can be pasted back to the Diagram pane to the other project. The Copy command is unavailable until you select any item or any group of items on the Diagram pane of the current project.

9-435 © 2005 No Magic, Inc. USER REFERENCE 9 Menu System

Command Button/ Function Shortcut keys Paste Pastes the cut or copied items and groups of items from the clipboard to the Diagram pane of the current project. MagicDraw creates shapes for items, or groups of items, in the current project. Use the Paste With New Data CTRL+V command to create new data and shapes in the current project. You may see the data and shapes of the pasted items and diagrams in the Browser window. Paste With CTRL+E Pastes the cut and copied items and groups of items from New Data the Clipboard to the Diagram pane of the current project. MagicDraw creates new data and data shapes in the current project.

Delete Deletes data together with symbol. It is unavailable until you select any item or group of items in the current project.

CTRL+D Delete DELETE Deletes model element’s symbol from the diagrams, by Symbol(s) leaving it in the model. Select All CTRL+A Selects all items on the Diagram pane of a particular project. Copy as CTRL+SHIFT Copies the selected model elements as EMF to the EMF +E system clipboard. If no model elements are selected, copies an active diagram. NOTE Copying as EMF is available only under Windows system. Copy as CTRL+SHIFT Copies the selected model elements as JPG to the JPG +J system clipboard. If no model elements are selected, copies an active diagram. NOTE Copying as JPG is available only under Windows system. Find CTRL+F Opens the Find dialog box. Quick Find CTRL+ALT+ Performs a quick search of class/interface, classifier or F diagram. Find TODO Performs a search for TODO tagged value. Results are displayed in the Browser, the Search Results tab. Find Usages CTRL+ALT+ Finds a list of all elements that reference the current U element. Find CTRL+ALT+ Finds a list of the elements that depend on the current Dependent D element. Elements

© 2005 No Magic, Inc. 9-436 9 USER REFERENCE Menu System

Command Button/ Function Shortcut keys Paths • Path Style - choose the line style for drawing a path: • Rectilinear – drawing rectilinear lines. • Oblique - drawing free form lines. • Bezier - in computer graphics, a curve that is calculated mathematically to connect separate points in smooth, free-form curves and surfaces of the type. • Change Path Style – switches in series between rectilinear, oblique, and bezier path line style. Shortcut keys CTRL+L. • Reset Labels Positions – resets the changed path labels (name, roles, etc.) to the default position. • Remove Break Points – removes the break points of the path and makes the path line straight. Symbol All commands that are available as symbol’s shortcut menu.

9-437 © 2005 No Magic, Inc. USER REFERENCE 9 Menu System

View menu

Command Button / Hot keys Function Fit In Window Reduces the size of the whole CTRL+W diagram to fit better in the Diagram pane. Zoom In To change the zoom step size choose Environment from the Options menu and set the Zoom Step Size property in the CTRL+NUMPAD Environment Options dialog box. PLUS SIGN (+) Zoom Out Decreases the size of the selected objects in the diagram pane by x percent. To change the zoom step size, CTRL+NUMPAD choose Environment from the MINUS SIGN (-) Options menu and set the Zoom Step Size property in the Environment Options dialog box. Zoom 1:1 Restores the original size of the selected diagram symbols.

CTRL+NUMPAD SLASH MARK (/) Zoom To Selection CTRL+NUMPAD Increases the size of the selected ASTERICS MARK model element on the Diagram (*) pane to the maximum visible size. Refresh CTRL+R Repaints all diagram shapes. Grid Set grid options. Every diagram may have its own grid settings: • Show Grid - show/hide grid • Snap Paths to Grid - use/do not use grid for drawing paths. • Snap Shapes to Grid - use/do not use grid for drawing paths. • Grid Size - change the grid size. Type the number. Recently Closed Diagrams F12 Opens the list of the diagrams that were last closed.

© 2005 No Magic, Inc. 9-438 9 USER REFERENCE Menu System

Command Button / Hot keys Function Toolbars: Clear the check boxes of the • Business Process Diagram toolbars you want to hide. • Custom Diagrams • Diagrams • Symbol Editing • Edit • File • Path Editing • Projects • Teamwork • Undo/Redo • View • Save Configuration On Exit • Save Configuration • Save Configuration As Status Line Select the check box of Show Status Bar or Show Memory Monitor to display this info on the status line.

Layout menu

Use the commands of the Layout menu for managing the layout of the shapes on the current Diagram pane. You must select at more than one shape for other Layout menu commands. A class diagram should be opened and activated before using the Class Diagram command in this menu. Command Function Layout Options Opens the Diagram Layout Options dialog box, where layout options of the diagram may be set. Quick Diagram Layout Applies recommended layouter with default options on active diagram. Layout Class Diagram Style Applies layouter, which uses specific layout algorithms to improve class diagram readability. Layout Hierarchic Style Applies layouter that portraits the precedence relation of directed graphs. It is ideal for many application areas, especially for Workflow, Software Engineering, Customer relationship management, Configuration management, Process modeling, Database Modeling, Bio informatics. Layout Tree Style Applies layouter, which specializes in the layout of tree- structured graphs. The need to visualize directed or undirected trees araises in many application areas, e.g. Dataflow analysis, Software Engineering, Network management, Bioinformatics.

9-439 © 2005 No Magic, Inc. USER REFERENCE 9 Menu System

Command Function Layout Orthogonal Style Applies layouter that is well suited for medium sized sparse diagrams. It produces compact drawings with no shape overlaps, few crossings and few bends. All edges will be routed in an orthogonal style, i.e. only rectilinear style links will be used. Layout Organic Style Applies layouter of the organic style graph. Layout Circular Style Applies layouter of the algorithm that portraits interconnected ring and star topologies and is excellent for applications in social networking (criminology, economics, ...), network management, WWW visualization, eCommerce. Route Paths Orthogonal Applies layouter, which routes the links of a diagram Style using only vertical and horizontal line segments, while keeping the positions of the shapes in the diagram fixed. The routed links will usually not cross though any shapes and not overlap any other links. Route Paths Organic Style Applies layouter, which routes the links of a diagram using oblique link style, while keeping the positions of the shapes in the diagram fixed. The routed links will usually not cross though any shapes and not overlap any other links. Make Same Width Lays out the selected shapes according to their width; after the layout, the width of the shapes is equal (according to the widest). Make Same Height Lays out the selected shapes according the their height; after the layout, height of the shapes is equal (according to the highest). Align Aligns the selected shapes: • Right • Aligns the selected shape(s) vertically, starting with the rightmost shape(s). • Left • Aligns the selected shape(s) vertically, starting with the leftmost shape(s). • Top • Aligns the selected shape(s) across from the uppermost shape(s). • Bottom • Aligns the selected shape(s) across from the lowermost shape(s). Center Centers the selected shapes: • Horizontally • Centers the selected shape(s) on a horizontal line. • Vertically • Centers the selected shape(s) on a vertical line. Space Evenly Sets spaces among the selected shapes evenly. • Horizontally • Spaces between the selected shapes become even on • Vertically a horizontal line. • Spaces between the selected shapes become even on a vertical line.

© 2005 No Magic, Inc. 9-440 9 USER REFERENCE Menu System

Diagrams menu

Command Hot keys Function Class Diagrams The Class Diagrams dialog box opens.

CTRL+1 Use Case Diagrams The Use Case Diagrams dialog box opens.

CTRL+2 Communication Diagrams The Communication Diagrams dialog box opens.

CTRL+3 Sequence Diagrams The Sequence Diagrams dialog box opens.

CTRL+4 State Diagrams The State Diagrams dialog box opens.

CTRL+5 Activity Diagrams The Activity Diagrams dialog box opens.

CTRL+6 Implementation Diagrams The Implementation Diagrams dialog box opens.

CTRL+7 Composite Structure The Composite Structure Diagrams Diagrams dialog box opens.

CTRL+8 Business Process Diagrams The Business Process Diagrams dialog box opens.

Time Diagrams The Time Diagrams dialog box opens.

9-441 © 2005 No Magic, Inc. USER REFERENCE 9 Menu System

Command Hot keys Function Struts Diagrams The Struts Diagram dialog box opens.

Oracle DDL Diagrams The Oracle DDL Diagrams dialog box opens.

Web Diagrams The Web Diagrams dialog box opens.

CORBA IDL Diagrams The CORBA IDL Diagrams dialog box opens.

WSDL Diagrams The WSDL Diagrams dialog box opens.

XML Schema Diagrams The XML Schema Diagrams dialog box opens.

Robustness Diagrams The Robustness Diagrams dialog box opens.

Generic DDL Diagrams The Generic DDL Diagrams dialog box opens.

Content Diagrams The Content Diagrams dialog box opens..

Custom Diagrams The Custom Diagrams dialog box opens.

© 2005 No Magic, Inc. 9-442 9 USER REFERENCE Menu System

Command Hot keys Function Diagram Wizards Wizards for creating diagrams may be opened: • Class Diagram Wizard • Package Dependency Diagram Wizard • Package Overview Diagram Wizard • Hierarchy Diagram Wizard • Realization Diagram Wizard • Sequence Diagram from Java Source Wizard • Content Diagram Wizard Previous Diagram Activates the previously opened diagram.

CTRL+0 Next Diagram Activates the next diagram.

CTRL+9 Load All Diagrams If there are unloaded diagrams in the project, this command loads all diagrams.

Options menu

Command Function Project The Project Options dialog box appears. Environment The Environment Options dialog box appears. Look and Feel Changes MagicDraw graphic user interface style. Styles: Metal, CDE/Motif, Windows, Kunststoff. The Look and Feel Themes command allows you to personalize graphic user interface: set your favorite colors and fonts. Interface Style Multiple Windows, Single Window or JIDE interface style.

For more details about dialog boxes, see Section “Dialog Boxes” on page 9-471.

9-443 © 2005 No Magic, Inc. USER REFERENCE 9 Menu System

Tools menu

Command Hot key Function Model Visualizer Opens the Model Visualizer dialog box with a list of all available wizards. Apply Pattern The Pattern Wizard dialog box appears. Create the design pattern for the selected class, interface. Profiles Opens the Profiles dialog box.You may use or export profiles/modules, perform operations (review, edit, add or remove) with stereotypes, tagged values and constraints. Model Transformations Opens the Model Transformations Wizard dialog box with a list of all available transformations. Hyperlinks Opens the Hyperlink dialog where you may add hyperlink to any model elements. Metrics Metrics functionality allows measuring project by different viewpoints. Specify metrics scope in the Metrics Options dialog box. Report Reports diagram information. The Report dialog box appears. Set options for generating the report for either all, or selected model elements of the project. The report is generated in the *.HTML, *.fo, *.pdf, *.ps, * rtf formats file. Every report has the following main parts: • Report title. • Table of contents, which contains links to the description of model elements and their details (name, details, documentation.) • Report body, which lists the details of model elements. • Dictionary. For more details, see Section “Reports” on page 7-386.

Software Design Model Opens the Software Design Model Wizard Enrichment dialog box. Use Case Model Enrichment Opens the Use Case Model Wizard dialog box. Code Engineering Sets The Code Engineering Sets dialog box appears (For more details, see Code Engineering User’s Guide). Compare Projects Opens the Compare Projects dialog box, where you can choose projects to perform model differencing.

© 2005 No Magic, Inc. 9-444 9 USER REFERENCE Menu System

Command Hot key Function Quick Reverse Choose the language you need (Java, Java Bytecode, C++, C#, CIL, CIL Disassembler, IDL, CORBA IDL, DDL, EJB, EJB 2.0, XML Schema, WSDL). The Round Trip Set dialog box appears. (For more details, see Code Engineering User’s Guide). Retrieve DB Structure The Retrieve DB Info dialog box appears. Generate Framework CTRL+G Generates code for the selected items in the current diagram. The Message Window with the information appears (For more details, see Code Engineering User’s Guide). Check Syntax CTRL+T Checks syntax in the model according to the default code engineering language. The Message Window with the information appears. CaliberRM Integration with CaliberRM.

• Login Opens the Login dialog box for login to CaliberRM server. • Logout Logouts from CaliberRM server. • Launch CaliberRM Client Launches CaliberRM Client application. • CaliberRM Requirements Opens the CaliberRM Requirements window in MagicDraw.

9-445 © 2005 No Magic, Inc. USER REFERENCE 9 Menu System

Command Hot key Function CVS Perform operations with CVS (the detailed description about integration with CVS, see MagicDraw Integrations User’s Guide) • Command Line • Allows to enter a CVS command line (like “checkout -c”) when ever the CVS command is not available through the menus. The Command Line dialog box appears.

Figure 164 -- Command Line dialog box • Use this option to checkout from scratch a • Checkout Module new module on your disk. The Checkout Module dialog box appears. • Add Project to CVS • Adds a new project to CVS. The Add Project to CVS dialog box appears. NOTE: You can add, update or commit projects to CVS only if they are saved in some checked out directory or subdirectory. • Commit Project to CVS • Commits a project to CVS. The Commit • Update CVS Project Project to CVS dialog box appears. • Updates the current project by loading the latest project version from CVS.

Teamwork menu

The detailed description about Teamwork Server, see MagicDraw Teamwork System User’s Guide.

Window menu

You may use commands of the Window menu to manage the layout of the windows. Command Hot key Function

Containment Tree Opens the Containment Tree tab in Browser window.

© 2005 No Magic, Inc. 9-446 9 USER REFERENCE Menu System

Command Hot key Function

Inheritance Tree Opens the Inheritance Tree tab in Browser window.

Diagrams Tree Opens the Diagrams Tree tab in Browser window.

Model Extensions Tree Opens the Model Extensions Tree tab in Browser window.

Search Results Opens the Search Results tab in Browser window.

Documentation Opens the Documentation tab in Browser window.

Zoom Control Opens the Zoom Control tab in Browser window

Properties Opens the Properties tab in Browser window

Messages Window CTRL+M The Messages Window appears. The Messages Window is used for displaying the warnings and errors that may appear in the project. It appears automatically and is intended to display the warnings and errors after saving, loading, exporting and importing the project.

Reset Windows Configuration All Browser tabs are placed in their default position. Cascade Arranges windows in cascade formation. Tile Arranges windows in tile formation. Close All Diagrams But Current CTRL+ Closes all opened diagrams except the one SHIFT+ you currently use. F4 Close All Diagrams CTRL+ Closes all opened diagrams. ALT+F4 The Window menu contains the list of the opened diagrams in the project. The list shows the specified number of the recent diagrams. This number can be customized in the Recent Windows List Size property in the Environment Options dialog box. For a detailed description of this dialog box, see Section “Setting Personal Preferences” on page 2-24

9-447 © 2005 No Magic, Inc. USER REFERENCE 9 Toolbars

Help menu

Command Function Contents Displays a table of contents of the MagicDraw Help. Tip of the Day Displays the Tip of the Day screen. Submit a Bug MagicDraw team always welcomes your initiative. Submit bugs and new features in the Submit a Bug dialog box. Check for Updates The HTTP Proxy Server Connection dialog box appears. Set data for connection to start MagicDraw UML update. Unlock Key Change the license key in the Unlock Key dialog box. About Displays the MagicDraw screen about the MagicDraw tool. Magic Draw on the Web The WWW pages where you may find additional • Online Support information about UML. • MagicDraw Home Page Get online support. • UML Stuff • No Magic Home Page Entertainment with UML • Memory game. Open pictures to find pairs with as few tries as possible. • Puzzle game. Transpose the separate parts to get the whole picture.

TOOLBARS In MagicDraw, you may hide different toolbar parts: right-click the toolbar and select/clear toolbar parts check boxes you want to be displayed/hidden. You may also save your own toolbar configuration and set it as a default one.

Main toolbar

NOTE To scroll diagram items in the toolbar, select the scrollable toolbar buttons on the diagram toolbar. Using these buttons, you may scroll down or up through the toolbar in order to select the item of the diagram.

© 2005 No Magic, Inc. 9-448 9 USER REFERENCE Toolbars

Speed up your work using the Main Toolbar buttons: Toolbar button Name New Project

Open Project

Save Project

Cut

Copy

Paste

Delete

Undo action

Redo action

To undo or redo a number of actions at once, select them from the undo or redo list. Click the drop down arrow near the Undo or Redo button to open the list. Print Active Diagram

9-449 © 2005 No Magic, Inc. USER REFERENCE 9 Toolbars

Toolbar button Name Print Preview

Zoom 1:1

Zoom In

Zoom Out

Fill Color

Pen Color

Text Color

Text Font

Text Size

Set Selected Symbol Style as Default

Apply Default Symbol Style

© 2005 No Magic, Inc. 9-450 9 USER REFERENCE Toolbars

Toolbar button Name Remove Break Points

Rectilinear

Oblique

Bezier

Reset Labels Positions

Draw Class Diagram

Use case Diagram

Communication Diagram

Sequence Diagram

State Diagram

Activity Diagram

9-451 © 2005 No Magic, Inc. USER REFERENCE 9 Toolbars

Toolbar button Name Implementation Diagram

Composite Structure Diagram

Time DIagram

Struts Diagram

Oracle DDL Diagram

Web Diagram

CORBA IDL Diagram

WSDL DIagram

XML Schema Diagram

Robustness Diagram

Oracle DDL Diagram

© 2005 No Magic, Inc. 9-452 9 USER REFERENCE Toolbars

Toolbar button Name Content Diagram

Business Process DIagram

ToolTips Style button – click and select the kind of tool tips you wish to be displayed on symbols on the diagram pane: • Do not show – do not show tips. • Object name – show symbol’s name. • Object Documentation – show documentation associated with the desired symbol. NOTE To see tool tips, drag the cursor on the desired symbol on the diagram. The Main Toolbar contains the text box displaying tool tips for the selected item.

Next diagram

Previous diagram

The Main Toolbar contains a Projects list box with all opened and created project names. As MagicDraw UML supports multiple projects, you may open and create as many projects as you wish. However, you can only work with one project at a time. If you wish to work with another opened or created project, select it in the Projects list box.

Common diagram toolbar

Common toolbar shows buttons, which are opened for every diagram and this button group is common for all diagrams.

9-453 © 2005 No Magic, Inc. USER REFERENCE 9 Toolbars

Toolbar Shortcut key Name button Selection ESCAPE

Sticky Button Z

Note N

Note (HTML text) SHIFT+N

Text Box X

Text Box (HTML text) SHIFT+X

H Anchor to Note

SHIFT+H Constraint

SHIFT+C Containment

SHIFT+H Constraint

© 2005 No Magic, Inc. 9-454 9 USER REFERENCE Toolbars

Toolbar Shortcut key Name button

D Dependency

W Separator

Rectangular Shape

Class diagram toolbar

The Class Diagram toolbar has the following tools for drawing class diagrams: Toolbar Shortcut key Name button

CClass

SHIFT+P Class by Pattern. The Pattern Wizard appears.

KEnumeration

Signal

Data Type

9-455 © 2005 No Magic, Inc. USER REFERENCE 9 Toolbars

Toolbar Shortcut key Name button

Primitive Type

IInterface

P Package

MModel

G Generalization

S Association

Directed Association

Non-navigable Association

O N-ary Association

Association Class

© 2005 No Magic, Inc. 9-456 9 USER REFERENCE Toolbars

Toolbar Shortcut key Name button

A Aggregation

Directed Aggregation

F Composition

Directed Composition

R Interface Realization

ERealization

Substitution

U Usage

T Abstraction

BTemplate Binding

9-457 © 2005 No Magic, Inc. USER REFERENCE 9 Toolbars

Toolbar Shortcut key Name button

Package Merge

Package Import

Element Import

SHIFT+O Instance

SHIFT+L Link

Use Case diagram toolbar

The Use Case diagram toolbar has all general tools for drawing Use Case diagrams: Toolbar Shortcut Name button key

AActor

U Use Case

P Package

B System Boundary

© 2005 No Magic, Inc. 9-458 9 USER REFERENCE Toolbars

Toolbar Shortcut Name button key

Subsystem

CInclude

EExtend

SAssociation

G Generalization

Communication diagram toolbar

The Communication diagram toolbar has all general tools for drawing Communication diagrams: Toolbar Shortcut key Name button

O Lifelinet

C Connector

S Connector to Self

Message to Right

9-459 © 2005 No Magic, Inc. USER REFERENCE 9 Toolbars

Toolbar Shortcut key Name button

Message to Left

Call Message to Right

Call Message to Left

Send Message to Right

Send Message to Left

Reply Message to Right

Reply Message to Left

Create Message to Right

Create Message to Left

Destroy Message to Right

© 2005 No Magic, Inc. 9-460 9 USER REFERENCE Toolbars

Toolbar Shortcut key Name button

Destroy Message to Left

Sequence diagram toolbar

The Sequence Diagram toolbar has all general tools for drawing Sequence diagrams: Toolbar Shortcut Name button key

O Lifeline

SHIFT+A Alternatives

SHIFT+L Loop

SHIFT+O Option

SHIFT+P Parallel

SHIFT+B Break

SHIFT+N Negative

9-461 © 2005 No Magic, Inc. USER REFERENCE 9 Toolbars

Toolbar Shortcut Name button key

SHIFT+R Critical Region

SHIFT+C Consider

SHIFT+I Ignore

SHIFT+W Weak Sequencing

SHIFT+S Strict Sequencing

SHIFT+T Assertion

SHIFT+T Interaction Use

M Message

A Call Message

N Send Message

© 2005 No Magic, Inc. 9-462 9 USER REFERENCE Toolbars

Toolbar Shortcut Name button key

R Reply Message

C Create Message

T Destroy Message

D Diagonal Message

S Message to Self

R Recursive Message

State diagram toolbar

The State Diagram Window toolbar has all general tools used in drawing the state diagrams: Toolbar Shortcut Name button key

SHIFT+S State

SHIFT+C Composite State

9-463 © 2005 No Magic, Inc. USER REFERENCE 9 Toolbars

Toolbar Shortcut Name button key

C Orthogonal State

MSubmachine State

I Initial State

FFinal State

Terminate

YEntry Point

Exit Point

Connection Point Reference

P Deep History

SHIFT+R Shallow History

JJunction

© 2005 No Magic, Inc. 9-464 9 USER REFERENCE Toolbars

Toolbar Shortcut Name button key

OChoice

DFork/Join Horizontal

G Fork/Join Vertical

T Transition

E Transition to Self

Activity diagram toolbar

The Activity Diagram Window toolbar has all general tools used in drawing the state diagrams: Toolbar Shortcut Name button key

BAction

O Call Operation Action

SHIFT+B Object Node

9-465 © 2005 No Magic, Inc. USER REFERENCE 9 Toolbars

Toolbar Shortcut Name button key

SHIFT+D Data Store

Activity Parameter Node

SHIFT+F Object Flow

F Control Flow

SHIFT+S Send Signal Action

E Accept Event Action

T Initial Node

D Activity Final

LFlow Final

G Decision/Merge

KFork/Join Horizontal

© 2005 No Magic, Inc. 9-466 9 USER REFERENCE Toolbars

Toolbar Shortcut Name button key

Shift+K Fork/Join Vertical

PException Handler

Stuctured Activity Node

SHIFT+I Input Pin

SHIFT+O Output Pin

SHIFT+V Vertical Swimlanes

SHIFT+W Horizontal Swimlanes

Implementation diagram toolbar

The Implementation Diagram Window toolbar has all general tools used for drawing an implementation diagram: Toolbar Shortcut Name button key

K Component

A Component Instance

9-467 © 2005 No Magic, Inc. USER REFERENCE 9 Toolbars

Toolbar Shortcut Name button key

SHIFT+R Port

ONode

Execution Environment

Device

TNode Instance

Execution Environment Instance

Device Instance

PPackage

BArtifact

Deployment Specification

Artifact Instance

© 2005 No Magic, Inc. 9-468 9 USER REFERENCE Toolbars

Toolbar Shortcut Name button key

Deployment Specification Instance

FInterface

R Interface Realization

E Realization

U Usage

SHIFT+O Instance

Assembly Connector

Delegation Connector

Deployment

Manifestation

G Generalization

9-469 © 2005 No Magic, Inc. USER REFERENCE 9 Toolbars

Toolbar Shortcut Name button key

LLink

Communication Path

Composite Structure diagram toolbar

The Composite Structure Diagram Window toolbar has all general tools used for drawing a composite structure diagram: Toolbar Shortcut Name button key

C Classifier

PPart

SHIFT+R Port

Q Collaboration

U Collaboration Use

C Connector

© 2005 No Magic, Inc. 9-470 9 USER REFERENCE Dialog Boxes

Toolbar Shortcut Name button key

BRole Binding

DIALOG BOXES

Submit a Bug dialog box

To open the Submit a Bug dialog box Choose the Submit a Bug command from the Help menu.

9-471 © 2005 No Magic, Inc. USER REFERENCE 9 Dialog Boxes

Figure 165 -- Submit a Bug dialog box Tab name Box Function Mail Form Your Name Type your name. Fill the main Your E -Mail Type your e-mail address. information about yourself and Outgoing Mail Enter the name of the server of your outgoing describe a bug or (SMTP) mail. suggestion. If not entered, No Magic mail server is used. To The bug description will be sent to [email protected] Bug Name Give a name to the bug Bug Category Select a bug category, or create a new category that is more fitting. Bug Description Describe the bug.

Attachments Attach Log File Attaches the log file of the project. Choose the files Attach Project File Attaches current MagicDraw project file. you want to attach to the bug Attach Diagrams Attaches current MagicDraw diagrams as description. Images images. Not Empty The list of diagrams that contains at least one Diagrams model element. Select All Select all diagrams displayed in the Not Empty Diagrams list. Unselect All Removes the selection. Load All Diagrams Loads all diagrams of the project. By default only opened diagrams are shown in the Not Empty Diagrams list. Buttons Send Send the bug. RECOMMENDATION: You may submit a bug by mailing to [email protected], but It is recommended that you submit a bug directly in the MagicDraw tool. This way, the MagicDraw team will receive the description of the bug along with your system information. Cancel Exits the dialog box without saving changes. Help Displays MagicDraw Help.

© 2005 No Magic, Inc. 9-472 1 TOOLS Metrics

10-409 © 2005 No Magic, Inc. M AGICD RAW USER’ S MANUAL Index A abstract class 196, 236 operation 207 Abstract (generalizable element) 125, 223 action state 179 activation bar 172, 258 active class 196 activity diagram 178 actor 168 working with 235 aggregation 164 creating 228 assigning classifier to classifier role 248 classifier to collaboration 221 classifier to instance 244 model element to a package 130 state to object flow state 269 association 163 in class diagram 223 in use case diagram 223 n-ary 225 navigability of 228 with a role 201 association class 225 association end multiplicity of 229 qualifier of 229 visibility of 228 asynchronous message/stimulus 249 attribute 198 creating new 198 defining initial value of 245 multiplicity 202 scope of 202 show only public 216 type modifier of 201 type of 201 attributes controlling the list of 196 representing as association 201 sorting of 216 suppressing compartment 216 B binding dependency 232 browser changing position 84 changing size 84 closing or reopening 84 code engineering sets in 86

© 2005 No Magic, Inc. 410 M AGICD RAW USER’ S MANUAL Index

Containment tree 84 creating model elements and diagrams in 91 Diagrams tree 88 displaying full information in 85 Documentation tab 93 functions of 82 Inheritance tree 89 Model Extensions tree 90 multiple selections 93 sorting alphabetically 84 structure 83 Zoom tab 94 C Call (event type) 266 Change (event type) 266 changeable 202 child element 221 class 194 active 196 creating setters and getters 385 defining as abstract, leaf, root and/or active 196, 236 description of 194 design patterns 214 inner elements of 196 owner of 130 show/hide package name 130 suppressing attributes 216 suppressing operations 216 class diagram 160 elements in 162 wizard 351 classifier assign to an instance 244 assigning to a collaboration 221 assigning to classifier role 248 classifier role assigning classifier to 248 in sequence diagram 172 closing all opened projects 81 diagram 106 code engineering checking syntax 87 creating new set 86 editing set 86 code generation 87 changing properties of 86 collaboration assigning classifier to 221 collaboration diagram changing numbering in 251 compartments of class 194

© 2005 No Magic, Inc. 411 M AGICD RAW USER’ S MANUAL Index

component 185, 274 diagram 183 instance 185 view 160 Component View package 42 composition 228 concurrency of operation 208 concurrent operation 208 conditional branch 258 constraints show-hide on symbol 129 showing on class 216 content diagram 299 copying/cutting among different projects 92 in the Browser 92 of text 117 symbol on a diagram 117 using drag and drop 117 CORBA IDL diagram 312 creating backup file 45 displaying already created relationships 113 elements and diagrams in Browser 91 new attribute 198 new code engineering set 86 new diagram 104 new operation 203 new project style 51 paths between shapes 113 stereotypes 282 D data creating several shapes of the same 111 Data package 42 data types 211 DDL diagram 315 defining model elements 118 deleting all model elements 93 from the Browser 92 symbol or model element 113 dependency binding 232 in implementation diagram 188 permission 233 usage 233, 234 deployment diagram 184 deployment view 160 design patterns 214

© 2005 No Magic, Inc. 412 M AGICD RAW USER’ S MANUAL Index

destroying sequence object 257 diagram closing 106 creating 104 defining properties of 56 information table 109 opening 105 renaming 106 saving as image 47 diagrams activity 178 class 160 collaboration 170 content 299 CORBA IDL 312 DDL 315 implementation 183 model management 158 robustness 303 sequence 171 state 174 use case 167 web 306 WSDL 317 XML Schema 320, 323, 325 display related elements 111 documentation of MagicDraw 12 drag and drop copying 117 from browser to diagram 117 multiple symbols 116 source code files 117 drawing more than one shape 110 shape 110 symbol from the Browser 92 E editing code engineering set 86 editions of MagicDraw 11 enumeration 209, 212 enumeration literal 213 event 174 exporting stereotypes 282 extend 240 extension point 237 adding to use case 238 F features of MagicDraw 11

© 2005 No Magic, Inc. 413 M AGICD RAW USER’ S MANUAL Index

final state 263 G generalizable elements 223 defining as 223 generalization grouping into tree 222 generate code from the selected set 87 getter 385 grid 148 size 149 snapping to 149 style 149 visibility of 149 grouping diagrams in Browser 88 generalization paths into tree 222 of model elements 216 realizations into tree 230 Guarded 208 H HTML text 135 hyperlink 136 for model element 135 I image available formats 46 saving as 47 implementation diagram 183 elements in 185 include 169, 242 initial value defining for attribute 245 showing on attribute 216 inner elements of class (inserting) 196 installation other platforms 20 system requirements 18 UNIX 20 using no install 20 Windows 19 instance 187 assign classifier to 244 of component 185 of node 186 interface 187 interface style making changes to 39 Metal 39

© 2005 No Magic, Inc. 414 M AGICD RAW USER’ S MANUAL Index

Motif 39 multiple windows 40 Windows 39 internal transition 266 J JVM (Java Virtual Machine) for Mac OS X 19 for Solaris 19 for Windows 19 L layout 138 Leaf class 196 Leaf (generalizable element) 223 lifeline 172, 257 concurrent 173, 258 link in class diagram 167 in collaboration diagram 171 in implementation diagram 189 link attribute 194 link to self 171 logical view 159 Look and Feel themes 39 M Mac OS X installation 20 JVM 19 MagicDraw appearance of 38 documentation 12 editions 11 environment options 22 features 11 support 15 updating 20 message changing numbering of 251 defining action for 251 diagonal 173 in collaboration diagram 171 asynchronous 249 synchronous 249 in sequence diagram 258 predecessor of 252 recursive 173 to self 173 uninterpreted 173 model development of 10

© 2005 No Magic, Inc. 415 M AGICD RAW USER’ S MANUAL Index

static structural 160 model element defining 118 saving as image 47 model management 161 moving of all model elements 93 symbol 116 MS Office copying to 117 multiple windows 40 multiplicity of an attribute 202 of association end 229 N name specifying for a shape 110 n-ary association 225 navigability of association 228 node 185, 276 note 154 adding hyperlink to 136 retrieving documentation 156 text as HTML in 135 note anchor 155 numbering changing 251 numbers show/hide on collaboration diagram 251 O object flow state assigning state 269 defining classifier for 269 opening diagram 105 diagram from Browser 88 last project on startup 49 project 48 specification dialog box 118 operation concurrency 208 creating new 203 defining 203 defining as abstract, leaf, or root 207 functions of 203 parameter of 205 return type 207 return type of 205 show only public 216 showing signature of 215

© 2005 No Magic, Inc. 416 M AGICD RAW USER’ S MANUAL Index

visibility 207 operations controlling the list of 196 generation of setters and getters 196 managing 386 sorting of 216 suppressing compartment 216 ordering of attributes 216 of operations 216 P package 162, 186, 216 adding inner elements 217 changing header position 217 Component View 42 Data 42 dependency wizard 355, 358 showing assigned model elements 218 parameter of an operation 205 parameterized class 208 defining of 208 parent element 221 partition 271 paste 117 with new data 117 path 104 changing style of 114 defining properties of 56 drawing 113 patterns See design patterns permission 233 predecessor 252 presentation options for class 215 primitive 214 printing 150 process view 160 project dividing into modules 61 multiple projects 80 opening of 48 packages of 42 reusing project parts 61 properties changing code generation 86 pseudostate 174 Q qualifier of association end 229

© 2005 No Magic, Inc. 417 M AGICD RAW USER’ S MANUAL Index R realization grouping into tree 230 registering MagicDraw 20 relationship displaying on diagram 113 renaming diagram in Browser 89 reports 332 return type of an operation 207 reverse changed files 87 code engineering set 87 robustness diagram 303 Root class 196 S Save (dialog box) 45 Save As Image (dialog box) 47, 48 saving 44 as image 47 formats 45 in .mdf format 44 project 45 project as template 46 selection 116 all symbols of the same type 116 multiple 116 multiple (in the Browser) 93 of all model elements 93 of all symbols 116 of symbol 116 separator 156 adding hyperlink to 136 sequence diagram model elements in 172 overview 171 Sequential 208 setter 385 shape defining properties of 56 definition 104 drawing more than one shape 110 drawing of 110 shortcut keys assigning 149 Signal (event type) 266 signal receipt trigger event for 271 Solaris JVM 19

© 2005 No Magic, Inc. 418 M AGICD RAW USER’ S MANUAL Index

sorting of attributes 216 of operations 216 state 175, 179, 258 state diagram model elements in 174 state machine 174 statechart diagram See state diagram stereotypes Builds 287 Client Page 285 creating of 282 defining properties of 56 Form 285 Frame Context 287 Frame Set 286 IIOP 289 importing 282 Input Element 290 JavaScript 286 Link 287 Object 289 Page 290 Redirect 289 RMI 289 Select Element 290 Server Page 284 show/hide on a symbol 129 showing on class 216 Submit 287 Target 286 Targeted Link 287 Text Area 290 working with 280 stimulus changing numbering 251 changing numbering of 251 defining action for 251 main information about 171 support for MagicDraw 15 swimlane 271 symbols 104 defining properties 129 formatting 56 moving 116 presentation of constraint 135 note 154 note anchor 135 separator 135 text box 135 synchronous 249 system boundary 168

© 2005 No Magic, Inc. 419 M AGICD RAW USER’ S MANUAL Index T tagged values show/hide on a symbol 129 showing on class 216 working with 291 template saving as 46 text box 135 adding hyperlink 136 text as HTML in 135 text editor choosing 87 Time (event type) 266 TODO 294 transition 181 to self 178 type modifier 201 type of an attribute showing full path 215 U Unix installation 20 updating MagicDraw 20 usage 233, 234 use case adding extension point 238 extension point 237 use case view 159 V visibility for operation 207 of association end 228 showing on attribute 216 showing on operation 216 W web diagram 306 web extension 284 Windows interface style 39 JVM 19 wizards 332 workspace 43 WSDL diagram 317 X XMI 45 XML Schema diagram 320, 323, 325 Z zooming 147

© 2005 No Magic, Inc. 420 M AGICD RAW USER’ S MANUAL Index

adjusting step size 148 fit in window 147 to maximum size 148 to original size 148 using Browser 94 zoom in 148 zoom out 148

© 2005 No Magic, Inc. 421