+ All Categories
Home > Documents > USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your...

USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your...

Date post: 07-Mar-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
462
USERS MANUAL version 10.0 No Magic, Inc. October, 2005
Transcript
Page 1: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

USER’S MANUAL

version 10.0

No Magic, Inc.

October, 2005

Page 2: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The
Page 3: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

CONTENTS 1CONTENTS 2

2 INTRODUCING MAGICDRAW 2-10MagicDraw Editions and Features 2-11

MagicDraw Personal edition 2-11MagicDraw Standard edition 2-11MagicDraw Professional editions 2-11MagicDraw Enterprise edition 2-12MagicDraw Reader Edition 2-12MagicDraw Community Edition 2-12

MagicDraw Documentation and Support 2-12Help 2-13User’s Guides 2-13

Other Documentation 2-14Support 2-15

FAQ 2-15Newsgroups 2-15E-mail 2-15Bug Reports 2-15

3 GETTING STARTED 3-18Installing and Running 3-18

System requirements 3-18Java Virtual Machine (JVM) 3-18

Operating system - dependent issues 3-19Installation procedure 3-19

Windows 2000/9x/NT/XP 3-19Unix 3-20MAC OS X 3-20All other platforms instructions (no install version) 3-20

Updating 3-20Auto-Check for Updates dialog box 3-21

structure of menus and toolbars 3-21Setting Personal Preferences 3-22

Environment Options 3-22General pane 3-23Diagram pane 3-26Browser pane 3-28

Page 4: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M a g i c D r a w U s e r ’ s M a n u a lC o n t e n t s

Teamwork pane 3-29Floating pane 3-30CVS pane 3-31Update pane 3-32HTTP Proxy pane 3-33Keyboard pane 3-34Plugins pane 3-35Resources pane 3-36Path Variables Pane 3-37Launcher Pane 3-38

Look and Feel: Controlling Interface 3-38JIDE and Multiple Windows interface styles 3-40

4 WORKING WITH PROJECTS 4-42Creating New Project 4-42

Creating new project from already created template 4-43Importing project 4-44

Saving and Exporting 4-44Exporting project as template 4-45Saving diagram as image 4-46Autosave 4-48

Loading 4-48Project Options. Style Engine 4-49

Project Options 4-49Symbols Properties Styles Tree 4-52

Working with Properties Styles 4-56Properties extension by diagram 4-56Properties Inheritance 4-57General Style Properties 4-58Shapes, Paths and Diagrams Properties 4-58Stereotypes properties 4-59

Reusing project parts in modules 4-61Working with Modules 4-61

Exporting Project Module 4-61Using Project Modules 4-63Importing Project Modules 4-63Sharing packages 4-63Opening Your Module As a Project 4-65Reloading Your Module 4-65

Dependencies Between Elements 4-66Packages dependencies by relationships 4-66Dependencies by reference 4-69Diagrams dependencies 4-69

Package Dependencies Dialog Box 4-70

3 © 2004 No Magic, Inc.

Page 5: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M a g i c D r a w U s e r ’ s M a n u a IC o n t e n t s

Profiles 4-72Creating Profiles 4-72Using and Importing Profiles 4-72Exporting Profiles 4-74

Model Differencing 4-74Models comparison 4-74

Understanding model differences 4-75Diagrams Comparison 4-78

Working with multiple projects 4-80Using Browser 4-82

The Browser window parts 4-83Containment tree 4-84

Data branch 4-86Code engineering sets 4-86

Diagrams tree 4-88Inheritance tree 4-89Model Extensions Tree 4-90Search Results Tree 4-91Working with model elements in the Browser tree 4-91Multiple selection 4-92Documentation/Zoom Control/Properties 4-93

Documentation tab 4-93Zoom Control tab 4-94Properties tab 4-94

Searching 4-95Java Regular Expressions 4-98

Metacharacters 4-98Character Sets 4-99Grouping 4-99Quantifiers 4-99Boundary Matchers 4-100Embedded Flag Expressions 4-100

Resource Manager 4-101MagicDraw RConverter 4-103

5 DIAGRAMS BASICS 5-104Working with Diagrams 5-104

Diagrams Dialog Box 5-106Diagram Properties 5-107

Table with diagram information 5-109Drawing Shapes 5-110Drawing Relationship paths 5-113Smart Manipulation 5-114Selection & Multiple Selection 5-116Dragging, Copying, Cutting, and Pasting 5-116

© 2004 No Magic, Inc. 4

Page 6: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M a g i c D r a w U s e r ’ s M a n u a lC o n t e n t s

Specifying Model Elements 5-118Specification dialog boxes 5-118

Documentation/Hyperlinks tab 5-119Relations tab 5-121Tagged Values tab 5-122Constraints tab 5-124General tab 5-124Attributes tab 5-126Operations tab 5-127Teplate Parameters tab 5-128Buttons available in the Specification dialog boxes 5-129

Formatting Symbols 5-129Owner of the model element 5-130

Model Traceability 5-130Usages Functionality 5-131Dependent Elements functionality 5-131

Find Usages / Dependent Elements Options dialog box 5-132Elements Using/Dependencies windows 5-133

Defining Hyperlinks 5-135Insert Hyperlink dialog box 5-136

Laying out 5-138Orthogonal Layouter 5-139Hierarchic Layouter 5-139Tree Layouter 5-141Organic Layouter 5-143Circular Layouter 5-144Orthogonal Path Router 5-145Organic Path Router 5-145Class Diagram Layouter 5-146Quick Diagram Layout feature 5-147

Zooming 5-147Using Grid 5-148Assigning Shortcut Keys 5-149Printing 5-150

Print Range tab 5-150Print Options Tab 5-152Print Header/Footer Tab 5-153

Model Elements Common in all Diagrams 5-154Anchor to Note 5-155Constraint path 5-155Separator 5-156Documentation 5-156

5 © 2004 No Magic, Inc.

Page 7: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M a g i c D r a w U s e r ’ s M a n u a IC o n t e n t s

6 UML DIAGRAMS 6-158System Views 6-159

Use Case View 6-159Logical View 6-159Process view 6-160Component view 6-160Deployment view 6-160

Class Diagram 6-160Class diagram elements 6-162

Use Case Diagram 6-167Use Case diagram elements 6-168

Communication Diagram 6-170Communication Diagram elements 6-171

Sequence Diagram 6-171State Diagram 6-174

State Diagram elements 6-174Activity Diagram 6-178

Activity Diagram elements 6-179Implementation Diagram 6-183

Component diagram overview 6-183Deployment diagram overview 6-184Implementation Diagram elements 6-185

Composite Structure Diagram 6-190Composite Structure Diagram elements 6-191

7 MODEL ELEMENTS 7-194Classes 7-194

Working with classes 7-194Interface 7-197Attribute 7-198Operation 7-203

Template / Parameterized class 7-208Port 7-209Data types 7-211

Enumeration 7-212Primitive 7-214

Design Patterns 7-214Class presentation options 7-215Packages 7-216

Working with packages 7-217Profile 7-218Model 7-219Collaboration 7-219Generalization 7-221

© 2004 No Magic, Inc. 6

Page 8: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M a g i c D r a w U s e r ’ s M a n u a lC o n t e n t s

Generalizable elements 7-223Association 7-223

Association End 7-225Realization 7-229Dependency 7-231

Template Binding dependency 7-232Abstraction 7-233Usage 7-233Package Merge 7-234Package Import 7-234Element Import 7-234

Containment 7-235Actors 7-235

Working with Actors 7-235Use Cases 7-236Use Case Extensions 7-238Relationships in Use Case Diagrams 7-239

Association 7-240Extend 7-240Include 7-242Generalization 7-242Dependency 7-243Realization 7-243

Instance Specification 7-243Instance Specification dialog boxes 7-243

Connector 7-245Lifeline 7-247Message 7-248

Predecessors and activators 7-252Actions 7-253Interaction Use 7-255Combined Fragment 7-256Lifelines in Sequence Diagram 7-257Messages in Sequence Diagram 7-258State 7-258Composite State 7-260Submachine 7-261Pseudo State 7-262

Initial 7-262Final state 7-263Terminate 7-263Entry Point 7-263Exit Point 7-263Deep History 7-263Shallow History 7-263

7 © 2004 No Magic, Inc.

Page 9: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M a g i c D r a w U s e r ’ s M a n u a IC o n t e n t s

Junction 7-263Choice 7-263Fork/Join 7-264

Transition 7-264Event types 7-266

Internal transitions 7-266Flow Final Node 7-267Decision Node 7-267Object Node 7-268Send Signal Action 7-269Accept Event Action 7-270Swimlanes 7-271Components 7-274Nodes 7-276

8 UML EXTENSION MECHANISMS 8-280Stereotype 8-280

Stereotype Specification dialog box 8-280Profiles dialog box, Stereotypes tab 8-282UML Web Extension stereotypes 8-284

Tag Definitions 8-291Tagged Value Edition 8-292TODO item 8-294

Constraints 8-294Constraint Specification dialog box 8-296

9 EXTENSION DIAGRAMS 9-298Content Diagram 9-299

Content Diagram Elements 9-300Robustness Diagram 9-303

Robstness Diagram Elements 9-305Web Diagram 9-306

Web Diagram Elements 9-308CORBA IDL Diagram 9-312

CORBA IDL Diagram Elements 9-313DDL Diagram 9-315

DDL Diagram Elements 9-316WSDL Diagram 9-317

WSDL Diagram Elements 9-318XML Schema Diagram 9-320

XML Schema Diagram Elements 9-321Time Diagram 9-323

Time Diagram Elements 9-324Business Process Diagram 9-325

© 2004 No Magic, Inc. 8

Page 10: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M a g i c D r a w U s e r ’ s M a n u a lC o n t e n t s

Business Process Diagram Elements 9-326

10TOOLS 10-332Reports 10-332

Template Management tab 10-333Document Options 10-337Model Report 10-338Use Case Report 10-340Software design Description 10-341Model Extension Report 10-343

Select Packages tab 10-344Select Diagrams tab 10-345Output Options tab 10-346Report Customization 10-347

New report style creation example 10-348Fonts in PDF and PS reports 10-349

Report Generator Tool 10-350Starting report generator 10-350Generating Configuration file 10-350

Class Diagram Wizard 10-351Package Dependency Wizard 10-355Package Overview Diagram Wizard 10-358Tools for Analysis 10-363

Hierarchy Diagram Wizard 10-364Realization Diagram Wizard 10-367

Content Diagram Wizard 10-372Sequence Diagram from Java Source Wizard 10-374Pattern Wizard 10-378Creating Setters / Getters 10-385Implementing or Overriding Operations 10-386Model Transformation Wizard 10-387

Types of transformations 10-387Model Transformation Wizard 10-388Model Transformation Mapping 10-391Transformation Mapping Options 10-392Model Transformation Update 10-395

Metrics 10-396Metric Suites 10-397Displaying Metrics 10-397Starting Metrics 10-398

Metrics window 10-401Exporting Metrics 10-401Comparing metrics 10-403Metrics Options 10-403Metrics Properties 10-405

9 © 2004 No Magic, Inc.

Page 11: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

©

I N T R O D U C I N G M A G I C D R A W 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 software development 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

Page 12: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

I N T R O D U C I N G M A G I C D R A WMagicDraw Edi t ions and Features

2

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 FEATURESThe detailed list of MagicDraw features find at:http://www.magicdraw.com/files/brochures/a4/MagicDrawDataSheet.pdf

M A G I C D R A W P E R S O N A L E D I T I O N

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 A G I C D R A W S T A N D A R D E D I T I O N

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 A G I C D R A W P R O F E S S I O N A L E D I T I O N S 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.

Page 13: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

I N T R O D U C I N G M A G I C D R A WMagicDraw Documentat ion and Support

2

• 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 A G I C D R A W E N T E R P R I S E E D I T I O N

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 A G I C D R A W R E A D E R E D I T I O N

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 A G I C D R A W C O M M U N I T Y E D I T I O N

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 SUPPORTMagicDraw 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

Page 14: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

2-

I N T R O D U C I N G M A G I C D R A WMagicDraw Documentat ion and Support

2

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 UserManual.pdf

Includes detailed explanations and instructions of installing and working with MagicDraw.

• <MagicDraw installation directory>/manual

• Start/Programs/MagicDrawUML/MagicDraw User Manual.pdf

• www.magicdraw.com -> Download->Download Manual

13 © 2005 No Magic, Inc.

Page 15: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

I N T R O D U C I N G M A G I C D R A WMagicDraw Documentat ion and Support

2

O T H E R D O C U M E N T A T I O N

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

MagicDraw CodeEngineering UserGuide.pdf

In this user guide you will find not only basic information about reverse and generation in MagicDraw but also detailed descriptions about DDL, CORBA IDL, EJB 2.0, and XML Schema usage in MagicDraw.

• <MagicDraw installation directory>/manual

• www.magicdraw.com -> Download->Download Manual

MagicDraw Tutorials UserGuide.pdf

Step by step instructions presenting the basics of using MagicDraw diagramming, creation of sequence diagram, integration with CVS and Eclipse.

MagicDraw Integrations UserGuide.pdf

You will find here the full description of how to integrate MagicDraw with Eclipse, Borland JBuilder, Sun One Studio (before called Forte) including Netbeans, and CVS.

MagicDraw FloatingLicense UserGuide.pdf

Here you will find how setup and how to use MagicDraw Floating License server.

MagicDraw Teamwork UserGuide.pdf

In this document, you will 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 UserGuide.pdf

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.

• <MagicDraw installation directory>/openapi/docs

Name Description Location

© 2005 No Magic, Inc 2-14

Page 16: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

I N T R O D U C I N G M A G I C D R A WMagicDraw Documentat ion and Support

2

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

Support

F A QBefore 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 E W S G R O U P S

Discuss and get answers about MagicDraw in newsgroups.

E - M A I L

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 U G R E P O R T S

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.

Page 17: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

I N T R O D U C I N G M A G I C D R A WMagicDraw Documentat ion and Support

2

© 2005 No Magic, Inc 2-16

Page 18: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

I N T R O D U C I N G M A G I C D R A WMagicDraw Documentat ion and Support

2

2-17 © 2005 No Magic, Inc.

Page 19: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E D 3

INSTALLING AND RUNNING

System requirements

To run MagicDraw UML, your system must meet the following requirements:

Java Vi r tual 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.

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, Linux, Mac OS X (most testing procedures and debugging were performed on those platforms)

HTML browser Any Netscape Navigator or IE

Java Virtual Machine (JVM)

JDK 1.4 Sun’s JDK 1.5.0_03

© 2005 No Magic, Inc. 3-18

Page 20: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E DInstal l ing and Running

3

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 = <path to new JDK>

O P E R A T I N G S Y S T E M - D E P E N D E N T I S S U E S

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).

Ins ta l la t ion 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 I N D O W S 2 0 0 0 / 9 X / N T / X PAfter 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.

Page 21: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E DUpdat ing

3

U N I X

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).

M A C O S 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 L L O T H E R P L A T F O R M S I N S T R U C T I O N S ( N O I N S T A L L V E R S I O N )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.

UPDATINGAutomatic 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

Page 22: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

3-

G E T T I N G S T A R T E Dstructure of menus and toolbars

3

A U T O - C H E C K F O R U P D A T E S D I A L O G B O X

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.

STRUCTURE OF MENUS AND TOOLBARSBefore 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.

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.

Element Name Function

Show this tip next time

If selected, the dialog box is opened each time, when the 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.

Function Accessibility

Main operations of editing (copy, cut, paste, delete)

• Edit menu.• Main toolbar buttons.• Shortcut keys.• Shortcut menu commands from Browser.

Opening of Specification dialog boxes

• By double-clicking the model element.• Specification command from the element shortcut menu on the

diagram or Browser.• When adding one model element to another model element

from the Specification dialog box or Browser.

Defining symbols properties (font, color, etc.)

• Symbol shortcut menu -> Symbol(s) Properties.• Options menu -> Project.• Main toolbar buttons

21 © 2005 No Magic, Inc.

Page 23: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E DSet t ing Personal Preferences

©

3

SETTING PERSONAL PREFERENCES

Envi ronment Opt ions

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

Page 24: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

3-

G E T T I N G S T A R T E DSet t ing Personal Preferences

3

G E N E R A L P A N E

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 background in image

Saves the diagram background in the image together with the 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.

23 © 2005 No Magic, Inc.

Page 25: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E DSet t ing Personal Preferences

3

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• ThaiNOTE 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 data on idle

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

Idle time to activate recovery save

Enter the system idle time (in minutes) when to activate file 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.

Property name Function

© 2005 No Magic, Inc 3-24

Page 26: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E DSet t ing Personal Preferences

3

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 startup

The project you have finished the last session will be opened next time you start MagicDraw UML.

Mark elements with active hyperlink

Shows active hyperlink arrow on element symbol.

Opaque Expression defautl language

Possible choises:• Englich• OCL

Opaque Expression displaying lines

Possible choises:• 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 wizard

Opens the Software Design Model Wizard or Use Case Model Wizard in report generation.

Show model enrichment suggestion dialog

Opens the Model Enrichment dialog box in report generation.

Show hyperlinks in specification dialog

Shows the Hyperlinks tab in the element Specification dialog box.

Specification opening mode

Possible choises:• In the same window• In a new window

Recent specifications list size

Specify list size of specifications. Possible range 1 to 20.

Specifications history size Specify history size of openend elements specifications. Possible range 1 to 20.

Property name Function

3-25 © 2005 No Magic, Inc.

Page 27: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E DSet t ing Personal Preferences

©

3

D I A G R A M P A N E

Figure 2 -- Environment Options dialog box. Diagram pane

Property name Function

Allow class members selection

Operations and attributes can be selected and dragged & dropped to the other class.

Apply stereotype style for all symbols

Applies created stereotype style to symbol when adding stereotype to element.

Apply stereotype style for symbols in unlocked diagrams

Applies stereotype style in teamwork for unlocked diagrams.

Center on the mouse location when zooming

Centers zooming according to mouse arrow.

2005 No Magic, Inc 3-26

Page 28: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

3-

G E T T I N G S T A R T E DSet t ing Personal Preferences

3

Display paths on element drop

When dragging and dropping an element from the Browser or executing a Create Symbol action, path to existing symbols are created.

Edit name with stereotypes

Allows to manage stereotypes by editing stereotype name directly 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 highlighting

Enable error highlighting of the modeling process. This helps you 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 Manipulations

Set smart manipulators visibility.

Mouse’s Left Button Action

Possible choises: 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 time on mouse over

Set smart manipulators fade time in seconds.

Smart Manipulator appearance

Possible choises:• Mouse Over• Shift

Show Names in Toolbar

Shows element names in toolbars near icon.

Use Small Icons Change icons to smaller size, when selected.

Toolbar Position Change toolbar appearance near diagram pane.Possible choises:• Right• Left

Property name Function

27 © 2005 No Magic, Inc.

Page 29: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E DSet t ing Personal Preferences

3

B R O W S E R P A N E

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 engineering sets

Shows code engineering sets items in the browser.

Show full types in browser

Shows the full attributes, operations, and relationships data.

Sort always Always alphabetically sort browser items.

Show stereotypes in browser

Shows stereotypes that are assigned to the model elements.

Show changes in browser

Highlight edited or added model elements and diagrams in the Browser.

Show hyperlinks in browser

Shows hyperlinks that are assigned to the model elements.

Group by diagram type

Groups diagrams according to diagram type in the Diagrams 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

Page 30: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

3-

G E T T I N G S T A R T E DSet t ing Personal Preferences

3

T E A M W O R K P A N E

Figure 4 -- Environment Options dialog box. Teamwork pane

Group by Metaclasses

Groups stereotypes by Metaclass in the Model Extensions Tree.

Show diagram zoom slider

Shows zoom slider in the Zoom Control tab.

Property name Function

Auto login to server

The user automatically logs on to the Teamwork Server after starting MagicDraw.

Teamwork server name

Shows the name of your teamwork server.

Show commit warning

The warning appears while committing project to the Teamwork Server.

Show modules versions conflict warning

The warning appears when two modules (or module and a project) use the same submodules.

Property name Function

29 © 2005 No Magic, Inc.

Page 31: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E DSet t ing Personal Preferences

©

3

F L O A T I N G P A N E

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

Figure 5 -- Environment Options dialog box. Floating pane

Property name Function

Floating license server name

Specify the name of the Floating License Server.

Floating license server port

Enter the port number of the Floating License Server. The server may be started on many different ports.

Auto login to floating license server

If selected, automatically logs in to the Floating License Server when starting MagicDraw.

2005 No Magic, Inc 3-30

Page 32: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

3-

G E T T I N G S T A R T E DSet t ing Personal Preferences

3

C V S P A N E

Figure 6 -- Environment Options dialog box. CVS pane

Property name Function

Add project to CVS after saving

Every time adds a newly created project in the checked out directory to CVS. The Add Project to CVS dialog box appears.

Commit project to CVS after saving

Updates the project that is added to CVS while loading. The Update CVS Project dialog box appears.

Update project from CVS before loading

Commits project to CVS after saving it. The Commit Project to CVS dialog box appears.

Location of .cvspass

The path where the .cvspass is located. You may type it or choose 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.

31 © 2005 No Magic, Inc.

Page 33: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E DSet t ing Personal Preferences

©

3

U P D A T E P A N E

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 confirmation dialog box

If selected, shows the confirmation dialog each time before auto-checking.

2005 No Magic, Inc 3-32

Page 34: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

3-

G E T T I N G S T A R T E DSet t ing Personal Preferences

3

H T T P P R O X Y P A N E

Figure 8 -- Environment Options dialog box. HTTP Proxy pane

Property name Function

Use HTTP proxy server

If selected, uses the Http Proxy Server when MagicDraw is checking for updates.

HTTP proxy server address

Type the Http Proxy Server name or IP address.

HTTP proxy server port

Type the port of the HTTP Proxy Server. The default number is 8080.

HTTP proxy server user

Type the name of the Http Proxy Server user.

Authenticate HTTP proxy server

Authenticates Http Proxy Server.

33 © 2005 No Magic, Inc.

Page 35: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E DSet t ing Personal Preferences

©

3

K E Y B O A R D P A N E

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 shortcut key

The field for entering the new key. Puts a human representation of any 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 assigned to

Shows the name of the command of the entered new key if this key is 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

Page 36: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

3

G E T T I N G S T A R T E DSet t ing Personal Preferences

3

P L U G I N S P A N E

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.

-35 © 2005 No Magic, Inc.

Page 37: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E DSet t ing Personal Preferences

©

3

R E S O U R C E S P A N E

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

Page 38: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

3-

G E T T I N G S T A R T E DSet t ing Personal Preferences

3

P A T H V A R I A B L E S P A N E

37 © 2005 No Magic, Inc.

Page 39: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E DSet t ing Personal Preferences

3

L A U N C H E R P A N E

Figure 12 -- Environment Options dialog box. Launcher pane

Look and Feel : Control l ing In ter face

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

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.

© 2005 No Magic, Inc 3-38

Page 40: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E DSet t ing Personal Preferences

3

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

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

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.

3-39 © 2005 No Magic, Inc.

Page 41: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E DSet t ing Personal Preferences

3

• Khaki

• Kunststoff Theme

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

J I D E A N D M U L T I P L E W I N D O W S I N T E R F A C E S T Y L E S

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.

Page 42: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

G E T T I N G S T A R T E DSet t ing Personal Preferences

3

3-41 © 2005 No Magic, Inc.

Page 43: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

W O R K I N G W I T H P R O J E C T S 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 443 "Loading", on page 484 "Project Options. Style Engine", on page 495 "Reusing project parts in modules", on page 616 "Profiles", on page 727 "Model Differencing", on page 748 "Working with multiple projects", on page 809 "Using Browser", on page 8210"Searching", on page 9511"Resource Manager", on page 10112"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

Page 44: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SCreat ing New Project

4

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.

Creat ing new project f rom al ready 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.

Page 45: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SSaving and Expor t ing

4

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 <MagicDraw installation directory>/templates folder so you may import the desired template in your already created project using Import command from the File menu.

Impor t ing 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 EXPORTINGIMPORTANT!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

Page 46: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SSaving and Expor t ing

4

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.

Expor t ing 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.

Page 47: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SSaving and Expor t ing

4

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

Sav ing 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)

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

© 2005 No Magic, Inc 4-46

Page 48: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SSaving and Expor t ing

4

• 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.

Page 49: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SLoading

4

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.

LOADINGIMPORTANT! 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

Page 50: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SProject Opt ions. S ty le Engine

4

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 ENGINEStyle 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.

Pro ject Opt ions

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.

Page 51: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SProject Opt ions. S ty le Engine

4

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:

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

General Project Options

Define the default packages where the extension elements 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 Styles

Expands tree hierarchy of all the styles defined within the 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.

© 2005 No Magic, Inc 4-50

Page 52: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SProject Opt ions. S ty le Engine

4

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:

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.

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.

4-51 © 2005 No Magic, Inc.

Page 53: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SProject Opt ions. S ty le Engine

4

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 Y M B O L S P R O P E R T I E S S T Y L E S T R E E

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

Page 54: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SProject Opt ions. S ty le Engine

4

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.

Page 55: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SProject Opt ions. S ty le Engine

4

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 Operations

Shows additional information sign “…” in the class, artifact or 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 Direction Kind

Show Operations Properties

Show Operations Visibility

Shows the direction kind for operations parameters

Shows tagged values and concurrency of an operation.

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 (+, -, #).

Property Function (when selected)

© 2005 No Magic, Inc 4-54

Page 56: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SProject Opt ions. S ty le Engine

4

Stereotype Color

Stereotype Font

Show Stereotypes

Show ConstraintsShow Tagged Values

The color that will be used to draw stereotypes. The Color dialog box appears.

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

Shows stereotype labels on symbols.

Shows constraints on symbols.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 Elements

Hides specification elements of a subsystem.

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.

Property Function (when selected)

4-55 © 2005 No Magic, Inc.

Page 57: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SProject Opt ions. S ty le Engine

4

Working wi th Proper t ies S ty le s

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 R O P E R T I E S E X T E N S I O N B Y D I A G R A M

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

Page 58: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SProject Opt ions. S ty le Engine

4

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 R O P E R T I E S I N H E R I T A N C E

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.

Page 59: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SProject Opt ions. S ty le Engine

4

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 E N E R A L S T Y L E P R O P E R T I E S

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 H A P E S , P A T H S A N D D I A G R A M S P R O P E R T I E S

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

Page 60: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SProject Opt ions. S ty le Engine

4

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 T E R E O T Y P E S P R O P E R T I E S

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.

Page 61: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SProject Opt ions. S ty le Engine

4

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

Page 62: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SReusing project par ts in modules

4

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 MODULESWith 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 wi th Modules

E X P O R T I N G P R O J E C T M O D U L E

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.

Page 63: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SReusing project par ts in modules

4

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

Page 64: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SReusing project par ts in modules

4

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 S I N G P R O J E C T M O D U L E 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 M P O R T I N G P R O J E C T M O D U L E 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 H A R I N G P A C K A G E S

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.

Page 65: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SReusing project par ts in modules

4

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

Page 66: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SReusing project par ts in modules

4

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 P E N I N G Y O U R M O D U L E A S A P R O J E C T

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 E L O A D I N G Y O U R M O D U L E

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.

Page 67: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SReusing project par ts in modules

4

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 A C K A G E S D E P E N D E N C I E S B Y R E L A T I O N S H I P S

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

Page 68: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SReusing project par ts in modules

4

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.

Page 69: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SReusing project par ts in modules

4

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

Page 70: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SReusing project par ts in modules

4

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 E P E N D E N C I E S B Y R E F E R E N C E

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 I A G R A M S D E P E N D E N C I E S

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.

Page 71: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SReusing project par ts in modules

4

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

Page 72: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SReusing project par ts in modules

4

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.

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.

4-71 © 2005 No Magic, Inc.

Page 73: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SProf i les

4

PROFILESProfiles 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 <<profile>>, 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.

Creat ing Prof i les

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.

Us ing and Import ing Prof i les

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

© 2005 No Magic, Inc 4-72

Page 74: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SProf i les

4

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.

Page 75: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SModel Di f ferencing

4

Expor t ing Prof i les

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 DIFFERENCINGSince 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 compar ison

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

Page 76: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SModel Di f ferencing

4

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.

• <current project>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 N D E R S T A N D I N G M O D E L D I F F E R E N C E S

All model version differences are displayed in the Difference Viewer dialog box.

4-75 © 2005 No Magic, Inc.

Page 77: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SModel Di f ferencing

4

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

Page 78: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SModel Di f ferencing

4

• 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

Expand All

Both trees are expanded.

Collapse All

Both trees are collapsed.

Go to Previous Difference

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

Go to Next Difference

Select the difference, which is next to the selected one.

Filter

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

4-77 © 2005 No Magic, Inc.

Page 79: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SModel Di f ferencing

4

The first column of the Property window contains the same properties as the Quick Properties tab in the Browser. The second column title is left-hand project name (with path) for local projects, and teamwork project name and version number for teamwork projects. The third column title is right-hand project name (with path) for local projects, and teamwork project name and version number for teamwork projects. Modified properties are marked with the same color as in model element tree.

Diagrams Compar ison

To compare diagrams

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

Include Relation Ends

Relations are displayed in elements specification. Relation added to element means that element is marked as modified.

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.

Find Next Element

The Find dialog box appears. Search for elements within the corresponding project.

More>><<Less

More/Less button shows/hides element properties table. By default properties table is hidden.

Export Differences

Creates .html or .txt differences report. In the appeared Save Difference Report As dialog box, choose the directory where you want to save this report. NOTE: *.html format is suitable for viewing difference

report. If you want to copy this report to other program, please use *.txt format.

Button Function

© 2005 No Magic, Inc 4-78

Page 80: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SModel Di f ferencing

4

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.

Page 81: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SWorking wi th mul t ip le projects

4

Buttons available in the Diagrams Difference Viewer dialog box:

WORKING WITH MULTIPLE PROJECTSBecause 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.

Button Function

Synchronize Zooming

If pressed, zooming affects both diagrams: zooming one diagram invokes zooming of another diagram.

Synchronize Scrolling

If pressed, scrolling one diagram invokes scrolling of another diagram.

Mark Changes

If pressed, places where diagram has changed are marked on both diagrams.

Print Diagram

Prints the corresponding diagram together with marked changes.

Zoom 1:1

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

Fit in Window

Zooms the corresponding diagram(s) to the size that fits in window.

Zoom In

Zooms the corresponding diagram(s) in.

Zoom Out

Zooms the corresponding diagram(s) out.

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

© 2005 No Magic, Inc 4-80

Page 82: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SWorking wi th mul t ip le projects

4

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:

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.

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.

4-81 © 2005 No Magic, Inc.

Page 83: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SUsing Browser

4

USING BROWSERThe 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

Page 84: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SUsing Browser

4

T H E B R O W S E R W I N D O W P A R T S

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.

Page 85: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SUsing Browser

4

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 t ree

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

Page 86: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SUsing Browser

4

• 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.

Page 87: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SUsing Browser

4

D A T A B R A N C H

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 O D E E N G I N E E R I N G S E T S

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

Page 88: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SUsing Browser

4

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.

Page 89: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SUsing Browser

4

Diagrams t ree

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

Page 90: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SUsing Browser

4

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.

Inher i tance t ree

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.

Page 91: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SUsing Browser

4

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 Ex tens ions 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

Page 92: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SUsing Browser

4

Search Resul ts 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 wi th model e lements in the Browser t ree

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.

Page 93: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SUsing Browser

4

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

Mul t ip le se lect ion

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

Page 94: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SUsing Browser

4

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.

Documentat ion/Zoom Control /Proper t ies

D O C U M E N T A T I O N T A B

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.

Page 95: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SUsing Browser

4

To write documentation for the selected model element

1 Click the Documentation tab.2 Type information.

Z O O M C O N T R O L T A B

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 R O P E R T I E S T A B

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

Page 96: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SSearching

4

Figure 38 -- Customize Properties dialog box

SEARCHINGMagicDraw 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.

Page 97: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SSearching

4

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

Page 98: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SSearching

4

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 <a*b>, the system looks for items with <a> at the beginning and <b> at the end of the string. If you define such string as <?agicDraw>, all strings containing <agicDraw> will be found.

Type Select a type of elements from the proposed items, or leave this field empty.

4-97 © 2005 No Magic, Inc.

Page 99: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SSearching

4

Java Regular Express ions

M E T A C H A R A C T E R S

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).

ValueOnly available for Search Element by Tagged Value and Constraint Value tab.

Select or type a value of Tagged Value or Constaint.

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 Words Only

Searches for the groups of items with names that exactly match 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 Unused in Diagrams

Searches only elements that do not contain symbols in any diagram.

Java Regular Expression

In the Section “Java Regular Expressions” on page 4-98, you may find several expressions that will help you to make a search in MagicDraw.

Clear Previous Results

Removes from the Browser tree all previously found items.

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.

© 2005 No Magic, Inc 4-98

Page 100: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SSearching

4

C H A R A C T E R S E T S

Predefined character sets:

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 R O U P I N G

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 U A N T I F I E R S

Quantifiers allow specify a number of character X appearance.

Example:

Regular expression: Cla(s{2})

[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)

. 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

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

4-99 © 2005 No Magic, Inc.

Page 101: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SSearching

4

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

B O U N D A R Y M A T C H E R S

Boundary matchers help to match strings more precisely. Helps to match particular word, matches at the beginning of the input or line.

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 M B E D D E D F L A G E X P R E S S I O N S

Allows to set properties for regular expression matcher.

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

^ 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

(?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 ".","^","$"

© 2005 No Magic, Inc 4-100

Page 102: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SSearching

4

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.

Page 103: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SSearching

4

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

Page 104: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

WO R K I N G WI T H PR O J E C T SSearching

4

NOTE If resource requires fee-paying, in the Resource Manager window, the Price column price of the particular resource is displayed.

MagicDraw RConver ter

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

Meaning of text colors

In one row are listed text color meanings:• 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>>/<<Less Expands / Collapse main Resource Manager window with additional fields.In the following fields are listed all data of the selected in the list resource:• Name, Resource home page, Provider, Description• Required table (with Name, Required, Status columns). If

resource is installed but newer version is available on web, required table shows newest version requirements.

Check for Updates The Check for Updates button is inactive if resource list is already successfully downloaded.

Download/Install Downloads selected resources and installs. The Download/Install button is inactive if no resources are selected.

Remove Button is active if at least one resource is selected with states ñ ìnot installedî or ìinstalledî. Resources of other states may not be removed from RM list. Remove functionality is not available for necessary resources.

Import The Open dialog is invoked. Import the resource you need.

4-103 © 2005 No Magic, Inc.

Page 105: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C S 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 1103 "Drawing Relationship paths", on page 1134 "Smart Manipulation", on page 1145 "Selection & Multiple Selection", on page 1166 "Dragging, Copying, Cutting, and Pasting", on page 1167 "Specifying Model Elements", on page 1188 "Model Traceability", on page 1309 "Laying out", on page 13810"Zooming", on page 14711"Using Grid", on page 14812"Assigning Shortcut Keys", on page 14913"Printing", on page 15014"Model Elements Common in all Diagrams", on page 154

WORKING WITH DIAGRAMSTIP! 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

Page 106: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SWorking wi th Diagrams

5

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.

Page 107: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SWorking wi th Diagrams

5

• 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

Page 108: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SWorking wi th Diagrams

5

• 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.

Diagram Proper t ies

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

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.

5-107 © 2005 No Magic, Inc.

Page 109: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SWorking wi th Diagrams

5

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 Numbers(Available only for Activity, Communication and Sequence diagrams)

Displays message numbers on the diagram.

© 2005 No Magic, Inc 5-108

Page 110: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SWorking wi th Diagrams

5

T A B L E W I T H D I A G R A M I N F O R M A T I O N

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.

Use Advanced Numbering(Available only for Activity, Communication and Sequence diagrams)

Displays more detailed message numbering on the diagram.

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.

Element name Function

5-109 © 2005 No Magic, Inc.

Page 111: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SDrawing Shapes

5

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

Page 112: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

5-

D I A G R A M S B A S I C SDrawing Shapes

5

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.

111 © 2005 No Magic, Inc.

Page 113: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SDrawing Shapes

5

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

Page 114: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SDrawing Relat ionship paths

5

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.)

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.

Relations Select the relationships you want to display on the diagram.

Always create new symbols

When this check box is selected, the new symbol is created even if a related element already has a symbol in the diagram.

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.

Option name Function

5-113 © 2005 No Magic, Inc.

Page 115: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SSmart Manipulat ion

5

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 MANIPULATIONSmart 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

Page 116: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SSmart Manipulat ion

5

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.

Page 117: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SSelect ion & Mul t ip le Select ion

5

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 PASTINGMove 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

Page 118: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SDragging, Copying, Cut t ing, and Pas t ing

5

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.

Page 119: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SSpeci fy ing Model E lements

5

SPECIFYING MODEL ELEMENTSYou 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.

Speci f icat ion dia log 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

Page 120: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SSpeci fy ing Model E lements

5

D O C U M E N T A T I O N / H Y P E R L I N K S T A B

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.

Page 121: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SSpeci fy ing Model E lements

5

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

Insert Hyperlink

Add a hyperlink to the desired file, model element, or web page for the selected text. The Insert Hyperlink dialog box opens.

Unordered list

Change text style to bullet list.

Ordered list Change text style to numbered list.

Decrease Indent

Decrease indent by moving text closer to the left border.

Increase Indent

Increase indent by moving text closer to the right border.

HTML Source

Show text with HTML source characters.

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.

Button Function

© 2005 No Magic, Inc 5-120

Page 122: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SSpeci fy ing Model E lements

5

R E L A T I O N S T A B

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.

Page 123: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SSpeci fy ing Model E lements

5

T A G G E D V A L U E S T A B

Figure 7 -- Specification dialog box. Tagged Values tab

Element name Function

Profile Lists profiles tavailable for the current project.

Expand All Tree Branches

If tag definitions are grouped and those groups are collapsed, expands those groups.

Collapse All Tree Branches

If tag definitions are grouped and those groups are expanded, collapses those groups.

Show Tag Definitions with Values

Displays in the list only those tag definitions that have values.

Show Tag Definitions Groups

If tag definitions are grouped into specific “packages”, shows those “packages” on the list by grouping tag definitions.

Group By Stereotype

Sorts tag definitions by the assigned stereotypes.

© 2005 No Magic, Inc 5-122

Page 124: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SSpeci fy ing Model E lements

5

Show Tag Definitions Types

Displays types of tag definitions in the list.

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 (available only when the tag definition has value)

Removes the value(s) from the selected tag definition.

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 added)

Type or choose the value.

Edit Edit the selected value.

Add Add the new value.

Remove Remove the selected value.

Element name Function

5-123 © 2005 No Magic, Inc.

Page 125: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SSpeci fy ing Model E lements

5

C O N S T R A I N T S T A B

Figure 8 -- Specification dialog box. Constraints tab

G E N E R A L T A B

Name text box

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

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.

© 2005 No Magic, Inc 5-124

Page 126: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SSpeci fy ing Model E lements

5

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.

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.

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.

5-125 © 2005 No Magic, Inc.

Page 127: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SSpeci fy ing Model E lements

5

A T T R I B U T E S T A B

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

Page 128: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

5-

D I A G R A M S B A S I C SSpeci fy ing Model E lements

5

O P E R A T I O N S T A B

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.

127 © 2005 No Magic, Inc.

Page 129: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SSpeci fy ing Model E lements

5

T E P L A T E P A R A M E T E R S T A B

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

Page 130: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SSpeci fy ing Model E lements

5

B U T T O N S A V A I L A B L E I N T H E S P E C I F I C A T I O N D I A L O G B O X E S

Format t ing 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.

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.

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.

NOTE To apply changes made in the Project Options dialog box, click Apply.

5-129 © 2005 No Magic, Inc.

Page 131: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SModel Traceabi l i t y

5

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.

Owner of the model e lement

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 TRACEABIL ITY

NOTE To apply changes made in the Project Options dialog box, click the Apply button in the Styles tab.

© 2005 No Magic, Inc 5-130

Page 132: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SModel Traceabi l i t y

5

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 Funct ional i t y

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 E lements funct ional i t y

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.

Page 133: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SModel Traceabi l i t y

5

F I N D U S A G E S / D E P E N D E N T E L E M E N T S O P T I O N S D I A L O G B O X 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 result

Search results provide the complete list of used or dependent relationships together with other results.

Treat model elements at the end of relationships as search results

Relationships are skipped and only usages/dependent elements between the model elements connected with these relationships are displayed.

© 2005 No Magic, Inc 5-132

Page 134: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SModel Traceabi l i t y

5

E L E M E N T S U S I N G / D E P E N D E N C I E S W I N D O W S 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.

List usages/dependent elements of every child element

Usages/dependencies of inner elements (beneath the level of the current element) are listed in the search results list. 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 tab

If you want new Elements Using/Dependencies windows displayed for every new search, select Show results in the new tab check box.

Show this dialog before searching

If the Show this dialog before searching check box is 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.

Element Name Function

5-133 © 2005 No Magic, Inc.

Page 135: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SModel Traceabi l i t y

5

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 Tree

In the usages/dependencies table, select the record. Click the 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 contain current Usages/Dependencies

Diagrams, which are referenced in the usages/dependencies tables, are opened. In opened diagrams, the view is focused on 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 Names

The full path is displayed next to the element name.NOTE For a symbol this button is not valid.

© 2005 No Magic, Inc 5-134

Page 136: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SModel Traceabi l i t y

5

Def in ing Hyper l inks

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.

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 Usages/Dependent Elements Options

The Find Usages/Dependent Elements Options dialog box opens.

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.

5-135 © 2005 No Magic, Inc.

Page 137: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SModel Traceabi l i t y

5

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.

• 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.

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

I N S E R T H Y P E R L I N K D I A L O G B O X

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.

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.)

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.

© 2005 No Magic, Inc 5-136

Page 138: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SModel Traceabi l i t y

5

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/ SymbolCreates a hyperlink that goes to the selected model element.

Text to display A text that will be displayed as a hyperlink.

Select Element / Symbol “…”

The Select Model Element dialog box opens. Select the model element you want to link to.

Select from list A list of all items that have previously been selected as links.

Clear Remove all items from the Select from list.

Active If selected, activates the hyperlink on the diagram.

Web PageCreates a hyperlink that goes to the specified Web page.

Text to display A text that will be displayed as a hyperlink.

Type the Web Page name “…”

Type the web page URL. 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.

Page 139: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SLaying out

5

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 OUTWith 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

File Creates a hyperlink that goes to the specified file.

Text to display A text that will be displayed as a hyperlink.

Type the file name “…”

Type the path to the file you want to be opened or click the “...” button.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.

Tab name Box Function

© 2005 No Magic, Inc 5-138

Page 140: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SLaying out

5

• 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

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.

Option Values Default Value Description

Use Existing Drawing as Sketch

boolean false The layouter tries to "orthogonalize" the given sketch by interpreting it and without making too many modifications in respect to the original drawing.

Layout Only Top Level Symbols

Boolean False Keeps the relative position of symbols inside packages and performs the top level layout.

Group Layout Quality

0-1 1 Set the desired layout quality. Higher values result in less connection crossings and smaller layout area, but also increased computation time.

Orthogonal Grid

Integer 50 Defines the virtual grid spacing used by the layouter. Each shape center point lies on a grid point.

5-139 © 2005 No Magic, Inc.

Page 141: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SLaying out

5

Orthogonal layout options

Option Values Default Value Description

Reverse Orientation in Activity Diagram

Boolean True If True, orientation is reversed in activity diagram.

Minimal Layer Distance

Integer 40 Determines the minimal distance between shapes that reside in adjacent layers.

Minimal Shape Distance

Integer 30 Determines the minimal distance between adjacent shapes that reside in the same layer.

Minimal Path Distance

Integer 30 Determines the distance between adjacent pairs of horizontal path segments and between horizontal path segments and shapes.

Minimal First Segment Length

Integer 10 Determines the minimal length of the first 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 Bottom, Bottom to Top, Left to Right, Right to Left

Top to Bottom

Determines main layout orientation.

Shape Placement

Linear Segments, Polyline, Simplex, Pendulum, Median Simplex, Tree

Simplex Linear Segments. Aligns shapes in such a way that path segments tend to have very few bends. It is a very good choice in combination with Path Routing set to Orthogonal. However this greatly increases layout width. • Polyline. Aligns shapes by slightly

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

Page 142: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SLaying out

5

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

Path Routing Oblique, Orthogonal

Orthogonal • Oblique. Paths are routed to oblique style with a certain number of bends.

• Orthogonal. Paths are routed to orthogonal style. Orthogonal path routing increases the height of the layout.

Randomization Rounds

Integer 40 Determines the number of rounds that are 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 Level Symbols

Boolean False Keeps the relative position of symbols inside packages and performs the layout only on the top level.

Make Sub Trees Boolean True Inheritance paths are joined into inheritance arcs.

Option Values Default Value Description

Layout Style Directed, Balloon,Horizontal-Vertical

Directed • Directed. The tree is laid out hierarchically with the root shape on the top. This is a good choice for 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.

Option Values Default Value Description

5-141 © 2005 No Magic, Inc.

Page 143: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SLaying out

5

Make Sub Trees Boolean True Inheritance paths are joined into inheritance arcs.

Directed

Minimal Layer Distance

Integer 50 Determines the minimal distance between parent and child shapes.

Minimal Shape Distance

Integer 50 Determines the minimal distance between siblings of a shape.

Orientation Top to Bottom, Bottom to Top, Left to Right, Left to Right

Top to bottom

Determines the main layout orientation. The layouter tries to arrange shapes in such a way that all paths point in the main layout direction.

Port Style Border Centered, Border Distributed

Border Centered

Determines the way how paths are attached to shapes. • Border Centered. Paths are attached

to the center of the border of corresponding shapes.

• Border Distributed. Path attachment points are distributed along the border of corresponding shapes.

Orthogonal Path Routing

Boolean True If selected, all paths are routed orthogonally in a bus-like fashion. If not selected, paths are routed as straight line segments.

Balloon

Root Shape Position

Directed Root, Center Root

Center Root • Directed Root. Chooses a shape with 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 Wedge

0-360 340 Determines the angular range of the 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 Wedge

0-360 360 Determines the angular range of the sector that will be reserved around the root shape to accommodate attached subtrees.

Minimal Path Length

Integer 50 Determines the minimal length of a path.

Compactness Factor

0.1-0.9 0.5 The smaller the compactness factor, the shorter paths and more compact overall layout.

Horizontal-Vertical

Option Values Default Value Description

© 2005 No Magic, Inc 5-142

Page 144: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SLaying out

5

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

Horizontal Spacing

Integer 20 The minimal horizontal distance between adjacent shapes.

Vertical Spacing integer 20 The minimal vertical distance between adjacent shapes.

Option Values Default Value Description

Preferred Path Length

Integer 50 Specify the preferred length of all paths. The layouter tries to arrange the shapes in such a way that paths have the determined path length.

Obey Shape Size

Boolean True If True, the distance between two 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 Beautifier

Boolean True If True, optimizes tree-like substructures of the diagram. Optimization process might ignore some layout options.

Layout Only Top Level Symbols

Boolean False If True, the algorithm keeps the relative position of symbols inside of packages and performs the layout only on the top level.

Package Shape Compactness

0-1 0.2 Control the compactness of package 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.

Option Values Default Value Description

5-143 © 2005 No Magic, Inc.

Page 145: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SLaying out

5

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 Value

Description

Layout Style Compact, Isolated, Single Cycle

Compact • Compact. Each group will consist of shapes that are reachable by 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 Distance

Integer 100 Determines the minimal distance between borders of two adjacent shapes on a common circle. The smaller the distance, the more compact resulting layout.

Auto Circle Radius

Boolean True If True, determines the radius of each circle in the layout automatically. An automatically chosen radius is usually the smallest possible radius that obeys Minimal Node Distance.

Fixed Circle Radius

Integer 200 If Auto Circle Radius is not set, this option determines the fixed radius for all circles in the resulting layout. Minimal Node Distance will be ignored in this case.

Preferred Child Wedge

0-360 340 Determines the angular range of the 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

Page 146: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SLaying out

5

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

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.

Minimal Path Length

Integer 50 Determines the minimal length of a path that connects two shapes that lie on separate circles. The smaller the chosen value, the more compact the resulting layout.

Maximal Deviation Angle

10-360 100 The bigger the chosen value, the 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 Factor

0.1-0.9 0.5 The smaller the compactness factor, the shorter paths and the more compact the overall layout.

Option Values Default Value

Description

Minimal Distance

Integer 20 Specifies the minimal allowed distance between shapes and paths.

Use Existing Bends

Boolean False Specifies whether existing bends should be used as an initial solution for the new routing.

Route Only Necessary

Boolean False If True, only paths that violate the minimal distance criterion will be rerouted.

Option Values Default Value

Description

5-145 © 2005 No Magic, Inc.

Page 147: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SLaying out

5

Organic Path layout options

Class Diagram Layouter

Class diagram layouter uses different layout algorithms to improve class diagram readability.

Class Diagram layout options

Option Values Default Value Description

Minimum Path Distance

Integer 1 Determines the minimum distance between any two path segments.

Custom Minimum Distance to Nodes

Integer 10 Determines the distance between any path segment and any shape side. The path router strictly adheres to the set value. Router 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 Vs. Center Driven Search

0-1 1 Determines the ratio between two complementary weighting strategies when 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 Minimization

Boolean True If False, the number of crossings seen at a shape side can increase a lot. Since this option has a positive effect on a diagram "readability," it is enabled by default.

Option Values Default Value Description

Minimal Layer Distance

Integer 50 Determines the minimal distance between parent and child shapes.

Minimal Shape Distance

Integer 50 Determines the minimal distance between the siblings of a shape.

Orientation Top to Bottom, Bottom to Top, Left to Right, Left to Right

Top to bottom Determines the main layout orientation. The layouter tries to arrange shapes in such a way that all paths point in the main layout direction.

© 2005 No Magic, Inc 5-146

Page 148: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SZooming

5

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.

ZOOMINGZooming 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 .

Compactness Factor

0-1 1 Adjusting this value can lead to a variety of 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 Vs. Center Driven Search

0-1 1 Determines the ratio between two complementary weighting strategies when 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 Generalization Hierarchies

Boolean True Classes connected by generalization paths are organized into hierarchies

Build Realization Hierarchies

Boolean False Classes connected by realization paths are organized into hierarchies

Build Containment Hierarchies

Boolean False Classes connected by containment paths are organized into hierarchies

Make Sub Trees Boolean True If enabled, inheritance paths will be joined into inheritance arcs.

Option Values Default Value Description

5-147 © 2005 No Magic, Inc.

Page 149: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SUsing Grid

5

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.)

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

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.

© 2005 No Magic, Inc 5-148

Page 150: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SAss igning Shor tcut Keys

5

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.

Page 151: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SPr in t ing

5

PRINTINGIn 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 R I N T R A N G E T A B

In the Print Range tab, select the item you want to print.

© 2005 No Magic, Inc 5-150

Page 152: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SPr in t ing

5

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.

Page 153: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SPr in t ing

5

P R I N T O P T I O N S T A B

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 Diagram

Show the page boundary on the diagram pane. 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

Page 154: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SPr in t ing

5

P R I N T H E A D E R / F O O T E R T A B

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

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.

Element name Function

5-153 © 2005 No Magic, Inc.

Page 155: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SModel E lements Common in al l Diagrams

5

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

MODEL ELEMENTS COMMON IN ALL DIAGRAMSThe following symbols are only graphical symbols and do not possess data.

Model elements Button Function Notation

Text Box

Text Box (HTML text)

(X)

(SHIFT+X)

Type text directly on the diagram.

Note

Note (HTML text)

(N)

(SHIFT+N)

A graphical symbol containing textual information. Use a note to add any needed information to your diagram. Usually a note is connected with another symbol, using a note anchor line.

Anchor to Note

(H)

Relates symbols and notes. Use a note anchor to relate any symbol to a note. You 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.

ConstraintNOTE

To select a constraint, right-click the Note Anchor button.

(SHIFT+H)

The presentation of a constraint between two graphical symbols.

© 2005 No Magic, Inc 5-154

Page 156: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SModel E lements Common in a l l Diagrams

5

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.

Const ra in t 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:

Containment

SHIFT+C

Shows a class, package or other model element declared within another model element.

Separator

(W)

Separates different parts of a diagram with a horizontal line.

Rectangular Shape

Separates different parts of a diagram with a rectangular shape.

Model elements Button Function Notation

5-155 © 2005 No Magic, Inc.

Page 157: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SModel E lements Common in al l Diagrams

5

• Choose <new>. 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.

Documentat ion

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

Page 158: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

D I A G R A M S B A S I C SModel E lements Common in a l l Diagrams

5

5-157 © 2005 No Magic, Inc.

Page 159: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M S 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

Page 160: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SSys tem Views

6

SYSTEM VIEWSMost 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 V iew

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.

Page 161: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SClass Diagram

6

Process v iew

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 v iew

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 v iew

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 DIAGRAMA 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

Page 162: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SClass Diagram

6

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.

Page 163: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SClass Diagram

6

Class d iagram elements

Model element Button (hot key)

Notation

ClassA descriptor for a set of objects with similar structures, behaviors, and relationships.

(C)

EnumerationA user-defined data type whose instances are a set of user-specified named enumeration literals. The literals have a relative order but no algebra is defined on them.

(K)

InterfaceThe description of a visible behavior of a class, a component or a package. Interface with the suppressed attributes and operations.

(I)

PortPorts represent interaction points between a classifier and its environment. A port has the ability to specify that any requests arriving at this port are handled.

(Shift_F11)

PackageA group of classes and other model elements.

(P)

© 2005 No Magic, Inc 6-162

Page 164: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SClass Diagram

6

Subsystem A subsystem is treated as an abstract single unit and groups model elements by representing the behavioral unit in a physical system.

(Y)

ModelA model is an abstraction of a physical system from a particular point of view. A model contains a hierarchy of packages/subsystems and other model elements that describe the system.

(M)

N-ary associationAn association among two or more classes (a single class may appear more than once).

(O)

Model element Button (hot key)

Notation

6-163 © 2005 No Magic, Inc.

Page 165: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SClass Diagram

6

CollaborationA 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. 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.

(Q)

ObjectAn instance of a class.

(SHIFT+O)

AssociationA connection among classes, which means that there is also a connection among objects of those classes.

(S)

Aggregation An aggregation is an association that represents a whole-part relationship.

(A)

Model element Button (hot key)

Notation

© 2005 No Magic, Inc 6-164

Page 166: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SClass Diagram

6

CompositionA composition is a form of aggregation with stronger ownership and coincident lifetime of part with the whole.

(F)

ContainmentShows 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.

(SHIFT+C)

GeneralizationA relationship between a more general and a more specific element. (G)

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

(R)

Model element Button (hot key)

Notation

6-165 © 2005 No Magic, Inc.

Page 167: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SClass Diagram

6

RealizationRelationship between class and interface.

(E)

DependencyIndicates a semantic relationship between two or more model elements. It relates model elements themselves and does not require a set of instances for its meaning.

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

(D)

(T)

(U)

(B)

(J)

Link AttributeVisual tie between parts of association class – association part and class part.

(L)

Model element Button (hot key)

Notation

© 2005 No Magic, Inc 6-166

Page 168: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SUse Case Diagram

6

USE CASE DIAGRAMA 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.

LinkA connection between two or more objects.

(SHIFT+L)

Stereotype

(SHIFT+S)

Model element Button (hot key)

Notation

6-167 © 2005 No Magic, Inc.

Page 169: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SUse Case Diagram

6

Use Case diagram elements

Element Button (hot key)

Notation

ActorActors 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.

(A)

Use CaseA use case is a kind of behavior-related classifier that represents a declaration of an offered behavior. 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.

(U)

PackageA group of classes and other model elements. A package may contain other packages. (P)

SubsystemA subsystem is treated as an abstract single unit. It groups model elements by representing the behavioral unit in a physical system.

(Y)

System BoundaryAnother representation of a package. A system boundary element consists of use cases related by Exclude or Include (uses) relationships, which are visually located inside the system boundary rectangle.

(B)

© 2005 No Magic, Inc 6-168

Page 170: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SUse Case Diagram

6

CollaborationA collaboration is represented as a type of classifier. It 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. 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.

(Q)

AssociationThe 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 is the only relationship between actors and use cases.

(S)

Extend 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.

(E)

IncludeAn 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.

(C)

DependencyIndicates a semantic relationship among two or more model elements. (D)

Element Button (hot key)

Notation

6-169 © 2005 No Magic, Inc.

Page 171: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SCommunicat ion Diagram

6

COMMUNICATION DIAGRAMThe 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.

GeneralizationA relationship between a more general and a more specific element. (G)

Interface RealizationA specialized realization relationship between a classifier and an interface. This relationshipsignifies that the realizing classifier conforms to the contract specified by the interface.

(R)

ContainmentShows 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.

SHIFT+C

Element Button (hot key)

Notation

© 2005 No Magic, Inc 6-170

Page 172: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SSequence Diagram

6

Communicat ion Diagram elements

SEQUENCE DIAGRAMA 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

Element Button (hot key)

Notation

LifelineA lifeline represents an individual participant in the Interaction. Lifelines represent only one interacting entity.

(O)

ConnectorSpecifies a link that enables communication between two or more lifelines.Each connector may be attached to two or more connectable elements, each representing a set of lifelines.

(C)

Connector to SelfSelf connector for self-calls. It begins and ends on the same lifeline. (S)

Message to RightMessage to LeftA Message defines a particular communication between Lifelines of an Interaction. It implies that one object uses the services of another object, or sends a message to that object. A 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.

(R)

(E)

6-171 © 2005 No Magic, Inc.

Page 173: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SSequence Diagram

6

significant to the operation, and you may rearrange them as necessary. Sequence diagram elements

Model elements Button (hot key)

Notation

Classifier RoleAn instance of a class. An object has identity, attribute values, a unique name, a state, and a class as the type of identifier.LifelineRepresents the existence of an object at a particular time.

Activation BarFocus of control. Shows the period during which an object is performing an action either directly or through a subordinated procedure.

(O)

Interaction UseReference to collaboration diagram, sequence diagram and time diagram can be created.

(SHIFT+T)

Combined FragmentA fragment of sequence diagram can be separated.

(F)

© 2005 No Magic, Inc 6-172

Page 174: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SSequence Diagram

6

Message Default: synchronous uninterpretedA communication between objects that conveys information with the expectation that action will ensue. The receipt of a message is one type of event.

(M)

Message to Self

(S)

Diagonal MessageRequires some time to arrive, during which another action occurs. (D)

Concurrent LifelineA conditional branch in the message flow.

(L)

Recursive messageA connected set of messages can be enclosed and marked as iteration. (R)

Model elements Button (hot key)

Notation

6-173 © 2005 No Magic, Inc.

Page 175: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SState Diagram

6

STATE DIAGRAMThe 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.

S ta te Diagram elements

NOTE

© 2005 No Magic, Inc 6-174

Page 176: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SState Diagram

6

If a black arrow is placed on a button, right-click the button, to open other available buttons.

Model elements Button (hot key)

Notation

StateA state models a situation during which some (usually implicit) invariant 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.

(SHIFT+S)

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.

(SHIFT+C)

Orthogonal StateAn orthogonal state is a composite state with at least 2 regions. (C)

Submachine StateA submachine state specifies the insertion of the specification of a submachine state machine. Submachine state is a decomposition mechanism that allows factoring of common behaviors and their reuse.

(A)

Initial Denotes an initial state when an object is created.

(I)

6-175 © 2005 No Magic, Inc.

Page 177: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SState Diagram

6

Final StateDenotes an object’s destruction or the end of collaboration. (F)

Terminate

Entry PointAn 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 PointAn 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 ReferenceConnection point references of a 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.

(Y)

Deep History Represents the most recent active configuration of the composite state that directly contains this pseudostate; e.g. the state configuration that was active when the composite state was last exited.

(P)

Model elements Button (hot key)

Notation

© 2005 No Magic, Inc 6-176

Page 178: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SState Diagram

6

Shallow HistoryRepresents 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.

(SHIFT+R)

Junction Junction vertices are semantic-free vertices that are used to chain together multiple transitions. They are used to construct compound transition paths between states.

(J)

Choice Choice points are used for splitting transition paths. In the dynamic choice point, a decision on which branch to take is only made after the transition from State1 is taken and the choice point is reached.

(O)

Fork/Join Vertical Helps to control parallel actions.

(G)

Fork/Join Horizontal Helps to control parallel actions.

(D)

TransitionThe starting time for a relative time event may only be omitted for a time event that is the trigger of a state machine.

(T)

Model elements Button (hot key)

Notation

6-177 © 2005 No Magic, Inc.

Page 179: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SAct iv i ty Diagram

6

ACTIVITY DIAGRAMAn 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.

Transition to SelfWhen an object returns to the same state after the specified event occurs. (E)

Model elements Button (hot key)

Notation

© 2005 No Magic, Inc 6-178

Page 180: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SAct iv i ty Diagram

6

Act iv i t y Diagram elements

Element Button (hot key)

Notation

Action 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. When the action executes and what its actual inputs are is determined by the concrete action and the behaviors in which it is used.

(B)

Call Operation ActionAn action that transmits an operation call request to the target object, where it may cause the invocation of associated behavior. The argument values of the action are available to the execution of the invoked behavior.

(S)

Object NodeActivity nodes are introduced to provide a general class for nodes connected by activity edges. ActivityNode replaces the use of StateVertex and its children for activity modeling in UML 1.4

(SHIFT+B)

6-179 © 2005 No Magic, Inc.

Page 181: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SAct iv i ty Diagram

6

Data StoreA data store node is a central buffer node for non-transient information. A data store 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.

(SHIFT+D)

Activity Parameter NodeIt 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 FlowIs an activity edge that can have objects or data passing along it. An object flow models the flow of values to or from object nodes.

(SHIFT+ F)

Control FlowIs an edge that starts an activity node after the previous one is finished. Objects and data cannot pass along a control flow edge.

(F)

Send Signal ActionIs 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.

(SHIFT+ S)

Element Button (hot key)

Notation

© 2005 No Magic, Inc 6-180

Page 182: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SAct iv i ty Diagram

6

Accept Event ActionIs an action that waits for the occurrence of an event meeting specified conditions. Accept event actions handle event occurrences detected by the object owning the behavior.

(E)

Initial NodeAn initial node is a starting point for executing an activity. An initial node has no incoming edges.

(T)

Flow FinalFinal node that terminates a flow. Destroys all tokens that arrive at it. It has no effect on other flows in the activity.

(L)

DecisionDecision is a control node that chooses between outgoing flows. A decision node has one incoming edge and multiple outgoing activity edges.

(G)

MergeA merge node is a control node that brings together multiple alternate flows. It is not used to synchronize concurrent flows but to accept one among several alternate flows.

(G)

Element Button (hot key)

Notation

6-181 © 2005 No Magic, Inc.

Page 183: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SAct iv i ty Diagram

6

Fork/Join Horizontal Helps to control parallel actions.

(K)

Fork/Join Vertical Helps to control parallel actions.

(SHIFT+K)

Exception HandlerAn exception handler is an element that specifies a body to execute in case the specified exception occurs during the execution of the protected node.

(P

Structured Activity NodeA 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 PinAn input pin is a pin that holds input values to be consumed by an action.They are object nodes that receive values from other actions through object flows.

(SHIFT+I)

Output PinA pin that holds output values produced by an action. Output pins are object nodes and deliver values to other actions through object flows.

(SHIFT+O)

Element Button (hot key)

Notation

© 2005 No Magic, Inc 6-182

Page 184: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SImplementat ion Diagram

6

IMPLEMENTATION DIAGRAMImplementation 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 d iagram overv iew

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.

SwimlanesSwimlanes are used to organize responsibility for actions and subactivities according to class, dividing an activity diagram.

(SHIFT+V)

Element Button (hot key)

Notation

6-183 © 2005 No Magic, Inc.

Page 185: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SImplementat ion Diagram

6

Deployment d iagram overv iew

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

Page 186: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SImplementat ion Diagram

6

Implementat ion Diagram elements

Element Button (hot key)

Notation

ComponentComponent may be used to define the requirements for each physical software element

(K)

Component Instance

(A)

Port

(SHIFT+F11)

NodeA Node is a physical object that represents a processing resource, generally having at least a memory and often processing capability as well.

(O)

Execution EnvironmentElement is used for indicating that node is execution environment.

DeviceA physical computational resource with processing capability upon which artifacts may be deployed for execution.

6-185 © 2005 No Magic, Inc.

Page 187: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SImplementat ion Diagram

6

Node Instance

(T)

Execution Environment InstanceElement is used for indicating that node is execution environment.

Device Instance

PackageA group of classes and other model elements.

(P)

ArtifactAn artifact represents a physical piece of information that is used 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.

(B)

Element Button (hot key)

Notation

© 2005 No Magic, Inc 6-186

Page 188: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SImplementat ion Diagram

6

Deployment SpecificationIt indicates set of properties that define how a component should be deployed.

Artifact Instance

Deployment Specification Instance

Interface RealizationThe classifier at the tail of the arrow implements the interface at the head of the arrow or uses that interface.

RealizationA Realization signifies that the client set of elements are an implementation of the supplier set, which serves as the specification.

InterfaceAll functionality implemented by a particular component. (F)

InstanceAn instance specifies existence of an entity in a modeled system and completely or partially describes the entity. It has a unique name, state, and classifier as the type of identifier.

(SHIFT+O)

Element Button (hot key)

Notation

6-187 © 2005 No Magic, Inc.

Page 189: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SImplementat ion Diagram

6

DependencyShows an undirectional relationship.

(D)

UsageA usage is a relationship in which one element requires another element (or set of elements) for its full implementation or operation.

Delegation ConnectorA 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 ConnectorAn assembly connector is a connector between two components that defines that one component provides the services that another component requires.

Element Button (hot key)

Notation

© 2005 No Magic, Inc 6-188

Page 190: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SImplementat ion Diagram

6

DeploymentA deployment is the allocation of deployment target to an artifact or artifact instance.

ManifestationA manifestation is the concrete physical rendering of one or more model elements by an artifact.

Generalization

(G)

LinkA relationship between specification element and implementation element.

(L)

Communication PathA communication path is an association between two DeploymentTargets, through which they are able to exchange signals and messages.

Element Button (hot key)

Notation

6-189 © 2005 No Magic, Inc.

Page 191: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SComposi te S t ructure Diagram

6

COMPOSITE STRUCTURE DIAGRAMComposite Structure is new UML 2.0 diagram. It allows decomposition and modeling internal structure of classifiers.

© 2005 No Magic, Inc 6-190

Page 192: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SComposi te S t ructure Diagram

6

Composi te S t ructure Diagram elements

Element Button (hot key)

Notation

ClassifierIs extended with the capability to own collaboration uses. These collaboration uses link a collaboration with the classifier to give a description of the workings of the classifier.

(C)

PartIs 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.

(P)

PortA port may appear either on a contained part representing a port on that part, or on the boundary of the class diagram, represent-ing a port on the represented classifier itself.

(SHIFT+R)

CollaborationA collaboration describes a structure of collaborating elements (roles), each performing a 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.

(Q)

Collaboration UseA collaboration use represents one particular use of a collaboration to explain the relationships between 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.

(U)

6-191 © 2005 No Magic, Inc.

Page 193: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SComposi te S t ructure Diagram

6

ConnectorEach connector may be attached to two or more connectable 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.

(Q)

Role BindingIs al relationship from parts to Collaboration Use (in diagram).

(B)

Element Button (hot key)

Notation

6-192 © 2005 No Magic, Inc.

Page 194: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L D I A G R A M SComposi te S t ructure Diagram

6

6-193 © 2005 No Magic, Inc.

Page 195: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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 O R K I N G W I T H C L A S S E S

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

Page 196: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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

GeneralSet general information about the class

Base Classifiers Click “...” and assign existing class from model in the Select Elements dialog box or create a new one.

Realized Interfaces

Click “...” and assign existing interface from 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.

Page 197: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 7

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.

Inner ElementsAdd another element to a class

Name Model element name.

Type Model element type.

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.

Tab name Box Function

© 2005 No Magic, Inc 7-196

Page 198: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

In ter face

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.

Page 199: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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.

At t r ibute

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

Tab name Box name Function

Inner ElementsAdd class, use case, interface, enumeration, data type, programming language data type, collaboration, or constraint to an interface

Name Model element name.

Type Model element type.

Create Choose element from the list. The corresponding (class, use case, interface, enumeration, data type, programming language data type, or collaboration) specification dialog box appears. Define the selected model element in the dialog box.

Delete Remove the selected model element from an interface.

© 2005 No Magic, Inc 7-198

Page 200: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

Page 201: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 7

Refer to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section.

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).

Tab name Options Function

General Set general information for the attribute

Type Shows attribute’s type. It can be another project class or primitive type such as int or double or other. Select type from drop-down combo box or click “...” button and choose the type from the Select Element tree.

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.

© 2005 No Magic, Inc 7-200

Page 202: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

Page 203: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 7

• * - one class has a pointer to other model element.

• [] - one class has an array of other model elements.

To set an attribute visibility

• 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.

1 Open the Attribute Specification dialog box (see above).

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.

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.

© 2005 No Magic, Inc 7-202

Page 204: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

2 Click the Show Expert Properties button to enlarge a list of general available attribute properties.

3 Select/clear Is Read Only check box.

Operat ion

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.

Page 205: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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 Set general information for the operation

Owner Shows a class, which contains the current operation. You may not change the value of the Owner field. It is automatically defined when you create an 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 A parameter is an unbound variable that can be changed, passed, or returned.

Name Shows the parameter’s name.

Type Shows the parameter’s type. It can be a classifier or a data type.

Default Value An expression whose evaluation yields a value to be used when no argument (operation) is supplied for the parameter.

© 2005 No Magic, Inc 7-204

Page 206: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

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.

Tab name Box Function

7-205 © 2005 No Magic, Inc.

Page 207: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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 Set general information about the parameter

Owner The name of the operation, which contains the parameter.

Type Shows the parameter’s type. It can be a classifier or a 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

Page 208: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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:

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

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.

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

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.

7-207 © 2005 No Magic, Inc.

Page 209: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 7

To set an operation’s Concurrency: sequential, guarded or concurrent

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 E M P L A T E / P A R A M E T E R I Z E D C L A S S

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.

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.

© 2005 No Magic, Inc 7-208

Page 210: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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

Por t

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.

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.

7-209 © 2005 No Magic, Inc.

Page 211: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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 Set general information for the port

Owner The name of the class or component, which contains the port.

Is Behavior 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 Interfaces

Name Shows the name of the provided/required interface.

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

Page 212: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

Page 213: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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.

E N U M E R A T I O N

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.

Tab name Box Function

General Set general information about the data type

Owner Shows element, which contains data package. Default data packages contains UML Standard Profile.

Inner ElementsAdd constraint to data t ype.

Name Displays constraint name.

Type Shows item type, in this case Constraint. Click button 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.

© 2005 No Magic, Inc 7-212

Page 214: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

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.

Tab name Box Function

General Set general information about the enumeration

Owner Shows name of element, which contains enumeration.

Enumeration Literals An enumeration literal defines an element of the run-time extension of an enumeration data type.

Name The name of the enumeration literal.

Enumeration Owner of enumeration literal. Click button to open the Enumeration Literal Specification dialog box and edit information about enumeration literal.

Create The Enumeration Literal Specification dialog box appears. Define a new enumeration literal.

Delete Remove the selected enumeration literal from the enumeration.

Inner ElementsAdd constraint to enumeration

Name Displays constraint name.

Type Shows item type, in this case Constraint. Click button 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.

7-213 © 2005 No Magic, Inc.

Page 215: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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 R I M I T I V E

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.

Des ign Pat terns

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

Page 216: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

Class presentat ion opt ions

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.

Page 217: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 7

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.

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• By Name• By Stereotype• By Visibility• No Sorting

Choose the sorting parameter:• Sort attributes by name.• Sort attributes by stereotype• Sort attributes by visibility (public, package, private, or

protected)• No sorting is executed.

Operations Sort Mode• By Name• By Stereotypes• By Visibility• No Sorting

Choose the sorting parameter:• Sort operations by name.• Sort operations by stereotype.• Sort operations by visibility (public, package, private,

or protected)• No sorting is executed.

Show More Sign For Attributes

Additional information sign '…' in the class attributes list, when a portion of attributes are omitted by editing a class compartment.

Show More Sign For Operations

Additional information sign '…' in the class 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.

Command Function (when selected)

© 2005 No Magic, Inc 7-216

Page 218: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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 O R K I N G W I T H P A C K A G E S

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.

Page 219: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 7

To show the list of elements assigned to a package on the package shape

Choose Show Elements List from the package shortcut menu.

Prof i le

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

Page 220: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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..

Col laborat ion

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.

Page 221: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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 Any behavior attached to the collaboration type applies to the set of roles and connectors bound within a given collaboration use.

Name Name of adde behavior.

Type Type of behavior

Create Choose what kind of behavior you want to create - Activity, Interation, or State Machine. The coresponding Specification dialog box opens.

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

Page 222: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

General i zat ion

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.

Page 223: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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.

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.

Tab name Box Function

GeneralSet general information about the generalization relationship

Target The name of the parent element.

Source The name of the child element.

© 2005 No Magic, Inc 7-222

Page 224: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

NOTE This command is available if the same tree contains the selected generalization path.

G E N E R A L I Z A B L E E L E M E N T S

A generalizable element is a model element that may participate in a generalization relationship.

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.

Associat ion

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.

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.)

7-223 © 2005 No Magic, Inc.

Page 225: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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 Set general information about the association

Association End A

Name The name of the class A. 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 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

Page 226: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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 S S O C I A T I O N E N D

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.

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.

Tab name Box Function

7-225 © 2005 No Magic, Inc.

Page 227: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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 Set general information about the association end

Type Shows association end type - name of the class, to which the association end is related.

Default Value Click the ‘...’ button to open the Select Elements dialog box and choose value for the model elements tree.

Owner Shows class name, containing association end as a property.

© 2005 No Magic, Inc 7-226

Page 228: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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 Define qualifiers of the association end. A qualifier is an attribute of an association end.

Name The name of the assigned attribute of association end.

Type The type of the assigned attribute of association end.

Poperty Shows owner of the qualifier - to which property it belongs.

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.

Tab name Box Function

7-227 © 2005 No Magic, Inc.

Page 229: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 7

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 <class name> or Role B of <class name> 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.

Create The Property Specification dialog box appears.

Delete Remove the qualifier.

Tab name Box Function

© 2005 No Magic, Inc 7-228

Page 230: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

Real i zat ion

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.

Page 231: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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 <<substitute>> 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

Page 232: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

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.

Tab name Box Function

GeneralSet general information about the realization relationship

Source The name of the child element.

Target The name of the parent element.

Mapping Type value, or click the ‘...’ button and edit value in the Edit Mapping dialog box.Note: Available in the Substitution Specification dialog box only.

7-231 © 2005 No Magic, Inc.

Page 233: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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.

T E M P L A T E B I N D I N G D E P E N D E N C Y

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.

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.

© 2005 No Magic, Inc 7-232

Page 234: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

A B S T R A C T I O N

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 S A G E

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.

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 Parameter SubstitutionsThe parameter substitutions owned by this template binding.

Name The name of the template parameter.

Type The type of the template parameter.

Actual Reference to a formal template parameter of the target template signature.

Create The Select Template Parameter dialog box opens. Select the item from the list and click OK.

Delete Remobe the template parameter substitution.

7-233 © 2005 No Magic, Inc.

Page 235: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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 A C K A G E M E R G E

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 <<merge>>.

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 A C K A G E I M P O R T

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 <<import>>.

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 L E M E N T I M P O R T

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 <<import>>.

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

Page 236: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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 O R K I N G W I T H A C T O R S

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.

Page 237: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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.

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.

Tab name Box Function

Inner ElementsAdd constraint to a actor

Name Constraint name.

Type Constraint type.

Create The Constraint Specification dialog box appears. Define the constraint in the dialog box.

Delete Removes selected constraint element from the actor.

© 2005 No Magic, Inc 7-236

Page 238: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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 From the drop down list, choose activity, state machine or interaction to create within a use case.

Type The type of the created element.

Name The name of the created element.

Create The list of elements to create appears. Choose the element and define properties in the opened 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.

Page 239: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 7

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 Ex tens ions

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:

Inner elementsFrom the drop down list, choose diagrams or constraints to create as an inner element of the use case.

Name Type the name for the newly created diagram.

Type The type of created diagram.

Create The list of diagrams appears. Choose a diagram or constraint and define properties in the opened properties list.

Delete Remove the selected inner element from the use case.

Group Tag Defitions

Conditions PostConditionPreCondition

Group name Box Function

© 2005 No Magic, Inc 7-238

Page 240: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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 <MagicDraw installation directory>/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 <<InvisibleStereotype>>.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.

Re lat ionships in Use Case Diagrams

There are several standard relationships among use cases, or between actors and use cases.

Description GoalImplementation IssuesNon Functional RequirementsNotes

Flow of Events Alternative Flow of EventsAlternative Flow of Events DiagramsBasic Flow of EventsBasic Flow of Events DiagramsExceptional Flow of EventsExceptional Flow of Events Diagrams

Identity AuthorDatePriority

Other AssumptionComponent ComplexityComponent TypeOut-standing IssueUse Case Complexity

Group Tag Defitions

7-239 © 2005 No Magic, Inc.

Page 241: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 7

A S S O C I A T I O N

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 X T E N D

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

GeneralSet general information about the extend relationship

Condition An expression specifying the condition, which must be fulfilled if the extension is to take place.

© 2005 No Magic, Inc 7-240

Page 242: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

Extension PointsSelect the extension points to be assigned to the extend relationship

Assign Select predefined extension points you wish to assign to the extend relationship in the Extension Points dialog box.

Unassign Remove an already created extension point from the use case.

Up Move the selected extension point to an upper position.

Down Move the selected extension point to a lower position.

Tab name Box name Function

General General information about the extension point is displayed.

Owner The name of the use case, which owns the extension point.

Group name Box Function

7-241 © 2005 No Magic, Inc.

Page 243: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 7

I N C L U D E

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.

G E N E R A L I Z A T I O N

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.

Tab name Box Function

General Set general information about the include relationship

Owner The name of the use case, which owns 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.

© 2005 No Magic, Inc 7-242

Page 244: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

D E P E N D E N C Y

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 E A L I Z A T I O N

For more on defining realizations see Section “Dependency” on page 7-231

Ins tance Speci f icat ion

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 N S T A N C E S P E C I F I C A T I O N D I A L O G B O X E S

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.

Page 245: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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.

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.

Tab name Box name Function

General Set general options for the instance.

Owner The name of the element, containing instance.

Classifier The name of the assigned classifier.

Deployed ArtifactsList of an artifacts or artifact instances that has been deployed to a deployment target.

Name Name of the artifact or instance.

Type Element, which appears as type of deployed artifact.

Owner The name of the element, containing deployed artifact.

SlotsA named slot in an instance, which holds the value (the instance that is the value of the AttributeLink) of an attribute (the attribute from which the AttributeLink originates)

Type The name, which is the owner of the attribute.

Attribute The name of the attribute.

Instance The name of an instance, to which the current instance is set as a default value.

© 2005 No Magic, Inc 7-244

Page 246: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

• 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.

Page 247: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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.

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.

Tab name Box Function

General Set general information about the include relationship

Owner The name of the element, which owns connector.

Contract Assign activity, interaction or state machine to connector. Click the ‘...’ button and choose elements in the Select Elements dialog box.

Kind Possible choices:• delegation (default)• assembly

© 2005 No Magic, Inc 7-246

Page 248: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

L i fe l ine

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.

Tab name Box name Function

General Set general information about the link end

Owner The name of the connector, which ones connector end.

Role The name of the property, representing lifeline.

7-247 © 2005 No Magic, Inc.

Page 249: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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.

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.

Tab name Box Function

General Set general information about the lifeline

Owner The name of the interaction, which owns lifeline.

Represents Property name, which represents lifeline in interaction.

© 2005 No Magic, Inc 7-248

Page 250: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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 Communication Diagram

Notation in Sequence Diagram

Asynchronous Message

The sender is not waiting for acceptance from the recipient.

Synchronous Message

The operation that is called should be completed before the caller resumes execution.

Call Message

A call message represents the request to invoke a specific operation.

Send Message

A send message specifies the sending of a request to invoke a specific operation.

Reply Message

The reply message returns the values to the caller of the previous call, completing execution of the call.

Create Message

A create message specifies the creation of specific operation.

Message is connected directly to an object (not lifeline).

Destroy Message

A destroy message represents the destruction of the instance described by the lifeline.

A large X mark is displayed on the object’s lifeline in the message’s destination.

7-249 © 2005 No Magic, Inc.

Page 251: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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 Set general information about the message

Signature The definition of the message type, depending on its kind.

Owner The name of the interaction, which owns 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

Page 252: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

Arguments Specify a message argument value that appears during execution.

Create A list of arguments appears. Choose argument and specify value in the Argument field.

Delete Removes argument from the list.

Up Move the selected item to an upper position.

Down Move the selected item to a lower position.

Tab name Box name Function

7-251 © 2005 No Magic, Inc.

Page 253: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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

P R E D E C E S S O R S A N D A C T I V A T O R S

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.

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.

© 2005 No Magic, Inc 7-252

Page 254: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

Act ions

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.

Page 255: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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 Set general information about the action

Owner Type an action expression that describes the effects of the action.

Behavior Choose activity, interaction or state machine from the list, or click “...” button and assign them from the Select Elements tree.

In Interruptible Region

An interruptible activity region is an activity group that 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

Page 256: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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..

In teract ion 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.

Tab name Box Function

General Set general information about the action

Owner Type an action expression that describes the effects of the action.

Operation Click the ‘...’ button to assign state machine 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.

7-255 © 2005 No Magic, Inc.

Page 257: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 7

Interaction Use Specification dialog box

Figure 33 -- Interaction Use 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.

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.

Tab name Box Function

Refers ToReference to specified diagram.

Combobox A list of interactions, created in the project, opens. Click ‘...’ button, to add interaction from the Select Element tree. Click the Create button to create a new interaction.

© 2005 No Magic, Inc 7-256

Page 258: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

Combined Fragment Specification dialog box

Figure 34 -- Combined Fragment 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.

L i fe l ines 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.

Tab name Property Function

General Interaction Operato

Select the operator for fragment. Available: seq, alt, 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.

7-257 © 2005 No Magic, Inc.

Page 259: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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 .

S tate

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

Page 260: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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

GeneralContains the state actions, events and buttons for editing list.

State Invariant Type text or click ‘...’ to open the State Invariant Edit dialog box.

Connection Click “+” to open the Connection Point Reference dialog box. Specify information for connection.

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.

Page 261: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 7

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.

Composi te S tate

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.

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 StatesThe list of inner states and buttons for editing them

Name The name of the inner state.

Type The type of the inner state.

Region The region, to which inner state was added.

Internal TransitionsA set of transitions that, if triggered, occur without exiting or entering the state.

Name The name of the internal transition.

Create The Transition Specification dialog box appears. Define the transition.

Delete Remove the selected transition from the state.

Tab name Box name Function

© 2005 No Magic, Inc 7-260

Page 262: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

Page 263: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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

Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section.

I N I T I A L

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.

Tab name Property Function

General Owner The region, containing pseudo state.

Kind The kind, showing pseudo state purpose.

© 2005 No Magic, Inc 7-262

Page 264: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

F I N A L S T A T E

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 E R M I N A T E

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 N T R Y P O I N T

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 X I T P O I N T

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 E E P H I S T O R Y

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 H A L L O W H I S T O R Y

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 U N C T I O N

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 H O I C E

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.

Page 265: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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 O R K / J O I N

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.

Trans i t ion

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

Page 266: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

Refere to the Section “Specification dialog boxes” on page 5-118 for the information of the specification elements not covered in this section.

To define an event type

• In the Transition Specification dialog box, General tab, click arrow down in Trigger group box, Event Type field.

Tab name Box name Function

GeneralSet general information about the transition

Guard A guard is expression that is attached to a transition as a fine-grained control over its firing. The guard is evaluated when an event instance is dispatched by 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 Element

Click ‘...’ and choose element from the activity, interaction or state machine items list. Corresponding dialog box appears.

7-265 © 2005 No Magic, Inc.

Page 267: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 7

E V E N T T Y P E S

In ternal t rans i t ions

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.

Name Description

Any Receive Event

A transition trigger associated with AnyReceiveEvent specifies that 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 Event

A destruction event models the destruction of an object.

Execution Event An execution event models the start or finish of an execution occurrence.

Send Operation Event

A send operation event specifies the sending of a request to invoke a specific operation on an object.

Send Signal Event

A send signal event specifies the sending of a message to a 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.

© 2005 No Magic, Inc 7-266

Page 268: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

F low 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.

Decis ion 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.

Page 269: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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

GeneralSet general information about the object node

Type The list of classifiers. Select a classifier you wish to assign to an object node shape. Click the ‘…’ button to open the Select Element dialog box for choosing 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

Page 270: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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 S ignal Act ion

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.

Page 271: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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.

Accept Event Act ion

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.

Tab name Box name Function

GeneralSet general information about the object node

Signal Click the “...” button to assign existing signal from model in the Select Elements dialog box, or click Create for defining a new one.

© 2005 No Magic, Inc 7-270

Page 272: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

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.

Tab name Box name Function

GeneralSet general information about the object node

Is Unmarshall Indicates whether there is a single output pin for the event, or multiple output pins for attributes of the event.

Trigger Cick the “+” to open the Trigger Specification dialog box.Defined trigger will be assigend to accept event action.

7-271 © 2005 No Magic, Inc.

Page 273: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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

Page 274: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

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.

Tab name Box name Function

General Set general information about the partition

Owner Shows the name of the activity diagram where the partition is placed.

Represents Clicke the “...” button to open the Select Elements dialog box. Assign model element that represents the partition.

7-273 © 2005 No Magic, Inc.

Page 275: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 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

Page 276: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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 Interfaces

Name Name of provided/required interface.

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.

Page 277: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S 7

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.

Realizing Classifiers

Name Name of the realizing classifier

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 ElementsAdd another element to a component.

Name Model element name.

Type Model element type.

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.

Tab name Box Function

© 2005 No Magic, Inc 7-276

Page 278: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

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.

Page 279: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S

©

7

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 ElementsAdd another element to a node

Name Model element name.

Type Model element type.

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.

Tab name Box Function

2005 No Magic, Inc 7-278

Page 280: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M O D E L E L E M E N T S7

7-279 © 2005 No Magic, Inc.

Page 281: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M S 8

STEREOTYPEA 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 T E R E O T Y P E S P E C I F I C A T I O N D I A L O G B O X

Figure 1 -- Stereotype Specification dialog box

© 2005 No Magic, Inc. 8-280

Page 282: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

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

GeneralSet general information about the stereotype.

Name Name of the stereotype.

Owner Name of the element, which owns 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 DefinitionsSpecify information for tag definition

Name Name of the stereotype attribute.

Type In the general case, where the tag type is a data type, this specifies the range of values of the tagged values associated 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 ElementsShows the model elements affected by the stereotype.

Name The name of the affected model element.

Type The type (class, use case, etc.) of that model element.

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.

Page 283: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

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 R O F I L E S D I A L O G B O X , S T E R E O T Y P E S T A B

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

Page 284: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

• 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.

Page 285: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

U M L W E B E X T E N S I O N S T E R E O T Y P E S

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

Page 286: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

Server Page Stereotype

Client Page Stereotype

Form 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

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

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.

Page 287: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

Frame Set Stereotype

Target Stereotype

JavaScript 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

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

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

Page 288: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

Link Stereotype

Targeted Link Stereotype

Frame Content Stereotype

Submit Stereotype

Builds Stereotype

Metamodel Class

Association

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

Metamodel Class

Association

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

Metamodel Class

Association

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

Metamodel Class

Association

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

Metamodel Class

Association

8-287 © 2005 No Magic, Inc.

Page 289: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

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

Page 290: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

Redirect Stereotype

Object Stereotype

IIOP Stereotype

RMI Stereotype

Metamodel Class

Association

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

Metamodel Class

Association

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 <object> tag.

Icon None

Metamodel Class

Association

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

Metamodel Class

Association

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.

Page 291: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

Input Element Stereotype

Select Element Stereotype

TextArea Element Stereotype

Page Stereotype

Metamodel Class

Property

Description An Input Element is a propertyof a «Form» object. It maps directly to the <input> 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 <input> tag property. To complete the required values for the HTML tag; the property name is used as the <input> tag name, and the propertie’s initial value is the tag value.

Icon None

Metamodel Class

Property

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

Metamodel Class

Property

Description An input control used in forms that allows multiple line input.

Icon None

Metamodel Class

Component

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

Page 292: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

Tag Def in i t ions

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.

Page 293: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

T A G G E D V A L U E E D I T I O N

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

Up

Moves created value to upper possition in the list.

Down

Moves created value to lower possition in the list.

Edit

Opens an editable window for value.

© 2005 No Magic, Inc 8-292

Page 294: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

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.

Add

Adds new tagged value to the list.

Remove

Removes tagged value from the list.

Tab name Box name Function

GeneralSet general information about the tagged value

Owner Displays owner profile of the tagged value.

Applied Stereotypes

Click “...” to apply stereotype for tagged value.

Value Tag definition that specifies the tagged value.

Defining Feature Specifies type of the value.

ToDo Additonal information can be added.

Documentation/Hyperlinks

Documentation Set tagged value documentation. It can be HTML text 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.

Page 295: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

T O D O I T E M

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.

Const ra in ts

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

Page 296: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

• 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.

Page 297: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

C O N S T R A I N T S P E C I F I C A T I O N D I A L O G B O X

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 Set general information about the constraint

Name Enter the name of the constraint.

Owner The name of the model element to which the current constraint is assigned

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/Hyperlinks

Documentation Set tagged value documentation. It can be HTML text 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

Page 298: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U M L E X T E N S I O N M E C H A N I S M SStereotype

8

8-297 © 2005 No Magic, Inc.

Page 299: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M S 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

Page 300: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SContent Diagram

9

• Select a class and choose Apply Pattern from the Tools main menu.

CONTENT DIAGRAMA 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.

Page 301: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SContent Diagram

9

Content Diagram Elements

Toolbar Button 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)

© 2005 No Magic, Inc 9-300

Page 302: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SContent Diagram

9

Content ShapeCreates a table of contents of all diagrams of the project.

Package

DependencyA relationship showing that one diagram depends on the other.

Class DiagramCreates a class diagram.

Use Case DiagramCreates a use case diagram.

Communication DiagramCreates a communication diagram.

Sequence DiagramCreates a sequence diagram.

Toolbar Button Button (Hot key)

Notation

9-301 © 2005 No Magic, Inc.

Page 303: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SContent Diagram

9

State DiagramCreates a state diagram.

Activity DiagramCreates an activity diagram.

Implementation DiagramCreates an implementation diagram.

Composite Structure DiagramCreates composite structure diagram.

Time DiagramCreates a time diagram.

Struts DiagramCreates a struts diagram.

Web DiagramCreates a web diagram.

CORBA IDL DiagramCreates a CORBA IDL diagram.

Toolbar Button Button (Hot key)

Notation

© 2005 No Magic, Inc 9-302

Page 304: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SRobustness Diagram

9

ROBUSTNESS DIAGRAMRobustness 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.

WSDL DiagramCreates a WSDL diagram.

XML Schema DiagramCreates a xml schema diagram.

Robustness DiagramCreates a robustness diagram.

Generic DDL DiagramCreates a DDL diagram.

Oracle DDL DiagramCreates an Oracle DDL diagram.

Content DiagramCreates a content diagram.

Separator

(W)

Toolbar Button Button (Hot key)

Notation

9-303 © 2005 No Magic, Inc.

Page 305: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SRobustness Diagram

9

• 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

Page 306: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SRobustness Diagram

9

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)

ActorAn actor represents a role played by an external person, process or a thing interacting with a system. One physical object may play several roles.

(A)

9-305 © 2005 No Magic, Inc.

Page 307: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SWeb Diagram

9

WEB DIAGRAMWeb 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.

BoundaryActors use boundary objects to communicate with the system (sometimes called interface objects.)Class with stereotype “boundary”

(B)

ControlServes as the “glue” between boundary objects and entity objects.Class with stereotype “control”

(C)

EntityEntity objects usually are objects from the domain model.Class with stereotype “entity”

(E)

Robustness AssociationAssociation with default Association End A navigability = false and Association End B navigability = true values.

(S)

Separator

(W)

Toolbar Button/Model Element Button (Hot key) Notation

© 2005 No Magic, Inc 9-306

Page 308: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SWeb Diagram

9

Reference: Building Web Applications with UML by Jim Conallen Copyright ©2000 by Addison Wesley Longman, Inc.

9-307 © 2005 No Magic, Inc.

Page 309: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SWeb Diagram

9

Web Diagram Elements

Toolbar Button/Model Element

Button (Hot key)

Some examples

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

Page 310: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SWeb Diagram

9

Client Page

(SHIFT+C)

Server Page

(SHIFT+S)

Form

(SHIFT+F)

Frame

(SHIFT+E)

Target

(SHIFT+T)

Java Script

(SHIFT+J)

Class

(C)

Toolbar Button/Model Element

Button (Hot key)

Some examples

9-309 © 2005 No Magic, Inc.

Page 311: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SWeb Diagram

9

Interface

(I)

Package

(P)

Subsystem

(Y)

Model

(M)

Realize

(R)

Realization

(E)

Dependency

(D)

Generalization

(G)

Association

(S)

Aggregation

A

Composition

(F)

Toolbar Button/Model Element

Button (Hot key)

Some examples

© 2005 No Magic, Inc 9-310

Page 312: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SWeb Diagram

9

Builds

(B)

Link

(L)

Targeted Link

(SHIFT+L)

Frame Content

(SHIFT+O)

Submit

(U)

Object

(O)

RMI

(SHIFT+R)

IIOP

(SHIFT+I)

Toolbar Button/Model Element

Button (Hot key)

Some examples

9-311 © 2005 No Magic, Inc.

Page 313: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SCORBA IDL Diagram

9

CORBA IDL DIAGRAMCORBA 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

Page

(SHIFT+P)

Separator

(W)

Toolbar Button/Model Element

Button (Hot key)

Some examples

© 2005 No Magic, Inc 9-312

Page 314: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SCORBA IDL Diagram

9

CORBA IDL Diagram Elements

Toolbar Button/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)

CORBA IDL Module

(M)

9-313 © 2005 No Magic, Inc.

Page 315: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SCORBA IDL Diagram

9

CORBA IDL Interface

(I)

CORBA IDL Value

(V)

Class by PatternThe Pattern Wizard appears.

SHIFT+P

Generalization

(G)

Truncatable Generalization

Value Support Generalization

CORBA IDL Association

Association

(S)

Aggregation

(A)

Composition

(F)

Package

(P)

Toolbar Button/Model Element

Button (Hot key)

© 2005 No Magic, Inc 9-314

Page 316: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SDDL Diagram

9

DDL DIAGRAMDDL 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”.

Class

(C)

Interface

(I)

Dependency

(D)

Binding Dependency

(B)

Containment

(SHIFT+C)

Separator

W

Toolbar Button/Model Element

Button (Hot key)

9-315 © 2005 No Magic, Inc.

Page 317: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SDDL Diagram

9

DDL Diagram Elements

Toolbar Button/ 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)

Table

(T)

© 2005 No Magic, Inc 9-316

Page 318: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SWSDL Diagram

9

WSDL DIAGRAMWSDL 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.

View

(V)

Relationship

(R)

Foreign Key

(F)

database

(D)

schema

(S)

Separator

W

Toolbar Button/ Model Element

Button (Hot key)

9-317 © 2005 No Magic, Inc.

Page 319: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SWSDL Diagram

9

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

Page 320: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SWSDL Diagram

9

WSDLporttype

(T)

WSDLbinding

(B)

WSDLport

(SHIFT+P)

WSDLservice

(S)

WSDLdefinitions

(D)

WSDLtypes

(Y)

WSDLimport

(I)

Xmlns

(SHIFT+L)

XDSnamespace

(P)

Realization

(E)

Separator

(W)

Model Element Button (Hot key)

9-319 © 2005 No Magic, Inc.

Page 321: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SXML Schema Diagram

9

XML SCHEMA DIAGRAMDiagram 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

Page 322: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SXML Schema Diagram

9

XML Schema Diagram Elements

Toolbar Button/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)

Class by Pattern

(SHIFT+P)

XSDcomplexType

(C)

9-321 © 2005 No Magic, Inc.

Page 323: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SXML Schema Diagram

9

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)

Toolbar Button/Model Element

Button (Hot key)

© 2005 No Magic, Inc 9-322

Page 324: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M STime Diagram

9

TIME DIAGRAM

Aggregation

(A)

Composition

(F)

Binding Dependency

(B)

XSDrestriction

(R)

XSDextension

(E)

XSDimport

(M)

XSDinclude

(D)

XSDredefine

(SHIFT+F)

xmlns

(SHIFT+L)

Separator

W

Toolbar Button/Model Element

Button (Hot key)

9-323 © 2005 No Magic, Inc.

Page 325: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M STime Diagram

9

Time Diagram Elements

Toolbar Button/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)

Classifier Role

(O)

Classifier Role <<CRconcurrent>>

© 2005 No Magic, Inc 9-324

Page 326: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SBusiness Process Diagram

9

BUSINESS PROCESS DIAGRAMBPMN (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

Classifier Role <<SAshedRes>>

Concurrent Lifeline

(L)

Message: synchronous uninterpreted

(M)

Message <<RTevent>>,<<CRimmediate>>

Message <<CRimmediate>>

Message <<SAtrigger>>

)

Message to Self: synchronous uninterpreted

(S)

Recursive Message

(R)

Diagonal Message: synchronous uninterpreted

(D)

Separator

W

Toolbar Button/Model Element

Button (Hot key)

9-325 © 2005 No Magic, Inc.

Page 327: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SBusiness Process Diagram

9

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.

Bus iness Process Diagram Elements

Toolbar Button/Model Element

Button Element Description

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.

Page 328: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SBusiness Process Diagram

9

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

Toolbar Button/Model Element

Button Element Description

9-327 © 2005 No Magic, Inc.

Page 329: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SBusiness Process Diagram

9

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

Toolbar Button/Model Element

Button Element Description

9-328 © 2005 No Magic, Inc.

Page 330: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SBusiness Process Diagram

9

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

Toolbar Button/Model Element

Button Element Description

9-329 © 2005 No Magic, Inc.

Page 331: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SBusiness Process Diagram

9

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

Toolbar Button/Model Element

Button Element Description

9-330 © 2005 No Magic, Inc.

Page 332: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

E X T E N S I O N D I A G R A M SBusiness Process Diagram

9

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.

Toolbar Button/Model Element

Button Element Description

9-331 © 2005 No Magic, Inc.

Page 333: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

T O O L S 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.

REPORTSThe 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

Page 334: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SReports

1

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.

Page 335: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SReports

©

1

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

Page 336: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

1

TO O L SReports

1

• 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 <MagicDraw

installation directory>/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.

0-335 © 2005 No Magic, Inc.

Page 337: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SReports

©

1

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

Page 338: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SReports

1

D O C U M E N T O P T I O N S

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 Rows

Specify the number of rows in the revision history table.

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 Pages

Select this check box, if you want that the number of pages will be displayed as e.g. 5-26.

Table of Contents LocationOnly for model report, use case report, and software design description.

Choose the place where the table of contents will be placed: Beginning of the Document, End of the Document, Not Included.In the table of contents, the list of hyperlinks of generated 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 HTMLOnly for model report.

Documentation is generated in html format (available only in HTML output reports)

Include DocumentationOnly for model report.

Includes documentation of the model elements in the generated report.

Include Full DescriptionsOnly for model report.

Includes the location (parent element) of the model element in the model dictionary index.

Include Model DictionaryOnly for model report.

Includes UML model dictionary table to the report.

Preformatted DocumentationOnly for model report.

Documentation is shown as it is entered. If not selected, documentation text is wrapped

Preserve Line BreaksOnly for model report.

Documentation has line breaks, even if the Preformatted Documentation is not selected. It has no effect is Documentation as HTML is selected.

Show Introduction SectionOnly for use case report, software design description, and model extension report.

Includes Introduction section with Purpose, Scope and Overview subsections (if selected).

Show Purpose SectionOnly for use case report, software design description, and model extension report.

Includes Purpose subsection in the Introduction section.

10-337 © 2005 No Magic, Inc.

Page 339: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SReports

©

1

M O D E L R E P O R T

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.

Document PurposeOnly for use case report, software design description, and model extension report.

Type the purpose of the generated document. This text will be included in the Purpose subsection.

Show Scope SubsectionOnly for use case report, software design description, and model extension report.

Includes Scope subsection in the Introduction section.

Document ScopeOnly for use case report, software design description, and model extension report.

Type the scope of the generated document. This text will be included in the Scope subsection.

Show Overview SubsectionOnly for use case report and software design description.

Includes Overview subsection in the Introduction section.

Document OverviewOnly for use case report and software design description.

Type an overview of the generated document. This text will be included in the Overview subsection.

Include MagicDraw Trademark

Includes a text “This document is generated by MagicDraw UML” in the footer.

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.

Property Name Description

2005 No Magic, Inc 10-338

Page 340: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SReports

1

Model Elements Options

In the Model Elements Options tab you may define general options how the model elements will be described in the report.

Composite Structure Diagram

Includes composite structure diagram in the generated 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.

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 Section

Includes Inner Elements section when describing an element.

Element name Function (if True)

10-339 © 2005 No Magic, Inc.

Page 341: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SReports

1

U S E C A S E R E P O R T

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.

Show Inner Relations Section

Includes Inner Relations section when describing an 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 Section

Includes Tagged Values section when describing an element.

Show Template Parameters Section

Includes Template Parameter section when describing an element.

Use General properties Defines if properties from Standard or Expert mode have to be used in reports (General info section for every element).

Property name Function (if true)

Show Actors Section

Includes the description of actors in the report.

Option name Function

© 2005 No Magic, Inc 10-340

Page 342: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

10

TO O L SReports

1

Use Case Options

In this list select tag definitions you want include in the report. Navigate with buttons on the right.

S O F T W A R E D E S I G N D E S C R I P T I O N

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 Introduction1.1 Purpose

2 Scope

3 Overview

4 System Overview5 Design Considerations

5.1 Assumptions and Dependencies

6 General Constraints

7 Goals and Guidelines

8 Architectural Strategies9 System Architecture

9.1 Use Case View

10Conceptual View

11Deployment View

12Process View

13Detailed Design13.1 Design Model

Show Use Case Model Section

Includes the description of use case model in the report.

Show Package Details

Includes the information of packages.

Show Classifier Details

Includes the information of classifiers.

Generate sections for empty tagged values

Includes sections for tagged values, which do not have created values.

Property name Function (if true)

-341 © 2005 No Magic, Inc.

Page 343: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SReports

©

1

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 Section

Includes System Overview section in the report.

System Overview Click the “...” button and type the text you want to be displayed in the System Overview section.

Show Design Consideration Section

Includes Design Considerations section in the report.

Show Dependencies Subsection

Includes Assumptions and Dependencies subsection in the 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 Section

Includes Architectural Strategies section in the report.

Architectural Strategies Click the “...” button and type the text you want to be displayed in the Strategies section.

Show System Architecture Section

Includes System Architecture section in the report.

Show Use Case View Subsection

Includes Use Case View subsection in the report. Select the diagrams that represent Use Case View in the Software Design Model Wizard.

Show Conceptual View Subsection

Includes Conceptual View subsection in the report. Select the diagrams that represent Conceptual View in the Software Design Model Wizard.

Show Deployment View Subsection

Includes Deployment View subsection in the report. Select the 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

Page 344: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

10

TO O L SReports

1

M O D E L E X T E N S I O N R E P O R T

Model Extension report describes common UML model extension mechanisms (stereotypes, tagged values and constraints) of your project.

Show Subsystem Details Section

Includes subsection in the report. Select the diagrams that 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.

Property name Function (if true)

Show Stereotypes

Includes stereotypes description in the report.

Stereotypes Table Style

Choose table style of the description of stereotypes: Simple or Extended.

Show Stereotype Properties

Includes properties of stereotype, which contains tag definitions.

Show Constraints

Includes constraints in the report.

Show Global Constraints

Include default constraints.

Option name Function

-343 © 2005 No Magic, Inc.

Page 345: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SReports

1

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

Page 346: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

10

TO O L SReports

1

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.

-345 © 2005 No Magic, Inc.

Page 347: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SReports

©

1

Output Opt ions 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

Page 348: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

10

TO O L SReports

1

Repor t Customizat ion

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:

Report Output Format

Select the type of the report you want to be displayed:• 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 Size

Choose the size or paper for all reports, excluding HTML reports.

Page Orientation

Choose the Portrait or Landscape page orientation for all reports, 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 Viewer

After the generation, the generated report is opened in the corresponding viewer.

Save Configuration

Customize the report and save its configuration if you want to generate the report from command line, or you would like other users to use your configuration.

Select Configuration

Import already created report configuration.

Close Close and exit the Report dialog box.

Help Display MagicDraw Help.

Element name Function

-347 © 2005 No Magic, Inc.

Page 349: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SReports

©

1

<MD_install_dir>/data/report/report_types/<reportType>/xsl/<reportStyle>/<outputFormat>/Main.xsl,

-where-

• <MD_install_dir> is MagicDraw installation directory,

• <reportType> - report type name,

• <reportStyle> - report style name,

• <outputFormat> - report output format has two possible values (HTML_BROWSABLE and XSL_FO).

Some location examples:

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 E W R E P O R T S T Y L E C R E A T I O N E X A M P L E

Task:

Add new report style (named "My Style") for Model Report. Only HTML browsable report output format will be implemented.

Implementation:

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

Report Type Report Style

Output Format "Main.xsl" file location directory(under "<MagicDraw install dir>/data/report/report_types" directory)

Model Report Default HTML Browsable Model Report/xsl/Default/HTML_BROWSABLE

Model Report Default XSL Formatting Objects

Model Report/xsl/Default/XSL_FO

Model Report Custom XSL Formatting Objects

Model Report/xsl/Custom/XSL_FO

Use Case Report Default XSL Formatting Objects

Use Case Report/xsl/Custom/XSL_FO

Step Create item Where Item Description

1 Directory "My Style

"<MagicDraw install dir>/data/report/report_types/Model Report/xsl

Report Style directory.

2 Directory "HTML_BROWSABLE

"<MagicDraw install dir>/data/report/report_types/Model Report/xsl/My Style

The "Main.xsl" file for HTML browsable report generation will be stored here.

3 XSL file "Main.xsl

"<MagicDraw install dir>/data/report/report_types/Model Report/xsl/My Style/HTML_BROWSABLE

The "Main.xsl" file is a XSLT file, which will be used to generate "Model Report" with "My Style" report style and HTML browsable output format.

2005 No Magic, Inc 10-348

Page 350: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SReports

1

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 O N T S I N P D F A N D P S R E P O R T S

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.

Page 351: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SReports

1

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:

<font metrics-file="tahoma.xml" kerning="yes"embed-file="C:\WINNT\Fonts\tahoma.ttf"><font-triplet name="Tahoma" style="normal" weight="normal"/></font>

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.

Repor t Generator Tool

S T A R T I N G R E P O R T G E N E R A T O R

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 E N E R A T I N G C O N F I G U R A T I O N F I L E

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

Page 352: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

10

TO O L SClass Diagram Wizard

1

Generated reports are placed in the same directory where MagicDraw UML is installed or you may choose other directory.

CLASS DIAGRAM WIZARDThe 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.

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

Option Name Description

-351 © 2005 No Magic, Inc.

Page 353: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SClass Diagram Wizard

©

1

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

Page 354: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SClass Diagram Wizard

1

• 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.

Page 355: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SClass Diagram Wizard

©

1

• 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

Page 356: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

1

TO O L SPackage Dependency Wizard

1

• 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

0-355 © 2005 No Magic, Inc.

Page 357: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SPackage Dependency Wizard

©

1

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

Page 358: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

10

TO O L SPackage Dependency Wizard

1

• 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.

-357 © 2005 No Magic, Inc.

Page 359: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SPackage Overv iew Diagram Wizard

©

1

• 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

Page 360: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

10

TO O L SPackage Overv iew Diagram Wizard

1

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.)

-359 © 2005 No Magic, Inc.

Page 361: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SPackage Overv iew Diagram Wizard

©

1

• 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

Page 362: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

10

TO O L SPackage Overv iew Diagram Wizard

1

• 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.

-361 © 2005 No Magic, Inc.

Page 363: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SPackage Overv iew Diagram Wizard

1

• 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

Page 364: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L STools for Analys is

1

• 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 ANALYSISMagicDraw 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.

Page 365: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L STools for Analys is

©

1

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

Page 366: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L STools for Analys is

1

• 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.

Page 367: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L STools for Analys is

©

1

• 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

Page 368: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L STools for Analys is

1

• 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.

Real i zat ion Diagram Wizard

The Realization Diagram Wizard shows table of largest elements groups that realizes some interface.

10-367 © 2005 No Magic, Inc.

Page 369: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L STools for Analys is

1

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

Page 370: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L STools for Analys is

1

• 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.

Page 371: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L STools for Analys is

1

• 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

Page 372: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L STools for Analys is

1

• 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.

Page 373: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SContent Diagram Wizard

1

CONTENT DIAGRAM WIZARDThe 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

Page 374: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SContent Diagram Wizard

1

• 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.

Page 375: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SSequence Diagram from Java Source Wizard

1

• 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 WIZARDThe 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

Page 376: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SSequence Diagram f rom Java Source Wizard

1

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.

Page 377: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SSequence Diagram from Java Source Wizard

1

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

Page 378: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SSequence Diagram f rom Java Source Wizard

1

• 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.

Page 379: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SPat tern Wizard

1

• 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 WIZARDIn 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

Page 380: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SPattern Wizard

1

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 Pattern

Properties

GofTemplates described in the Design Patterns of Reusable Object-Oriented Software

Adapter Interface ClassAdapter ClassAdaptee ClassNOTE The Next > button is activated.

In the Adapter Operations screen, add or remove operations you want to use.

10-379 © 2005 No Magic, Inc.

Page 381: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SPat tern Wizard

1

Bridge AbstractionImplementorImplementor is: Abstract Class or InterfaceName of ReferenceSuffix of the Concrete ImplementorNOTE The Next > button is activated.

In the Deriver Classes screen, add or remove classes you want to use.

Composite Component ClassComposite ClassNOTE The Next > button is activated.

In the Composite Operations screen, add or remove operations you want to use.

Decorator Component ClassDecorator ClassConcrete Decorator ClassNOTE The Next > button is activated.

In the Decorator Operations screen, add or remove operations you want to use.

Observer Subject ClassObserver ClassConcrete Subject ClassConcrete Observer Class

Proxy Subject ClassProxy ClassReal Subject ClassNOTE The Next > button is activated.

In the Proxy Operations screen, add or remove operations you want to use.

Singleton Singleton class

Visitor Visitor ClassImplementation 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.

JavaSpecific Java design patterns

Main Main class

Category Design Pattern

Properties

© 2005 No Magic, Inc 10-380

Page 382: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SPattern Wizard

1

RMI Java RMI classesRemote InterfaceNOTE The Next > button is activated.

In the Remote methods screen, select methods from All to Selected list.

Category Design Pattern

Properties

10-381 © 2005 No Magic, Inc.

Page 383: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SPat tern Wizard

1

EJB

Entity

Message Driven

Session

Sichronize NamesEJB NameEJB ClassRemote InterfaceHome InterfaceLocal InterfaceLocal Home InterfaceDisplay NameLarge IconSmall IconAbstract Schema NameCmp VersionPersistence TypeReentrantPrimary Key Class

EJB NameEJB ClassDisplay NameLarge IconSmall IconAcknowledge ModeDestination TypeSubscripting DurabilityMessage SelectorTransaction Type

Sichronize NamesEJB NameEJB ClassRemote InterfaceHome InterfaceLocal InterfaceLocal Home InterfaceDisplay NameLarge IconSmall IconSession TypeTransaction TypeNOTE The Next > button is activated.

In the Remote Methods screen, add or remove operations you want to use.

Category Design Pattern

Properties

© 2005 No Magic, Inc 10-382

Page 384: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SPattern Wizard

1

JUnitJUnit is a regression testing framework. It is used by the developer who implements unit tests in Java. JUnit is Open Source Software. The provided templates let to create the constructions, implemented in the JUnit framework. For more information, look at http://www.junit.org.

TestCase TestCase ClassCreate suite()Create Constructor TestCase(String)Create runTest()Create setUp()Create tearDown()

Tested Class

Tested ClassTestCase ClassCreate suite()Create Constructor TestCase(String)Create runTest()Create setUp()Create tearDown()NOTE: The Next > button is activated.

In the Tested Operations pane, add or remove operations you want to use.

XML SchemaSpecific XML design patterns

XSDcomplexType

Target ClassContent: XSDcomplex content, XSDsimple content.

XSDcompositor

Target ClassCompositor: XSDall, XSDchoice, XSDsequenceParticle

XSD simpleType

Target ClassContent: XSDrestriction, XSDlist, XSDunion

XSD simpleType(XSDlist)

Target ClassItem Type

XSD simpleType(XSDunion)

Target Class

SimpleXSDrestricton

Target ClassStereotype: XSDsimpleType, XSDsimpleContentBaseMin ExclusiveMax ExclusiveMax InclusiveMin InclusiveTotal DigitsFraction DigitsLengthMin LengthMax LengthWhite SpacePattern

Category Design Pattern

Properties

10-383 © 2005 No Magic, Inc.

Page 385: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SPat tern Wizard

1

WSDLSpecific WSDL design pattern

Binding Use the Binding pattern when you want to create binding of some PortType.

CORBA IDLSpecific CORBA IDL design patterns

Interface NameAbstractLocal Interface

Value Type NameAbstractCustom Value Type

Type Definition

NameType Definition Specifier: typedef, boxed valueBase Type

Sequence NameBase TypeSequence SizeAnonymous

Array NameBase TypeArray SizeAnonymous

Fixed NameDigitsScaleAnonymous

Union NameDiscriminator Type

Enumeration

Name

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.

Category Design Pattern

Properties

© 2005 No Magic, Inc 10-384

Page 386: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SCreat ing Set ters / Get ters

1

CREATING SETTERS / GETTERSSetters 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.

Page 387: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SImplement ing or Overr id ing Operat ions

1

The names of created operations (setters) are combined according to the following format:

public void set + <attribute name> (<attribute type> <attribute name>)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 <attribute type> get + <attribute name> ( )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 OPERATIONSWhen 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).

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

Box Function

© 2005 No Magic, Inc 10-386

Page 388: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SModel Transformat ion Wizard

1

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

TIP!: Double-click the item name, and it will be moved to the opposite list.

MODEL TRANSFORMATION WIZARDModel 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 Y P E S O F T R A N S F O R M A T I O N S

Transformations can be categorized by the formats, models, and other entities they are being transferred from and to:

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

10-387 © 2005 No Magic, Inc.

Page 389: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SModel Transformat ion Wizard

1

• 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 O D E L T R A N S F O R M A T I O N W I Z A R D

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

Page 390: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SModel Transformat ion Wizard

1

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.

Page 391: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SModel Transformat ion Wizard

1

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

Page 392: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SModel Transformat ion Wizard

1

• < 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 O D E L T R A N S F O R M A T I O N M A P P I N G

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.

Page 393: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SModel Transformat ion Wizard

1

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 <<typeMap>> 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 <<map>> 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 R A N S F O R M A T I O N M A P P I N G O P T I O N S

To change a mapping behavior, set appropriate tags on the dependency relationship:

© 2005 No Magic, Inc 10-392

Page 394: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SModel Transformat ion Wizard

1

• 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 <<typeMap>> stereotype. Initially, the <<map>> dependency's direction tag is checked. If not found <<typeMap>> package's defaultDirection tag value is set.

• You may have several <<map>> 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.

Page 395: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SModel Transformat ion Wizard

1

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

Page 396: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SModel Transformat ion Wizard

1

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 O D E L T R A N S F O R M A T I O N U P D A T E

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.

Page 397: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SMetr ics

1

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.

METRICSMagicDraw'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

Page 398: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SMetr ics

1

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.

Metr ic Sui tes

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.

Display ing Metr ics

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.

Page 399: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SMetr ics

1

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)

S tar t ing Metr ics

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

Inner class1 value value value value value value

Inner class2 value value value value value value

Element Desription

Metrics Suite Lists all the available metrics suites.

The following is an example of a metrics table structure:

© 2005 No Magic, Inc 10-398

Page 400: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SMetr ics

1

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.

Page 401: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SMetr ics

1

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

Page 402: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SMetr ics

1

M E T R I C S W I N D O W

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

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.

Expor t ing Metr ics

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.

GUI element Desription

Expand Current Branch

Expands all elements in the selected branch within the results table.

Collapse Current Branch

Collapses all elements in the selected branch within the results 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 With…

Opens the Open dialog box, where you can select a text file to 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

10-401 © 2005 No Magic, Inc.

Page 403: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SMetr ics

1

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:

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

Metrics Report

Element Metric1 Metric2 Metric3 …. MetricN

Package Package1 (Package1) value value value …. Value

Class class1 (Package1::class1) value value value …. value

Element Description

Metrics Output File:

Displays the path and file names of the metrics results output file. Click the "…" button to select the location and file.

© 2005 No Magic, Inc 10-402

Page 404: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

1

TO O L SMetr ics

1

Compar ing metr ics

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.

Metr ics Opt ions

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:

Output Type: Contains these values:• Text (*.txt)• HTML (*.html)

Export Selected Rows Only

When selected, only selected table rows and the header row are exported.When cleared, the entire metrics table is exported.

0-403 © 2005 No Magic, Inc.

Page 405: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SMetr ics

1

Figure 43 -- Metrics Options dialog box

Element Description

Metrics suites list Displays all created metrics suites in a list.

Metrics suites list buttons:Clone RenameRemoveImportExport

• Clone – clone the selected suite. • Rename – rename the selected suite.• Remove – remove the selected suite.• Import – import new suite. The Open dialog box opens.• Export – export the selected suite. The Save dialog box opens.All these commands are available from each metric suite shortcut menu.

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

Page 406: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SMetr ics

1

Metr ics Proper t ies

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.

PropertiesGroup

Property Description

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.

Page 407: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SMetr ics

1

The following is an example of a metrics calculation used for calculating the number of classes (NC) in this tree:

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.

Calculated metric values with a different aggregation:

Element Local Global Average Min Max

Top 1 8 1 1 2

Inner1 2 4 1 2 2

C1 0 0 0 0 0

C2 2 2 1 2 2

c_in1 0 0 0 0 0

PropertiesGroup

Property Description

© 2005 No Magic, Inc 10-406

Page 408: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SMetr ics

1

c_in2 0 0 0 0 0

Inner2 1 3 1 1 2

C3 2 2 1 2 2

c_in3 0 0 0 0 0

c_in4 0 0 0 0 0

C4 0 0 0 0 0

Calculated metric values with a different aggregation:

10-407 © 2005 No Magic, Inc.

Page 409: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

USER REFERENCE 9

MENU SYSTEM

File menu

Command Button /Hot keys

Function

New Project

CTRL+N

Creates a new project.A project is nameless until you close or save it by choosing the Save Project or Save Project As commands. 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

CTRL+O

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 select project name in the Projects list on the main window toolbar.

Save Project

CTRL+S

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.

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

Page 410: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EMenu Sys tem

99

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

CTRL+P

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 pages to be printed.

Print Preview Preview the diagram before printing. The Print Preview screen appears.

Print Options The Print Options dialog box appears.

Command Button /Hot keys

Function

9-433 © 2005 No Magic, Inc.

Page 411: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EMenu Sys tem

9

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,

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.

Command Button /Hot keys

Function

© 2005 No Magic, Inc. 9-434

Page 412: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EMenu Sys tem

99

pasting items and entire diagrams, reversing the actions you have taken while drawing, and finding an item in the current project.

Command Button/ Shortcut keys

Function

Undo

CTRL+Z

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 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

CTRL+Y

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.

Cut

CTRL+X

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 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

CTRL+C

Copies the selected items or groups of items on the Diagram pane.

The copied items are placed in the clipboard. The 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.

Page 413: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EMenu Sys tem

9

Paste

CTRL+V

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 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 New Data

CTRL+E Pastes the cut and copied items and groups of items from the Clipboard to the Diagram pane of the current project. MagicDraw creates new data and data shapes in the current project.

Delete

CTRL+D

Deletes data together with symbol. It is unavailable until you select any item or group of items in the current project.

Delete Symbol(s)

DELETE Deletes model element’s symbol from the diagrams, by leaving it in the model.

Select All CTRL+A Selects all items on the Diagram pane of a particular project.

Copy as EMF

CTRL+SHIFT+E

Copies the selected model elements as EMF to the system clipboard. If no model elements are selected, copies an active diagram.

NOTE Copying as EMF is available only under Windows system.

Copy as JPG

CTRL+SHIFT+J

Copies the selected model elements as JPG to the 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+F

Performs a quick search of class/interface, classifier or diagram.

Find TODO Performs a search for TODO tagged value. Results are displayed in the Browser, the Search Results tab.

Find Usages CTRL+ALT+U

Finds a list of all elements that reference the current element.

Find Dependent Elements

CTRL+ALT+D

Finds a list of the elements that depend on the current element.

Command Button/ Shortcut keys

Function

© 2005 No Magic, Inc. 9-436

Page 414: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EMenu Sys tem

99

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.

Command Button/ Shortcut keys

Function

9-437 © 2005 No Magic, Inc.

Page 415: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EMenu Sys tem

9

View menu

Command Button / Hot keys Function

Fit In WindowCTRL+W

Reduces the size of the whole diagram to fit better in the Diagram pane.

Zoom In

CTRL+NUMPAD PLUS SIGN (+)

To change the zoom step size choose Environment from the Options menu and set the Zoom Step Size property in the Environment Options dialog box.

Zoom Out

CTRL+NUMPAD MINUS SIGN (-)

Decreases the size of the selected objects in the diagram pane by x percent. To change the zoom step size, choose Environment from the Options menu and set the Zoom Step Size property in the Environment Options dialog box.

Zoom 1:1

CTRL+NUMPAD SLASH MARK (/)

Restores the original size of the selected diagram symbols.

Zoom To Selection CTRL+NUMPAD ASTERICS MARK (*)

Increases the size of the selected 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

Page 416: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EMenu Sys tem

99

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.

Toolbars:• Business Process Diagram• Custom Diagrams• Diagrams• Symbol Editing• Edit • File• Path Editing • Projects • Teamwork • Undo/Redo • View • Save Configuration On

Exit• Save Configuration • Save Configuration As

Clear the check boxes of the toolbars you want to hide.

Status Line Select the check box of Show Status Bar or Show Memory Monitor to display this info on the status line.

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.

Command Button / Hot keys Function

9-439 © 2005 No Magic, Inc.

Page 417: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EMenu Sys tem

9

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 Style

Applies layouter, which routes the links of a diagram 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• Right

• Left

• Top

• Bottom

Aligns the selected shapes:• Aligns the selected shape(s) vertically, starting with the

rightmost shape(s).• Aligns the selected shape(s) vertically, starting with the

leftmost shape(s).• Aligns the selected shape(s) across from the

uppermost shape(s).• Aligns the selected shape(s) across from the

lowermost shape(s).

Center• Horizontally• Vertically

Centers the selected shapes:• Centers the selected shape(s) on a horizontal line. • Centers the selected shape(s) on a vertical line.

Space Evenly• Horizontally• Vertically

Sets spaces among the selected shapes evenly.• Spaces between the selected shapes become even on

a horizontal line. • Spaces between the selected shapes become even on

a vertical line.

Command Function

© 2005 No Magic, Inc. 9-440

Page 418: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EMenu Sys tem

99

Diagrams menu

Command Hot keys Function

Class Diagrams

CTRL+1

The Class Diagrams dialog box opens.

Use Case Diagrams

CTRL+2

The Use Case Diagrams dialog box opens.

Communication Diagrams

CTRL+3

The Communication Diagrams dialog box opens.

Sequence Diagrams

CTRL+4

The Sequence Diagrams dialog box opens.

State Diagrams

CTRL+5

The State Diagrams dialog box opens.

Activity Diagrams

CTRL+6

The Activity Diagrams dialog box opens.

Implementation Diagrams

CTRL+7

The Implementation Diagrams dialog box opens.

Composite Structure Diagrams

CTRL+8

The Composite Structure Diagrams dialog box opens.

Business Process Diagrams The Business Process Diagrams dialog box opens.

Time Diagrams The Time Diagrams dialog box opens.

9-441 © 2005 No Magic, Inc.

Page 419: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EMenu Sys tem

9

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.

Command Hot keys Function

© 2005 No Magic, Inc. 9-442

Page 420: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EMenu Sys tem

99

Options menu

For more details about dialog boxes, see Section “Dialog Boxes” on page 9-471.

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

CTRL+0

Activates the previously opened diagram.

Next Diagram

CTRL+9

Activates the next diagram.

Load All Diagrams If there are unloaded diagrams in the project, this command loads all diagrams.

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.

Command Hot keys Function

9-443 © 2005 No Magic, Inc.

Page 421: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EMenu Sys tem

9

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 Enrichment

Opens the Software Design Model Wizard 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

Page 422: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EMenu Sys tem

99

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

• Login

• Logout• Launch CaliberRM Client• CaliberRM Requirements

Integration with CaliberRM.

Opens the Login dialog box for login to CaliberRM server.Logouts from CaliberRM server.Launches CaliberRM Client application.Opens the CaliberRM Requirements window in MagicDraw.

Command Hot key Function

9-445 © 2005 No Magic, Inc.

Page 423: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EMenu Sys tem

9

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.

CVS

• Command Line

• Checkout Module

• Add Project to CVS

• Commit Project to CVS

• Update CVS Project

Perform operations with CVS (the detailed description about integration with CVS, see MagicDraw Integrations User’s Guide) • 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 new module on your disk. The Checkout Module dialog box appears.

• 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.

• Commits a project to CVS. The Commit Project to CVS dialog box appears.

• Updates the current project by loading the latest project version from CVS.

Command Hot key Function

Containment Tree Opens the Containment Tree tab in Browser window.

Command Hot key Function

© 2005 No Magic, Inc. 9-446

Page 424: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EMenu Sys tem

99

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

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+SHIFT+F4

Closes all opened diagrams except the one you currently use.

Close All Diagrams CTRL+ALT+F4

Closes all opened diagrams.

Command Hot key Function

9-447 © 2005 No Magic, Inc.

Page 425: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

9

Help menu

TOOLBARSIn 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.

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• Online Support• MagicDraw Home Page• UML Stuff• No Magic Home Page

The WWW pages where you may find additional information about UML.Get online support.

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.

© 2005 No Magic, Inc. 9-448

Page 426: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

99

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.

Page 427: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

9

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

Toolbar button Name

© 2005 No Magic, Inc. 9-450

Page 428: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

99

Remove Break Points

Rectilinear

Oblique

Bezier

Reset Labels Positions

Draw Class Diagram

Use case Diagram

Communication Diagram

Sequence Diagram

State Diagram

Activity Diagram

Toolbar button Name

9-451 © 2005 No Magic, Inc.

Page 429: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

9

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

Toolbar button Name

© 2005 No Magic, Inc. 9-452

Page 430: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

99

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.

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

Toolbar button Name

9-453 © 2005 No Magic, Inc.

Page 431: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

9

Toolbar button

Shortcut key Name

ESCAPESelection

ZSticky Button

NNote

SHIFT+NNote (HTML text)

XText Box

SHIFT+XText Box (HTML text)

H Anchor to Note

SHIFT+H Constraint

SHIFT+C Containment

SHIFT+H Constraint

© 2005 No Magic, Inc. 9-454

Page 432: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

99

Class diagram toolbar

The Class Diagram toolbar has the following tools for drawing class diagrams:

D Dependency

W Separator

Rectangular Shape

Toolbar button

Shortcut key Name

C Class

SHIFT+P Class by Pattern. The Pattern Wizard appears.

K Enumeration

Signal

Data Type

Toolbar button

Shortcut key Name

9-455 © 2005 No Magic, Inc.

Page 433: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

9

Primitive Type

I Interface

P Package

M Model

G Generalization

S Association

Directed Association

Non-navigable Association

O N-ary Association

Association Class

Toolbar button

Shortcut key Name

© 2005 No Magic, Inc. 9-456

Page 434: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

99

A Aggregation

Directed Aggregation

F Composition

Directed Composition

R Interface Realization

E Realization

Substitution

U Usage

T Abstraction

B Template Binding

Toolbar button

Shortcut key Name

9-457 © 2005 No Magic, Inc.

Page 435: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

9

Use Case diagram toolbar

The Use Case diagram toolbar has all general tools for drawing Use Case diagrams:

Package Merge

Package Import

Element Import

SHIFT+O Instance

SHIFT+L Link

Toolbar button

Shortcut key

Name

A Actor

U Use Case

P Package

B System Boundary

Toolbar button

Shortcut key Name

© 2005 No Magic, Inc. 9-458

Page 436: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

99

Communication diagram toolbar

The Communication diagram toolbar has all general tools for drawing Communication diagrams:

Subsystem

C Include

E Extend

S Association

G Generalization

Toolbar button

Shortcut key Name

O Lifelinet

C Connector

S Connector to Self

Message to Right

Toolbar button

Shortcut key

Name

9-459 © 2005 No Magic, Inc.

Page 437: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

9

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

Toolbar button

Shortcut key Name

© 2005 No Magic, Inc. 9-460

Page 438: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

99

Sequence diagram toolbar

The Sequence Diagram toolbar has all general tools for drawing Sequence diagrams:

Destroy Message to Left

Toolbar button

Shortcut key

Name

O Lifeline

SHIFT+A Alternatives

SHIFT+L Loop

SHIFT+O Option

SHIFT+P Parallel

SHIFT+B Break

SHIFT+N Negative

Toolbar button

Shortcut key Name

9-461 © 2005 No Magic, Inc.

Page 439: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

9

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

Toolbar button

Shortcut key

Name

© 2005 No Magic, Inc. 9-462

Page 440: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

99

State diagram toolbar

The State Diagram Window toolbar has all general tools used in drawing the state diagrams:

R Reply Message

C Create Message

T Destroy Message

D Diagonal Message

S Message to Self

R Recursive Message

Toolbar button

Shortcut key

Name

SHIFT+S State

SHIFT+C Composite State

Toolbar button

Shortcut key

Name

9-463 © 2005 No Magic, Inc.

Page 441: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

9

C Orthogonal State

M Submachine State

I Initial State

F Final State

Terminate

Y Entry Point

Exit Point

Connection Point Reference

P Deep History

SHIFT+R Shallow History

J Junction

Toolbar button

Shortcut key

Name

© 2005 No Magic, Inc. 9-464

Page 442: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

99

Activity diagram toolbar

The Activity Diagram Window toolbar has all general tools used in drawing the state diagrams:

O Choice

D Fork/Join Horizontal

G Fork/Join Vertical

T Transition

E Transition to Self

Toolbar button

Shortcut key

Name

B Action

O Call Operation Action

SHIFT+B Object Node

Toolbar button

Shortcut key

Name

9-465 © 2005 No Magic, Inc.

Page 443: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

9

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

L Flow Final

G Decision/Merge

K Fork/Join Horizontal

Toolbar button

Shortcut key

Name

© 2005 No Magic, Inc. 9-466

Page 444: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

99

Implementation diagram toolbar

The Implementation Diagram Window toolbar has all general tools used for drawing an implementation diagram:

Shift+K Fork/Join Vertical

P Exception Handler

Stuctured Activity Node

SHIFT+I Input Pin

SHIFT+O Output Pin

SHIFT+V Vertical Swimlanes

SHIFT+W Horizontal Swimlanes

Toolbar button

Shortcut key

Name

K Component

A Component Instance

Toolbar button

Shortcut key

Name

9-467 © 2005 No Magic, Inc.

Page 445: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

9

SHIFT+R Port

O Node

Execution Environment

Device

T Node Instance

Execution Environment Instance

Device Instance

P Package

B Artifact

Deployment Specification

Artifact Instance

Toolbar button

Shortcut key

Name

© 2005 No Magic, Inc. 9-468

Page 446: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

99

Deployment Specification Instance

F Interface

R Interface Realization

E Realization

U Usage

SHIFT+O Instance

Assembly Connector

Delegation Connector

Deployment

Manifestation

G Generalization

Toolbar button

Shortcut key

Name

9-469 © 2005 No Magic, Inc.

Page 447: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EToolbars

9

Composite Structure diagram toolbar

The Composite Structure Diagram Window toolbar has all general tools used for drawing a composite structure diagram:

L Link

Communication Path

Toolbar button

Shortcut key

Name

C Classifier

P Part

SHIFT+R Port

Q Collaboration

U Collaboration Use

C Connector

Toolbar button

Shortcut key

Name

© 2005 No Magic, Inc. 9-470

Page 448: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EDialog Boxes

99

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.

B Role Binding

Toolbar button

Shortcut key

Name

9-471 © 2005 No Magic, Inc.

Page 449: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

U S E R RE F E R E N C EDialog Boxes

9

Figure 165 -- Submit a Bug dialog box

Tab name Box Function

Mail Form Fill the main information about yourself and describe a bug or suggestion.

Your Name Type your name.

Your E-Mail Type your e-mail address.

Outgoing Mail (SMTP)

Enter the name of the server of your outgoing mail.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 Choose the files you want to attach to the bug description.

Attach Log File Attaches the log file of the project.

Attach Project File Attaches current MagicDraw project file.

Attach Diagrams Images

Attaches current MagicDraw diagrams as images.

Not Empty Diagrams

The list of diagrams that contains at least one 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

Page 450: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

TO O L SMetr ics

1

10-409 © 2005 No Magic, Inc.

Page 451: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M A G I C D R A W U S E R ’ S M A N U A L

I n d e x

Aabstract

class 196, 236operation 207

Abstract (generalizable element) 125, 223action state 179activation bar 172, 258active

class 196activity diagram 178actor 168

working with 235aggregation 164

creating 228assigning

classifier to classifier role 248classifier to collaboration 221classifier to instance 244model element to a package 130state to object flow state 269

association 163in class diagram 223in use case diagram 223n-ary 225navigability of 228with a role 201

association class 225association end

multiplicity of 229qualifier of 229visibility of 228

asynchronous message/stimulus 249attribute 198

creating new 198defining initial value of 245multiplicity 202scope of 202show only public 216type modifier of 201type of 201

attributescontrolling the list of 196representing as association 201sorting of 216suppressing compartment 216

Bbinding dependency 232browser

changing position 84changing size 84closing or reopening 84code engineering sets in 86

© 2005 No Magic, Inc. 410

Page 452: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M A G I C D R A W U S E R ’ S M A N U A L

I n d e x

Containment tree 84creating model elements and diagrams in 91Diagrams tree 88displaying full information in 85Documentation tab 93functions of 82Inheritance tree 89Model Extensions tree 90multiple selections 93sorting alphabetically 84structure 83Zoom tab 94

CCall (event type) 266Change (event type) 266changeable 202child element 221class 194

active 196creating setters and getters 385defining as abstract, leaf, root and/or active 196, 236description of 194design patterns 214inner elements of 196owner of 130show/hide package name 130suppressing attributes 216suppressing operations 216

class diagram 160elements in 162wizard 351

classifierassign to an instance 244assigning to a collaboration 221assigning to classifier role 248

classifier roleassigning classifier to 248in sequence diagram 172

closingall opened projects 81diagram 106

code engineeringchecking syntax 87creating new set 86editing set 86

code generation 87changing properties of 86

collaborationassigning classifier to 221

collaboration diagramchanging numbering in 251

compartments of class 194

© 2005 No Magic, Inc. 411

Page 453: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M A G I C D R A W U S E R ’ S M A N U A L

I n d e x

component 185, 274diagram 183instance 185view 160

Component View package 42composition 228concurrency of operation 208concurrent

operation 208conditional branch 258constraints

show-hide on symbol 129showing on class 216

content diagram 299copying/cutting

among different projects 92in the Browser 92of text 117symbol on a diagram 117using drag and drop 117

CORBA IDL diagram 312creating

backup file 45displaying already created relationships 113elements and diagrams in Browser 91new attribute 198new code engineering set 86new diagram 104new operation 203new project style 51paths between shapes 113stereotypes 282

Ddata

creating several shapes of the same 111Data package 42data types 211DDL diagram 315defining

model elements 118deleting

all model elements 93from the Browser 92symbol or model element 113

dependencybinding 232in implementation diagram 188permission 233usage 233, 234

deployment diagram 184deployment view 160design patterns 214

© 2005 No Magic, Inc. 412

Page 454: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M A G I C D R A W U S E R ’ S M A N U A L

I n d e x

destroying sequence object 257diagram

closing 106creating 104defining properties of 56information table 109opening 105renaming 106saving as image 47

diagramsactivity 178class 160collaboration 170content 299CORBA IDL 312DDL 315implementation 183model management 158robustness 303sequence 171state 174use case 167web 306WSDL 317XML Schema 320, 323, 325

displayrelated elements 111

documentation of MagicDraw 12drag and drop

copying 117from browser to diagram 117multiple symbols 116source code files 117

drawingmore than one shape 110shape 110symbol from the Browser 92

Eediting

code engineering set 86editions of MagicDraw 11enumeration 209, 212enumeration literal 213event 174exporting

stereotypes 282extend 240extension point 237

adding to use case 238

Ffeatures of MagicDraw 11

© 2005 No Magic, Inc. 413

Page 455: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M A G I C D R A W U S E R ’ S M A N U A L

I n d e x

final state 263

Ggeneralizable elements 223

defining as 223generalization

grouping into tree 222generate

code from the selected set 87getter 385grid 148

size 149snapping to 149style 149visibility of 149

groupingdiagrams in Browser 88generalization paths into tree 222of model elements 216realizations into tree 230

Guarded 208

HHTML text 135hyperlink 136

for model element 135

Iimage

available formats 46saving as 47

implementation diagram 183elements in 185

include 169, 242initial value

defining for attribute 245showing on attribute 216

inner elementsof class (inserting) 196

installationother platforms 20system requirements 18UNIX 20using no install 20Windows 19

instance 187assign classifier to 244of component 185of node 186

interface 187interface style

making changes to 39Metal 39

© 2005 No Magic, Inc. 414

Page 456: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M A G I C D R A W U S E R ’ S M A N U A L

I n d e x

Motif 39multiple windows 40Windows 39

internal transition 266

JJVM (Java Virtual Machine)

for Mac OS X 19for Solaris 19for Windows 19

Llayout 138Leaf

class 196Leaf (generalizable element) 223lifeline 172, 257

concurrent 173, 258link

in class diagram 167in collaboration diagram 171in implementation diagram 189

link attribute 194link to self 171logical view 159Look and Feel themes 39

MMac OS X

installation 20JVM 19

MagicDrawappearance of 38documentation 12editions 11environment options 22features 11support 15updating 20

messagechanging numbering of 251defining action for 251diagonal 173in collaboration diagram 171

asynchronous 249synchronous 249

in sequence diagram 258predecessor of 252recursive 173to self 173uninterpreted 173

modeldevelopment of 10

© 2005 No Magic, Inc. 415

Page 457: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M A G I C D R A W U S E R ’ S M A N U A L

I n d e x

static structural 160model element

defining 118saving as image 47

model management 161moving

of all model elements 93symbol 116

MS Officecopying to 117

multiple windows 40multiplicity

of an attribute 202of association end 229

Nname

specifying for a shape 110n-ary association 225navigability

of association 228node 185, 276note 154

adding hyperlink to 136retrieving documentation 156text as HTML in 135

note anchor 155numbering

changing 251numbers

show/hide on collaboration diagram 251

Oobject flow state

assigning state 269defining classifier for 269

openingdiagram 105diagram from Browser 88last project on startup 49project 48specification dialog box 118

operationconcurrency 208creating new 203defining 203defining as abstract, leaf, or root 207functions of 203parameter of 205return type 207return type of 205show only public 216showing signature of 215

© 2005 No Magic, Inc. 416

Page 458: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M A G I C D R A W U S E R ’ S M A N U A L

I n d e x

visibility 207operations

controlling the list of 196generation of setters and getters 196managing 386sorting of 216suppressing compartment 216

orderingof attributes 216of operations 216

Ppackage 162, 186, 216

adding inner elements 217changing header position 217Component View 42Data 42dependency wizard 355, 358showing assigned model elements 218

parameterof an operation 205

parameterized class 208defining of 208

parent element 221partition 271paste 117

with new data 117path 104

changing style of 114defining properties of 56drawing 113

patterns See design patternspermission 233predecessor 252presentation options

for class 215primitive 214printing 150process view 160project

dividing into modules 61multiple projects 80opening of 48packages of 42reusing project parts 61

propertieschanging code generation 86

pseudostate 174

Qqualifier

of association end 229

© 2005 No Magic, Inc. 417

Page 459: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M A G I C D R A W U S E R ’ S M A N U A L

I n d e x

Rrealization

grouping into tree 230registering MagicDraw 20relationship

displaying on diagram 113renaming

diagram in Browser 89reports 332return type

of an operation 207reverse

changed files 87code engineering set 87

robustness diagram 303Root

class 196

SSave (dialog box) 45Save As Image (dialog box) 47, 48saving 44

as image 47formats 45in .mdf format 44project 45project as template 46

selection 116all symbols of the same type 116multiple 116multiple (in the Browser) 93of all model elements 93of all symbols 116of symbol 116

separator 156adding hyperlink to 136

sequence diagrammodel elements in 172overview 171

Sequential 208setter 385shape

defining properties of 56definition 104drawing more than one shape 110drawing of 110

shortcut keysassigning 149

Signal (event type) 266signal receipt

trigger event for 271Solaris

JVM 19

© 2005 No Magic, Inc. 418

Page 460: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M A G I C D R A W U S E R ’ S M A N U A L

I n d e x

sortingof attributes 216of operations 216

state 175, 179, 258state diagram

model elements in 174state machine 174statechart diagram See state diagramstereotypes

Builds 287Client Page 285creating of 282defining properties of 56Form 285Frame Context 287Frame Set 286IIOP 289importing 282Input Element 290JavaScript 286Link 287Object 289Page 290Redirect 289RMI 289Select Element 290Server Page 284show/hide on a symbol 129showing on class 216Submit 287Target 286Targeted Link 287Text Area 290working with 280

stimuluschanging numbering 251changing numbering of 251defining action for 251main information about 171

support for MagicDraw 15swimlane 271symbols 104

defining properties 129formatting 56moving 116presentation of

constraint 135note 154note anchor 135separator 135text box 135

synchronous 249system boundary 168

© 2005 No Magic, Inc. 419

Page 461: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M A G I C D R A W U S E R ’ S M A N U A L

I n d e x

Ttagged values

show/hide on a symbol 129showing on class 216working with 291

templatesaving as 46

text box 135adding hyperlink 136text as HTML in 135

text editorchoosing 87

Time (event type) 266TODO 294transition 181

to self 178type modifier 201type of an attribute

showing full path 215

UUnix

installation 20updating MagicDraw 20usage 233, 234use case

adding extension point 238extension point 237

use case view 159

Vvisibility

for operation 207of association end 228showing on attribute 216showing on operation 216

Wweb diagram 306web extension 284Windows

interface style 39JVM 19

wizards 332workspace 43WSDL diagram 317

XXMI 45XML Schema diagram 320, 323, 325

Zzooming 147

© 2005 No Magic, Inc. 420

Page 462: USER S MANUAL - lost-contact.mit.edu home page · 2005-11-24 · you may use it to design your entire OO system in any programming language and any software development process. The

M A G I C D R A W U S E R ’ S M A N U A L

I n d e x

adjusting step size 148fit in window 147to maximum size 148to original size 148using Browser 94zoom in 148zoom out 148

© 2005 No Magic, Inc. 421


Recommended