MagicDraw Integrations UserGuide

56
INTEGRATIONS with JBuilder, Eclipse, WSAD, Sun Java Studio, NetBeans, IntelliJ IDEA, BEA WebLogic Workshop, Caliber RM, and CVS version 9.5 user’s guide No Magic, Inc. April, 2005

description

uml

Transcript of MagicDraw Integrations UserGuide

Page 1: MagicDraw Integrations UserGuide

INTEGRATIONSwith JBuilder, Eclipse, WSAD, Sun Java Studio, NetBeans, IntelliJ IDEA, BEA WebLogic Workshop, Caliber RM, and CVS

version 9.5

user’s guide

No Magic, Inc.

April, 2005

Page 2: MagicDraw Integrations UserGuide

CONTENTS 01 Integration with Eclipse/WSAD 1-5

Installation 1-5System requirements 1-5Automatic MagicDraw installation into Eclipse 1-5Manual MagicDraw Installation into Eclipse 1-6

MagicDraw and Eclipse integration functionality 1-7Integration properties 1-7Opening MagicDraw project from Eclipse 1-9Updating the UML model 1-9Selecting a class in the MagicDraw browser 1-12Adding a class to the Eclipse project 1-12Synchronization between MagicDraw and Eclipse 1-12Going to class source 1-13Eclipse integration and Teamwork 1-13Libraries visualization 1-13

Known Eclipse problems 1-13

2 Integration with Borland’s JBuilderTM 2-15Integration Process 2-15

Automatic MagicDraw integration with JBuilder 2-15Manual MagicDraw Integration with JBuilder 2-16

JBuilder and MagicDraw Integration Functionality 2-17Switching between JBuilder and MagicDraw user interfaces 2-17MagicDraw Project Representation in JBuilder 2-17Updating the MagicDraw UML model from the JBuilder Interface 2-19Adding a class to the JBuilder project from the MagicDraw UML model 2-20

Known JBuilder problems 2-21

3 Integration with Sun Java Studio and NetBeans 3-23MagicDraw Integration Process 3-23Working with MagicDraw in sun Java Studio 3-25

Creating new class diagram using Java source code files 3-26Updating UML Data using Java source 3-27Selecting created class in UML Modeling browser 3-28Saving UML Data 3-28Adding a class to the Sun Java Studio project 3-28Going to class source 3-29

Page 3: MagicDraw Integrations UserGuide

M a g i c D r a w I n t e g r a t i o n s U s e r ’ s G u i d eC o n t e n t s

Menu system for UML modeling in NetBeans (Sun Java Studio) 3-29UML Modeling Toolbar Configuration 3-30

MagicDraw Toolbar 3-30Known Sun Java Studio/Netbeans problems 3-31Integration Tool Error Messages 3-31

Wrong Forte4J Home Directory 3-31Wrong MagicDraw UML Home Directory 3-31Unknown OS 3-32MagicDraw UML module not found 3-32Cannot set CLASSPATH 3-32

4 Integration with IntelliJ IDEA 4-33Installation 4-33

System Requirements 4-33Automatic MagicDraw installation into IntelliJ IDEA 4-33Manual MagicDraw Installation into IntelliJ IDEA 4-34

IntelliJ IDEA and MagicDraw Integration Functionality 4-35Updating UML Model 4-35Selecting a Class in the MagicDraw Browser 4-36Adding a Class to the IntelliJ IDEA Project 4-36Going to Class Source 4-37Integration Properties 4-38

5 Integration with BEA WebLogic Workshop 5-41Installation 5-41

System Requirements 5-41Automatic MagicDraw installation into BEA Weblogic Workshop 5-41Manual MagicDraw Installation into BEA Weblogic Workshop 5-42

BEA WebLogic Workshop and MagicDraw Integration Functionality 5-43Updating UML Model 5-43Selecting a Class in the MagicDraw Browser 5-44Going to Class Source 5-45Integration Properties 5-45

6 Integration with Caliber RM 6-47System Requirements 6-47Automatic CaliberRM installation into MagicDraw 6-47

CaliberRM and MagicDraw Integration Functionality 6-47Login to CaliberRM server 6-47Logout from CaliberRM server 6-48Adding requirement to MagicDraw element 6-48Reviewing requirements added to elements 6-50Launching CaliberRM Client 6-50

© 2004 No Magic, Inc. 2

Page 4: MagicDraw Integrations UserGuide

M a g i c D r a w I n t e g r a t i o n s U s e r ’ s G u i d eC o n t e n t s

7 Integration with CVS 7-53Getting Started 7-53CVS properties 7-53Checkout module 7-54Add a Project to CVS 7-55Commit project to CVS 7-56Update project 7-57

© 2004 No Magic, Inc. 3

Page 5: MagicDraw Integrations UserGuide

IN T EGRAT ION W I TH

EC L I P S E /WSAD 1MagicDraw enables automatic synchronization of your model in MagicDraw with your code in Eclipse.

Though MagicDraw is installed into the Eclipse environment as an additional module, it runs in a separate window. The integration provides all MagicDraw functionality and UML data update according to the source code.

INSTALLATION

System requirements

Eclipse 2.0 or later, WebSphere Studio Application Developer 5.x, IBM Rational Application Developer 6.0.

Does not work with motif library on Unix, but works fine with gtk.

Does not work on Mac OS X.

Automatic MagicDraw installation into Eclipse

The MagicDraw UML Integration Tool is used to add MagicDraw module into Eclipse. You can find this tool in <MagicDraw installation directory>/integrations/eclipse directory.

When launching the Integration Tool (install.exe for Windows or install for Unix based OS) the MagicDraw UML Integration Tool dialog box appears.

Figure 1 -- MagicDraw UML Integration Tool

© 2005 No Magic, Inc. 1-5

Page 6: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H E C L I P S E / W S A DI n s t a l l a t i o n

1

If you do not wish to change directories, click the Integrate button in the MagicDraw UML Integration Tool dialog box.

To change the Eclipse or MagicDraw home directories

1 In the MagicDraw UML Integration Tool dialog box, click the corresponding Browse “…” button.

2 The Eclipse Home Directory or MagicDraw Home Directory dialog box appears.

3 Select the install directories and click OK. Then, click Integrate in the MagicDraw UML Integration Tool dialog box.

4 The Message box appears. If the integration process was successful, then only the Exit button is active. Click Exit.

NOTE: If automatic installation fails, please use Manual installation.

To unintegrate MagicDraw from Eclipse

In the MagicDraw UML Integration Tool dialog box, click the corresponding Unintegrate button.

Manual MagicDraw Installation into Eclipse

1 Create the directory ‘com.nomagic.magicdraw.integrations.eclipse’ in the <eclipse home>\plugins folder.

2 Copy the file md_eclipse.jar from the integrations/eclipse directory into <eclipse home>\plugins\com.nomagic.magicdraw.integrations.eclipse.

3 Copy the file plugin.xml from the integrations/eclipse directory into <eclipse home>\plugins\com.nomagic.magicdraw.integrations.eclipse.

4 Copy the file md.properties from integrations/eclipse directory into <eclipse home>\plugins\com.nomagic.magicdraw.integrations.eclipse.

5 Edit the file md.properties and change install.root property to the directory where MagicDraw UML was installed.

Example:install.root=C\:\\Program Files\\MagicDraw UMLorinstall.root=C:/Program Files/MagicDraw UML

1-6 © 2005 No Magic, Inc.

Page 7: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H E C L I P S E / W S A DM a g i c D r a w a n d E c l i p s e i n t e g r a t i o n f u n c t i o n a l i t y

1

6 Copy all jars from <MagicDraw home>\lib folder into <eclipse home>\plugins\com.nomagic.magicdraw.integrations.eclipse.

7 Launch Eclipse.

MAGICDRAW AND ECLIPSE INTEGRATION FUNCTIONALITY

MagicDraw runs as separate window that is connected with Eclipse and it opens only after the execution of an integration command.

Integration properties

Specify the MagicDraw and Eclipse integration properties in the Properties dialog box.

To open the Integration Properties dialog box

• From MagicDraw: Using Eclipse, open the MagicDraw project and from the Integration menu, click Integration Options.

• From Eclipse: From the MagicDraw menu, click Integration Options.

© 2005 No Magic, Inc. 1-7

Page 8: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H E C L I P S E / W S A DM a g i c D r a w a n d E c l i p s e i n t e g r a t i o n f u n c t i o n a l i t y

1

Figure 2 -- Integration Properties dialog box

Command Option Function

Generate imports

Full Class Name The import statement with full class name is added during source generation from MagicDraw.

Package Name The import statement with package name and * is added during source generation from MagicDraw.

Do Not Generate The import statement is not added during source generation from MagicDraw.

Unnamed Element Name

Enter a name of the model element to generate in the source code in instances when a model element within your model does not yet have a name attached to it.

Unnamed Type Name

Enter a name of the type to generate in the source code in instances when attributes, operations, or parameters do not yet have a type in your model. If an attribute without a type exists in a model, then, after adding the class of this attribute into the Eclipse project, an attribute with int type will be generated in the source code.

Update UML Model

Update Model by Code

Removes all methods/attributes/associations from the model if they do not exist in the code at the time Update UML Model is executed.

Merge Model by Code Leaves all methods/attributes/associations in the model if they do not exist in the code at the time Update UML Model is executed.

For new Eclipse attributes create

Attributes Creates attributes in MagicDraw for new attributes created in Eclipse.

Association Creates associations in MagicDraw for new attributes created in Eclipse.

Synchronization Mode

Manual Synchronization between model and code is made manually (by selecting a command).

Automatic (default) Every time model is changed, code is updated. Every time code is changed, model is updated (after saving).NOTE: New classes in Eclipse are not added to MagicDraw and vice versa. The user must add them manually.

Code-to-model automatic

Every time code is changed, model is updated. Changes are not made in code after changing the model.NOTE: New classes in Eclipse are not added to MagicDraw and vice versa. The user must add them manually.

Create class members for libraries

If selected, library classes in model will be created with attributes and methods.

Default source path

Choose available source paths for all linked projects. You may define source paths in Eclipse.

1-8 © 2005 No Magic, Inc.

Page 9: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H E C L I P S E / W S A DM a g i c D r a w a n d E c l i p s e i n t e g r a t i o n f u n c t i o n a l i t y

1

Opening MagicDraw project from Eclipse

For the newly created Eclipse project, MagicDraw local or Teamwork project can be created:

1 From the Eclipse project shortcut menu, choose Open MagicDraw Project.

2 MagicDraw is started. The New Project Wizard dialog box appears.

Figure 3 -- New Project Wizard

3 Specify project name and the location of the project.

4 Choose project type: local one or Teamwork. For the Teamwork mode you may select a project from already created models in the Teamwork server.

5 Choose which profile you want to import - Full JDK 1.4 profile, or only JDK 1.4 java and javax packages.

6 Go to the next step, to define integration properties. The detailed description of integration properties you may find in Section “Integration properties” on page 1-7.

Updating the UML model

There are several ways to represent classes created in Eclipse in the MagicDraw project:

© 2005 No Magic, Inc. 1-9

Page 10: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H E C L I P S E / W S A DM a g i c D r a w a n d E c l i p s e i n t e g r a t i o n f u n c t i o n a l i t y

1

• Select a java source file (or several files) in the Eclipse project browser. Open the shortcut menu and select Update UML Model:

Figure 4 -- Select in MagicDraw and Update UML Model command

1-10 © 2005 No Magic, Inc.

Page 11: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H E C L I P S E / W S A DM a g i c D r a w a n d E c l i p s e i n t e g r a t i o n f u n c t i o n a l i t y

1

• Open the java source in the Eclipse editor window. From the MagicDraw menu, select Update UML Model:

Figure 5 -- Update UML Model command

Changes made in the java source file are automatically reflected in the MagicDraw project once you have selected Synchronization mode as Automatic or Code to model automatic in the integration Properties dialog box (See Section “Integration properties” on page 1-7).

When updating UML model, you may choose one of the following option in the integration Properties dialog box:

Since version 9.5 you may choose attributes or associations you want to create in MagicDraw for attributes created in Eclipse. This option you may also define in the Integration Properties dialog box.

Update Model by Code

Removes all methods/attributes/associations from the model if they do not exist in the code at the time Update UML Model is executed.

Merge Model by Code Leaves all methods/attributes/associations in the model if they do not exist in the code at the time Update UML Model is executed.

© 2005 No Magic, Inc. 1-11

Page 12: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H E C L I P S E / W S A DM a g i c D r a w a n d E c l i p s e i n t e g r a t i o n f u n c t i o n a l i t y

1

Selecting a class in the MagicDraw browser

• From the Eclipse project browser, choose Select in MagicDraw .

• Go to the source editor in Eclipse and, from the MagicDraw menu, choose Select in MagicDraw.

Adding a class to the Eclipse project

There are four ways to add a class to an Eclipse project from a MagicDraw project:

• From the class in the MagicDraw browser shortcut menu, select Update Eclipse. The class source will be generated into the java source file, which will then be added to the Eclipse project.

• From the package in the MagicDraw browser shortcut menu, select Update Eclipse. All classes from this package will be added to the Eclipse project.

• From the selected class or package in any MagicDraw diagram shortcut menu, select Update Eclipse.

• Select a class (or package) in any MagicDraw diagram. Open the Integration menu and select Update Eclipse.

Synchronization between MagicDraw and Eclipse

Since version 9.5 three synchronization modes are presented:

You may define choose synchronization mode in the Integration Properties dialog box or from the Integration menu in MagicDraw.

Synchronization mode

Description

Automatic Every time model is changed, code is updated. Every time code is changed, model is updated (after saving).NOTE: New classes in Eclipse are not added to MagicDraw and vice versa. The user must add them manually.

Manual Synchronization between model and code is made manually (by selecting correspondingly Update Eclipse or Update UML Model).

Code to model automatic

Every time code is changed, model is updated. Changes are not made in code after changing the model.NOTE: New classes in Eclipse are not added to MagicDraw and vice versa. The user must add them manually.

1-12 © 2005 No Magic, Inc.

Page 13: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H E C L I P S E / W S A DK n o w n E c l i p s e p r o b l e m s

1

Going to class source

To open the class/operation/attribute source code in Eclipse, from the Integration menu, select Go to Source in Eclipse. This command is available just after the class has been added into the Eclipse project.

Eclipse integration and Teamwork

When opening project, created in Eclipse, you may choose to open it in a local MagicDraw project or in a Teamwork project.

To map Eclipse project to a MagicDraw Teamwork project

1 Choose a command to open MagicDraw from Eclipse.

2 MagicDraw starts up and New Project Wizard appears.

3 Choose the Teamwork Model option button and then click ... button.

4 Log in to the Teamwork server and choose the desired project.

5 From Eclipse, update UML model.

To change the mapping from local model to teamwork model

1 Connect to the MagicDraw Teamwork server.

2 Choose the Add Project To Teamwork command.

Libraries visualization

Since version 9.5, libraries that are used in Eclipse can be referenced in MagicDraw models. On lib, in Eclipse, choose Update UML Model. Created model package in MagicDraw will be marked with stereotype <<topLevel>>.

In the Integration Properties dialog box, you may choose what you want to create - just classes in model without attributes and methods (default), or together with attributes and methods (option Create class members for libraries).

KNOWN ECLIPSE PROBLEMS

• Sometimes change in class source does not update opened editor.

• No way to generate/reverse information about final method parameters.

• No way to remove all extended classes or implemented interfaces for some class or interface.

© 2005 No Magic, Inc. 1-13

Page 14: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H E C L I P S E / W S A DK n o w n E c l i p s e p r o b l e m s

1

• Class fields defined using ',' are updated incorrectly.

1-14 © 2005 No Magic, Inc.

Page 15: MagicDraw Integrations UserGuide

IN T EGRAT ION W I TH

BOR LAND ’ S J BU I LDER TM 2MagicDraw TM UML provides integration of JBuilder TM with MagicDraw TM.

This integration has been fully tested with JBuilder Versions 8.0, 9.0, X and JBuilder 2005.

INTEGRATION PROCESS

Automatic MagicDraw integration with JBuilder

Step 1:

Go to <MagicDraw UML installation directory>/integrations/JBuilder and start the install program. The tool will ask you to specify the JBuilder and MagicDraw installation directories.

Figure 6 -- MagicDraw and JBuilder installation directories dialog box

To start the integration process, click Integrate.

Step 2:

Start JBuilder as usual. If the integration process has been successful, the MagicDraw application will start automatically, together with the JBuilder application.

NOTE: The MagicDraw user interface does not integrate directly into the JBuilder IDE interface. MagicDraw commands are found in a separate user interface, the same interface that you would find if

© 2005 No Magic, Inc. 2-15

Page 16: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H B O R L A N D ’ S J B U I L D E R T MI n t e g r a t i o n P r o c e s s

2

you used MagicDraw independent of any specific IDE. To go back and forth between the two interfaces, please see section 1.3.1

Every JBuilder project has only one correlated MagicDraw project. This project is saved as a MagicDraw xml.zip file in the JBuilderTM project directory. You do not need to open the MagicDraw TM project separately. It opens automatically when the JBuilderTM project is opened.

Manual MagicDraw Integration with JBuilder

1 Copy file md.jar from integrations/jbuilder directory into <jbuilder home>\lib\ext.

2 Copy file md.properties from integrations/forte directory into <forte home>\lib\ext.

3 Edit file md.properties and change install.root property to directory where MagicDraw was installed.Example:install.root=C\:\\Program Files\\MagicDraw UMLorinstall.root=C:/Program Files/MagicDraw UML

4 Set MagicDraw classpath for Jbuilder:Create magicdraw.config file in \lib\ext and add such records:

addpath <MagicDraw Home>/lib/patch.jar

addpath <MagicDraw Home>/lib/activation

addpath <MagicDraw Home>/lib/batik.jar

addpath <MagicDraw Home>/lib/cvsclient.jar

addpath <MagicDraw Home>/lib/fop.jar

addpath <MagicDraw Home>/lib/jedit_syntax.jar

addpath <MagicDraw Home>/lib/jgl.jar

addpath <MagicDraw Home>/lib/jhall.jar

addpath <MagicDraw Home>/lib/jide-common.jar

addpath <MagicDraw Home>/lib/jide-dock.jar

addpath <MagicDraw Home>/lib/jimi.jar

addpath <MagicDraw Home>/lib/kunststoff.jar

addpath <MagicDraw Home>/lib/launcher.jar

addpath <MagicDraw Home>/lib/log4j-1.2.7.jar

addpath <MagicDraw Home>/lib/mail.jar

addpath <MagicDraw Home>/lib/md.jar

addpath <MagicDraw Home>/lib/xalan.jar

addpath <MagicDraw Home>/lib/xercesImpl.jar

addpath <MagicDraw Home>/lib/xfc.jar

addpath <MagicDraw Home>/lib/xml-apis.

addpath <MagicDraw Home>/lib/jax-qname.jar

addpath <MagicDraw Home>/lib/jaxb-api.jar

addpath <MagicDraw Home>/lib/jaxb-impl.jar

2-16 © 2005 No Magic, Inc.

Page 17: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H B O R L A N D ’ S J B U I L D E R T MJ B u i l d e r a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

2

addpath <MagicDraw Home>/lib/xsdlib.jar

addpath <MagicDraw Home>/lib/relaxngDatatype.jar

addpath <MagicDraw Home>/lib/namespace.jar

addpath <MagicDraw Home>/lib/jax-lib.sjar

addpath <MagicDraw Home>/lib/y.jar

addpath <MagicDraw Home>/lib/tidy.jar

where <MagicDraw Home> is MagicDraw install directory.

Example

addpath C:/Program Files/MagicDraw UML/lib/patch.jar

Use '/' as file separator.

5 Launch JBuilder.

JBUILDER AND MAGICDRAW INTEGRATION FUNCTIONALITY

Switching between JBuilder and MagicDraw user interfaces

To go from the java class source to the class in the MagicDraw browser

From either the JBuilder project browser or the JBuilder editor window shortcut menu, choose Select in MagicDraw.

To go from the MagicDraw interface to the class source code in JBuilder

Right click the class for which you want to see the associated code in JBuilder, and choose Go To Source in JBuilder. Access this command in the class shortcut menu from the diagram as just described, or in the project browser window. This command is accessible only from the class, use case and implementation diagrams.

NOTE to open the class/method/attribute source in JBuilder when you are in the MagicDraw class diagram user interface

MagicDraw Project Representation in JBuilder

Your MagicDraw project is represented as a separate node in the JBuilderTM browser with a MagicDraw icon. Do not remove this node from the project and do not rename it. If, for any reason, this MagicDraw icon does not appear, please go back and re-do the integration process.

© 2005 No Magic, Inc. 2-17

Page 18: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H B O R L A N D ’ S J B U I L D E R T MJ B u i l d e r a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

2

Specify the representation of your MagicDraw project in the MagicDraw application, Properties dialog box.

To open the integration Properties dialog box

In the MagicDraw Option menu choose Integration Properties.

Figure 7 -- Integration Properties dialog box

Command Option Function

Generate imports

Full Class Name The import statement with full class name is added during source generation from MagicDraw

Package Name The import statement with package name and * is added during source generation from MagicDraw.

Do Not Generate The import statement is not added during source generation from MagicDraw.

Update UML Model

Update Model by Code Removes all operations/attributes/associations from the model if they do not exist in the code at the time Update UML Model is run.

Merge Model by Code Leaves all methods/attributes/associations in the model if they do not exist in the code at the time Update UML Model is run.

Unnamed Element Name

Enter a name of the model element to generate in the source code if that model element does not have a name in the model.

2-18 © 2005 No Magic, Inc.

Page 19: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H B O R L A N D ’ S J B U I L D E R T MJ B u i l d e r a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

2

Updating the MagicDraw UML model from the JBuilder Interface

NOTE We suggest users rebuild the project in JBuilderTM before executing either of the two update model commands.

There are two ways to add classes from the JBuilder IDE to your MagicDraw project:

• Select a java source file (or several files) in the JBuilder TM project browser. Open the shortcut menu and select Update UML Model:

Figure 8 -- Update UML Model command

Unnamed Type Name

Enter a name of the type to generate in the source code if the attribute, operation, or parameter does not have a type in the model.For example, if an attribute without a type exists in a model, then, as a default, after adding the class of this attribute into the JBuilder TM project, an attribute with int type will be generated in the source code.

Command Option Function

© 2005 No Magic, Inc. 2-19

Page 20: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H B O R L A N D ’ S J B U I L D E R T MJ B u i l d e r a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

2

• Open the java source in the JBuilder editor window. Open the editor shortcut menu and select Update UML Model:

Figure 9 -- Update UML Model command

Changes made in the java source file are not automatically reflected in the MagicDrawTM project. To see the most recent changes in your MagicDraw project, you must run Update UML Model.

Adding a class to the JBuilder project from the MagicDraw UML model

There are four ways to add a class into the JBuilder project from the MagicDraw project:

• From the class in the MagicDraw browser shortcut menu, click Update JBuilder. The class source will be generated into the java source file and this file will be added to the JBuilder project.

• From the package in the MagicDraw browser shortcut menu, click Update JBuilder. All classes from this package will be added into the JBuilder project.

2-20 © 2005 No Magic, Inc.

Page 21: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H B O R L A N D ’ S J B U I L D E R T MK n o w n J B u i l d e r p r o b l e m s

2

• From the selected class or package in any MagicDraw diagram shortcut menu, click Update JBuilder.

• Select a class (or package) in any MagicDraw diagram, open the Tools menu and click Update JBuilder.

Any changes made or added into the model class are automatically reflected in the java source file. You do not need to manually update the command.

KNOWN JBUILDER PROBLEMS

• JBuilder duplicates inner class modifiers.

• Class fields defined using ',' are updated incorrectly.

• JBuilder does not return field, parameter or method return type if this type is inner class.

• If inner class has other inner classes, the information about them is duplicated in the outer class.

• Inner interfaces are updated as inner classes.

• Modifiers sometimes are not updated, especially abstract, static for inner classes.

© 2005 No Magic, Inc. 2-21

Page 22: MagicDraw Integrations UserGuide

IN T EGRAT ION W I TH SUN

JAVA S TUD IO AND

NETBEANS 3MagicDraw is integrated into the Sun Java Studio environment as an ordinary module. The same integrations rules are applied for NetBeans. This module provides UML modeling using a current Sun Java Studio project. Additionally, common MagicDraw functionality is added, such as diagrams creation, printing, and updating using current project files. UML data are automatically updated according to the source code. MagicDraw’s module uses the Sun Java Studio Look and Feel, and windowing style.

MagicDraw integrates with Sun Java Studio 5, NetBeans 3.5.1, NetBeans 3.6

MAGICDRAW INTEGRATION PROCESS The MagicDraw UML integration tool is used to add the MagicDraw module into NetBeans (Sun Java Studio) IDE. You can find this tool in <MagicDraw UML installation directory>/integrations/netbeans(sun java studio) directory.

When launching the Integration Tool (install.exe for Windows or install for Unix based OS), the MagicDraw UML Integration Tool dialog box appears.

Figure 10 -- MagicDraw UML Integration Tool

If you do not wish to change directories, click Integrate in the MagicDraw UML Integration Tool dialog box.

To change the NetBeans (Sun Java Studio) or MagicDraw home directories

1 Click the corresponding Browse button in the MagicDraw UML Integration Tool dialog box.

© 2005 No Magic, Inc. 3-23

Page 23: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H S U N J A V A S T U D I O A N D N E T B E A N SM a g i c D r a w I n t e g r a t i o n Pr o c e s s

3

2 The NetBeans (Sun Java Studio) Home Directory or MagicDraw Home Directory dialog box appears.

3 Select the install directories and click OK. Then, click Integrate in the MagicDraw UML Integration Tool dialog box.

4 The following message box appears:

Figure 11 -- MagicDraw UML Integration Status dialog box

• If the integration process was successful, then only the Exit button will be active. Click Exit. When NetBeans (Sun Java Studio) is launched, the NetBeans (Sun Java Studio) integration process is accomplished.

NOTE: If the integration process with NetBeans (Sun Java Studio) was successful but the integration still isn’t working, the following must be done:

5 Go to the integrations/netbeans(sun java studio) folder and copy the file MD.JAR to the <netbeans home>\modules folder.

6 Go to the integrations/betbeans(sun java studio) folder and copy the file md.properties to the <netbeans home>\bin folder.

7 Edit file md.properties and change <MagicDraw Install Root> to directory where MagicDraw UML was installed. Example:

install.root=C:/MagicDrawUML or install.root=C\:\MagicDrawUML

8 Set MagicDraw class path for Netbeans(Sun Java Studio). There are several methods how to do that:

• If file runide.exe is used for NetBeans (Sun Java Studio) IDE launching, then ide.cfg file should be edited, the following string should be added:

"-cp <MagicDraw jar files>" Where <MagicDraw jar files> are MagicDraw UML used jar files separated by ";"

MagicDraw UML used jar files: <MagicDraw Lib>\patch.jar <MagicDraw Lib>\md.jar <MagicDraw Lib> is \lib directory

• If file runide.bat is used for Netbeans(Sun Java Studio) IDE launching, then this file should be edited:

Search for string: "SET CLASSPATH="

3-24 © 2005 No Magic, Inc.

Page 24: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H S U N J A V A S T U D I O A N D N E T B E A N SWo r k i n g w i t h M a g i c D r a w i n s u n J a v a S t u d i o

3

then go to the end of this line and add the following string: ";" (quotes should be skipped)

9 Open the ide.policy fine in the Netbeans(Sun Java Studio) bin folder for editing and add the following text:

// MagicDraw

grant codeBase "file:d:/magicdraw/-"

{

permission java.security.AllPermission;

};

Where "d:/magicdraw" must be replaced by MagicDraw install path. Use '/' as file separator

10 Launch Netbeans(Sun Java Studio).

WORKING WITH MAGICDRAW IN SUN JAVA STUDIO

Sun Java Studio contains the UML modeling workspace. It is a workspace created in the Sun Java Studio environment, and contains UML-related components such as MD Toolbar, UML Data Browser, UML Diagrams Browser, UML Containment Browser, and UML Extensions Browser. This Workspace has its own toolbar configuration: UML Modeling. Working with MagicDraw diagrams in Sun Java Studio is the same as working with diagrams in MagicDraw UML.

When NetBeans (Sun Java Studio) is launched, the UML Data, UML Diagrams, UML Containment and UML Extensions, UML Search Results tabs are added to the NetBeans (Sun Java Studio) Explorer.

Figure 12 -- Explorer (UML Data)

© 2005 No Magic, Inc. 3-25

Page 25: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H S U N J A V A S T U D I O A N D N E T B E A N SWo r k i n g w i t h M a g i c D r a w i n s u n J a v a S t u d i o

3

For information on working with the UML Data Browser, see the MagicDraw User’s Manual, Section 2.5 “Browser.”

The UML Modeling Workspace contains a UML Data Properties window with three tabs: Documentation, Search, and Zoom. For more information, see MagicDraw User’s Manual, Section 2.5 “Browser.”

When the diagram is opened, it is placed into the UML Modeling Window as a separate tab.

Creating new class diagram using Java source code files

1 In the Explorer, open the Filesystems tab. Right-click the Java source file (files) or entire package (or select Tools from main menu).

3-26 © 2005 No Magic, Inc.

Page 26: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H S U N J A V A S T U D I O A N D N E T B E A N SWo r k i n g w i t h M a g i c D r a w i n s u n J a v a S t u d i o

3

2 From the Tools menu, select Create New Class Diagram.

Figure 13 -- Tools submenu. Create New Class Diagram command

3 A new class diagram is created in the Diagrams Window. This diagram will contain all data (classes, operations, etc.) from the selected files.

Updating UML Data using Java source

1 From the Explorer, open the Filesystems tab. Right-click the Java source file (files) or the entire package (or select Tools from main menu).

© 2005 No Magic, Inc. 3-27

Page 27: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H S U N J A V A S T U D I O A N D N E T B E A N SWo r k i n g w i t h M a g i c D r a w i n s u n J a v a S t u d i o

3

2 From the Tools menu, choose Update UML Model.

3 All data (classes, operations, etc.) from the selected files will be added to the UML Data.

Selecting created class in UML Modeling browser

1 From the Filesystems browser, choose Select in MagicDraw command.

2 Open the UML Modeling tab, the class in the Browser is selected.

Saving UML Data

If you have modified your UML Data, the Save dialog box appears once you close the current NetBeans (Sun Java Studio) Project.

Figure 14 -- Save dialog box

Buttons available in the Save dialog box:

Adding a class to the Sun Java Studio project

There are three ways to add a class to an NetBeans (Sun Java Studio) project from a MagicDraw project:

• From the class in the MagicDraw browser shortcut menu, select Add to Sun Java Studio. The class source will be generated into the java source file, which will then be added to the Sun Java Studio project.

Save Saves the selected item.

Save All Saves all changes.

Discard All Discards changes and exits the project.

Help NetBeans (Sun Java Studio) Help is displayed.

Cancel Cancel the Save dialog box.

3-28 © 2005 No Magic, Inc.

Page 28: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H S U N J A V A S T U D I O A N D N E T B E A N SM e n u s y s t e m f o r U M L m o d e l i n g i n N e t B e a n s ( S u n J a v a S t u d i o )

3

• From the package in the MagicDraw browser shortcut menu, select Add to Sun Java Studio. All classes from this package will be added to the Sun Java Studio project.

• Select a class (or package) in any MagicDraw diagram. Open the Tools menu and select Add to Sun Java Studio.

Any changes made or added into the Sun Java Studio class are automatically reflected in the java source file. You do not need to update the source file manually.

Going to class source

To open the class/operation/attribute source code in Sun Java Studio, from the Tools menu, select Go to Source in Sun Java Studio. This command is available just after the class has been added into the Sun Java Studio project.

MENU SYSTEM FOR UML MODELING IN NETBEANS (SUN JAVA STUDIO)

For a detailed description of the menu system, see the MagicDraw UML User’s Manual. You may find it at <MagicDraw installation directory>/Manual folder.

© 2005 No Magic, Inc. 3-29

Page 29: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H S U N J A V A S T U D I O A N D N E T B E A N SU M L M o d e l i n g To o l b a r C o n f i g u r a t i o n

3

UML MODELING TOOLBAR CONFIGURATION

To change the toolbar configuration for the MagicDraw UML Workspace, right-click the toolbar and select UML Modeling. Instead of the Component Palette toolbar, the UML Modeling toolbar is added.

Figure 15 -- Toolbar shortcut menu

MagicDraw Toolbar

This toolbar contains common actions used while working with MagicDraw.

Button Function

Class Diagrams Create new Class diagram

Use Case Diagrams Create new Use Case diagram.

Collaboration Diagrams Create new Collaboration diagram.

Sequence Diagrams Create new Sequence diagram.

State Diagrams Create new State diagram.

Activity Diagrams Create new Activity diagram.

Implementation Diagrams

Create new Implementation diagram

Previous diagram Activates the previously opened diagram.

Next diagram Activates the next diagram.

Fit In Window Fits diagram in active window

Zoom In Zoom in active diagram.

3-30 © 2005 No Magic, Inc.

Page 30: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H S U N J A V A S T U D I O A N D N E T B E A N SK n o w n S u n J a v a S t u d i o / N e t b e a n s p r o b l e m s

3

KNOWN SUN JAVA STUDIO/NETBEANS PROBLEMS

• strictfp modifier is not updated from source.

• Changing method from native to simple does not restore method body correctly.

INTEGRATION TOOL ERROR MESSAGES When installing the MagicDraw module, certain errors may occasionally occur. Common errors are listed below.

Wrong Forte4J Home Directory

Figure 16 -- Wrong Forte4J Home Directory error message box

Reason: NetBeans (Sun Java Studio) installation directory is specified incorrectly.

Solution: In the main window, click Browse and choose the correct directory.

Wrong MagicDraw UML Home Directory

Figure 17 -- Wrong MagicDraw UML Home Directory error message box

Reason: The MagicDraw installation directory is specified incorrectly.

Solution: In the main window, click Browse and choose the correct directory.

Zoom Out Zoom out active diagram.

Print Active Diagram Prints active diagram.

© 2005 No Magic, Inc. 3-31

Page 31: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H S U N J A V A S T U D I O A N D N E T B E A N SI n t e g r a t i o n To o l E r r o r M e s s a g e s

3

Unknown OS

Figure 18 -- Unknown OS error message box

Reason: The Integration Tool does not support your Operating System.

Solution: Contact the MagicDraw support team: [email protected]

MagicDraw UML module not found

Figure 19 -- MagicDraw UML Module not found error message box

Reason: Wrong MagicDraw Home Directory, or file md.jar in the Integrations directory was not found.

Solution: Specify the correct MagicDraw installation directory. If this does not solve the problem, check your MagicDraw version.

Cannot set CLASSPATH

Figure 20 -- Cannot set CLASSPATH error message box

Reason: Some Sun Java Studio files for Windows or Unix based OS) are opened and may not be modified.

Solution: Close all programs that are using these files.

3-32 © 2005 No Magic, Inc.

Page 32: MagicDraw Integrations UserGuide

IN T EGRAT ION W I TH INTE L L I J

I DEA 4MagicDraw enables automatic synchronization of your model in MagicDraw with your code in IntelliJ IDEA.

MagicDraw UML is installed into IntelliJ IDEA environment as an additional module, but runs in separate window. The integration provides all MagicDraw functionality and UML data update according to source code.

INSTALLATION

System Requirements

IntelliJ IDEA 4.x.

NOTE When Java constructions are being used, there might be several problems when using IntelliJ 4.5 integration with MagicDraw 8.0.

Automatic MagicDraw installation into IntelliJ IDEA

The MagicDraw UML Integration Tool is used to add MagicDraw module into IntelliJ IDEA. You can find this tool in <MagicDraw installation directory>/integrations/intellij directory.

When launching the Integration Tool (install.exe for Windows or install for Unix based OS) the MagicDraw UML Integration Tool dialog box appears.

2

© 2005 No Magic, Inc. 4-33

Page 33: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H I N T E L L I J I D E AI n s t a l l a t i o n

4

In the IntelliJ IDEA Home Directory field, specify the directory where the IntelliJ IDEA config file is located. For example: C:\Documents and Settings\<user name>\.IntelliJIdea

If you do not wish to change directories, click the Integrate button in the MagicDraw UML Integration Tool dialog box.

To change the IntelliJ IDEA or MagicDraw home directories

1 In the MagicDraw UML Integration Tool dialog box, click the corresponding Browse “…” button.

2 The IntelliJ IDEA Home Directory or MagicDraw Home Directory dialog box appears.

3 Select the install directories and click OK. Then, click Integrate in the MagicDraw UML Integration Tool dialog box.

4 The Message box appears. If the integration process was successful, then only the Exit button is active. Click Exit.

NOTE If automatic installation fails, please use Manual installation.

Manual MagicDraw Installation into IntelliJ IDEA

1 Create directory com.nomagic.magicdraw.integration in the <IntelliJ settings>\config\plugins folder.

2 Create directory lib in the < IntelliJ settings>\config\plugins\com.nomagic.magicdraw.integration

3 Copy file md_intellij.jar from integrations/intellij directory into

< IntelliJ settings>\config\plugins\com.nomagic.magicdraw.

integration\lib.

4 Copy file md.properties from integrations/intellij directory into

<IntelliJ settings>\config\plugins\com.nomagic.magicdraw.

integration.

5 Edit file md.properties and change install.root property to directory where MagicDraw UML was installed. Example:

install.root=C\:\\Program Files\\MagicDraw UMLorinstall.root=C:/Program Files/MagicDraw UML

6 Copy all jars from <MagicDraw home>\lib folder into < IntelliJ settings>\config\plugins\com.nomagic.magicdraw.integration\lib excluding xml-apis.jar, xercesImpl.jar.

7 If MagicDraw version is patched (contains non empty patch.jar file in <MagicDraw home>\lib folder), apply all patch.jar content into md.jar (located at IntelliJ

4-34 © 2005 No Magic, Inc.

Page 34: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H I N T E L L I J I D E AI n t e l l i J I D E A a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

4

home>\plugins\com.nomagic.magicdraw.integration\lib), overriding encountered files in archive.

8 Launch IntelliJ IDEA.

INTELLIJ IDEA AND MAGICDRAW INTEGRATION FUNCTIONALITY

Updating UML Model

There are several ways to add classes created in IntelliJ IDEA project into MagicDraw project:

• Select java source file (or several files ) in the IntelliJ IDEA project browser. Open shortcut menu and select Update UML Model:

© 2005 No Magic, Inc. 4-35

Page 35: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H I N T E L L I J I D E AI n t e l l i J I D E A a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

4

• Open the java source in the IntelliJ IDEA editor window. Open shortcut menu and select Update UML Model:

• From the MagicDraw menu, select Update UML Model. Will be added selected source files in browser or opened file in IntelliJ IDEA editor, regarding there focus is located:

Selecting a Class in the MagicDraw Browser

• Select java source file in the IntelliJ IDEA project browser. Open shortcut menu and select Select in MagicDraw.

• Open the java source in the IntelliJ IDEA editor window. Open shortcut menu and select Select in MagicDraw.

• From the MagicDraw menu, select Select in MagicDraw. Will be selected class file from browser or file opened in IntelliJ IDEA editor, regarding there focus is located.

Adding a Class to the IntelliJ IDEA Project

There are four ways to add a class to an IntelliJ IDEA project from a MagicDraw project:

4-36 © 2005 No Magic, Inc.

Page 36: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H I N T E L L I J I D E AI n t e l l i J I D E A a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

4

• From the class in the MagicDraw browser shortcut menu, select Add to IntelliJ IDEA. The class source will be generated into the java source file, which will then be added to the IntelliJ IDEA project.

• From the package in the MagicDraw browser shortcut menu, select Add to IntelliJ IDEA. All classes from this package will be added to the IntelliJ IDEA project.

• From the selected class or package in any MagicDraw diagram shortcut menu, select Add to IntelliJ IDEA.

• Select a class (or package) in any MagicDraw diagram. Open the Tools menu and select Add to IntelliJ IDEA.

Any changes made or added into the integrated class are automatically reflected in the java source file. You do not need to update the source file manually.

Before adding model class to the IntelliJ IDEA, Select Source Directory dialog appears:

Dialog contains listed available source directories in IntelliJ IDEA project. Classes from model will be placed in to the selected directory. If Show this dialog next time is deselected, all classes will be created in to previously selected directory. Show this dialog next time can be enabled in Integration Properties dialog with property Show Select Source Directory Dialog.

Going to Class Source

To open the class/operation/attribute source code in IntelliJ IDEA, from the Tools menu, select Go to Source in IntelliJ IDEA. This command is available just after the class has been added into the IntelliJ IDEA project.

© 2005 No Magic, Inc. 4-37

Page 37: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H I N T E L L I J I D E AI n t e l l i J I D E A a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

4

Integration Properties

Integration options dialog can be opened from MagicDraw Options menu, selecting Integration Properties

Command Option Function

Generate Imports

Full Class Name

The import statement with full class name is added during source generation from MagicDraw.

Package Name The import statement with package name and * is added during source generation from MagicDraw.

Do Not Generate

The import statement is not added during source generation from MagicDraw.

Update UML Model

Update Model by Code

Removes all methods/attributes/associations from the model if they do not exist in the code at the time Update UML Model is executed.

Merge Model by Code

Leaves all methods/attributes/associations in the model if they do not exist in the code at the time Update UML Model is executed.

Unnamed Element Name

Enter a name of the model element to generate in the source code in instances when a model element within your model does not yet have a name attached to it.

Unnamed Type Name

Enter a name of the type to generate in the source code in instances when attributes, operations, or parameters do not yet have a type in your model. If an attribute without a type exists in a model, then, after adding the class of this attribute into the IntelliJ IDEA project, an attribute with int type will be generated in the source code.

Show Select Source Directory Dialog

Enable to appear Select Source Directory dialog before adding new class into IntelliJ IDEA project.

4-38 © 2005 No Magic, Inc.

Page 38: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H I N T E L L I J I D E AI n t e l l i J I D E A a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

4

Synchronize Model Saving with IDE

Enables to save MagicDraw project, on every IntelliJ IDEA workspace saving (on focus lost, according to IntelliJ IDEA save options,… ). If option is deselected, MagicDraw project is saved on MagicDraw save action and on closing IntelliJ IDEA project.

Update Model on …

Saving Source File

Updates model on IntelliJ IDEA source file save

Manual Update Updates model on manual user action Update UML Model

© 2005 No Magic, Inc. 4-39

Page 39: MagicDraw Integrations UserGuide

IN T EGRAT ION W I TH BEA

WEB LOG IC WORKSHOP 5MagicDraw enables automatic synchronization of your model in MagicDraw with your code in BEA WebLogic Workshop.

MagicDraw UML is installed into BEA WebLogic Workshop environment as an additional module, but runs in separate window. The integration provides only one way functionality, it means UML data update according to source code.

The main idea of this integration is to get a top-level view of the application in BEA Welbogic Workshop. This top-level view is described as UML extension diagram (with UML profile for BEA Welbogic Workshop).

INSTALLATION

System Requirements

BEA WebLogic Workshop 8.1.2

Automatic MagicDraw installation into BEA Weblogic Workshop

The MagicDraw UML Integration Tool is used to add MagicDraw module into BEA WebLogic Workshop. You can find this tool in <MagicDraw installation directory>/integrations/workshop directory.

When launching the Integration Tool (install.exe for Windows or install for Unix based OS) the MagicDraw UML Integration Tool dialog box appears.

2

© 2005 No Magic, Inc. 5-41

Page 40: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H B E A WE B LO G I C WO R K S H O PI n s t a l l a t i o n

5

If you do not wish to change directories, click the Integrate button in the MagicDraw UML Integration Tool dialog box.

To change the BEA WebLogic Workshop or MagicDraw home directories

1 In the MagicDraw UML Integration Tool dialog box, click the corresponding Browse “…” button.

2 The Select Directory dialog box appears.

3 Select the install directories and click OK. Then, click Integrate in the MagicDraw UML Integration Tool dialog box.

4 The Message box appears. If the integration process was successful, then only the Exit button is active. Click Exit.

NOTE If automatic installation fails, please use Manual installation.

Manual MagicDraw Installation into BEA Weblogic Workshop

1 Copy file md_wlw.jar from integrations/workshop directory into <Workshop home>/extensions folder.

2 Create magicdraw directory in the <Workshop home>/thirdparty folder.

3 Create lib directory in the <Workshop home>/thirdparty/magicdraw folder.

4 Copy all jars from <MagicDraw home>/lib folder into <Workshop home>/thirdparty/magicdraw/lib folder.

5 Copy file md.properties from integrations/workshop directory into <Workshop home>/thirdparty/magicdraw folder.

6 Edit file md.properties and change install.root property to directory where MagicDraw UML was installed. Example:

install.root=C\:\\Program Files\\MagicDraw UMLorinstall.root=C:/Program Files/MagicDraw UML

7 Launch BEA WebLogic Workshop.

5-42 © 2005 No Magic, Inc.

Page 41: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H B E A WE B LO G I C WO R K S H O PB E A We b Lo g i c Wo r k s h o p a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

5

BEA WEBLOGIC WORKSHOP AND MAGICDRAW INTEGRATION FUNCTIONALITY

Updating UML Model

There are several ways to add classes created in BEA WebLogic Workshop project into MagicDraw project:

• Select java source file (or several files) in the BEA WebLogic Workshop project browser. Open shortcut menu and select Update UML Model:

© 2005 No Magic, Inc. 5-43

Page 42: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H B E A WE B LO G I C WO R K S H O PB E A We b Lo g i c Wo r k s h o p a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

5

• Open the java source in the BEA WebLogic Workshop editor window. Open shortcut menu and select Update UML Model:

• From the MagicDraw menu, select Update UML Model. Will be added selected source files in browser or opened file in BEA WebLogic Workshop editor, regarding where focus is located:

Selecting a Class in the MagicDraw Browser

• Select java source file in the BEA WebLogic Workshop project browser. Open shortcut menu and select Select in MagicDraw.

• Open the java source in the BEA WebLogic Workshop editor window. Open shortcut menu and select Select in MagicDraw.

5-44 © 2005 No Magic, Inc.

Page 43: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H B E A WE B LO G I C WO R K S H O PB E A We b Lo g i c Wo r k s h o p a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

5

• From the MagicDraw menu, select Select in MagicDraw. Will be selected class file from browser or file opened in BEA WebLogic Workshop editor, regarding where focus is located.

Going to Class Source

To open the class/operation/attribute source code in BEA WebLogic Workshop, from the Tools menu, select Go to Source in BEA WebLogic Workshop. This command is available just after the class has been added into the BEA WebLogic Workshop project.

Integration Properties

Integration options dialog can be opened from MagicDraw Options menu, selecting Integration Properties

Command Option Function

Generate Imports(is not implemented yet)

Full Class Name

The import statement with full class name is added during source generation from MagicDraw.

Package Name The import statement with package name and * is added during source generation from MagicDraw.

Do Not Generate

The import statement is not added during source generation from MagicDraw.

Update UML Model

Update Model by Code

Removes all methods/attributes/associations from the model if they do not exist in the code at the time Update UML Model is executed.

Merge Model by Code

Leaves all methods/attributes/associations in the model if they do not exist in the code at the time Update UML Model is executed.

© 2005 No Magic, Inc. 5-45

Page 44: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H B E A WE B LO G I C WO R K S H O PB E A We b Lo g i c Wo r k s h o p a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

5

Unnamed Element Name(is not implemented yet)

Enter a name of the model element to generate in the source code in instances when a model element within your model does not yet have a name attached to it.

Unnamed Type Name(is not implemented yet)

Enter a name of the type to generate in the source code in instances when attributes, operations, or parameters do not yet have a type in your model. If an attribute without a type exists in a model, then, after adding the class of this attribute into the BEA WebLogic Workshop project, an attribute with int type will be generated in the source code.

Synchronize Model Saving with IDE

Update Model Step Size

Enables to save MagicDraw project, on every IntelliJ IDEA workspace saving (on focus lost, according to IBEA WebLogic Workshop save options,… ). If option is deselected, MagicDraw project is saved on MagicDraw save action and on closing BEA WebLogic Workshop project.

After specified number of files is parsed, model is updated. Default number of files is 100.

Update Model on …

Saving Source File

Updates model on BEA WebLogic Workshop source file save

Manual Update Updates model on manual user action Update UML Model

5-46 © 2005 No Magic, Inc.

Page 45: MagicDraw Integrations UserGuide

IN T EGRAT ION W I TH

CAL I B ER RM 6This integration functionality allows you to create logical relations from requirements in CaliberRM to model elements in MD.

CaliberRM integration is implemented as a plug-in in MagicDraw UML.

System Requirements

CaliberRM 6.5

IMPORTANT Caliber integration works only with MagicDraw standalone. If MagicDraw is run from any IDE, integration won’t work.

Automatic CaliberRM installation into MagicDraw

CaliberRM integration is implemented as a plug-in in MagicDraw UML, so no additional actions for performing integration are required.

For making sure that CaliberRM integration is started, from the MagicDraw main menu, choose Options, then Environment Options. Select the Plugins section. Check the Calber Integration plugin - Loaded and Enabled values should be set to true.

CALIBERRM AND MAGICDRAW INTEGRATION FUNCTIONALITY

Login to CaliberRM server

There are several ways to login to CaliberRM server:

• Open element Specification dialog box. Go to Hyperlinks tab, click the Add button. The Select Hyperlinks dialog box appears. Select the Caliber Requirement tab and click the ‘...’ button. If no

© 2005 No Magic, Inc. 6-47

Page 46: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H C A L I B E R R MC a l i b e r R M a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

6

previous login was performed to server, the Login dialog box appears:

• From the Tools main menu, choose CaliberRM, and then Login.

NOTE: In the Server text box, type the name of your computer in net, and to login to the server as administrator, in the Login and Password text box, type admin.

Logout from CaliberRM server

From the Tools main menu, choose CaliberRM and then Logout.

Adding requirement to MagicDraw element

When login to CaliberRM server is performed, follow the steps to add requirement to element:

1 Open element Specification dialog box.

2 Go to Hyperlinks tab, click the Add button. The Select Hyperlinks dialog box appears.

6-48 © 2005 No Magic, Inc.

Page 47: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H C A L I B E R R MC a l i b e r R M a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

6

3 Select the Caliber Requirement tab and click the ‘...’ button. The Select Requirement dialog box appears.

4 Choose a project from the Project drop-down list and after selecting the requirement from the requirements tree, click OK.

5 Requirement is added to the element as hyperlink.

© 2005 No Magic, Inc. 6-49

Page 48: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H C A L I B E R R MC a l i b e r R M a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

6

Reviewing requirements added to elements

From the Tools main menu, choose CaliberRM and then CaliberRM Requirements or press CTRL+SHIFT+R. The CaliberRM Requirements window appears:

Information about element, requirement project and requirement name, and also description of requirement is displayed in this window.

Buttons available in the CaliberRM Requirement window:

Select in Containment Tree - selects element in MagicDraw Browser, Containment Tree.

Select In CaliberRM - launches CaliberRM client and selects requirement, added to element.

Refresh - updates the list of elements, if new requirement was added to element in the model.

Launching CaliberRM Client

To view requirements on the CaliberRM side, the CaliberRM Web View application should be launched:

1 From the Tools main menu, choose CaliberRM and then Launch CaliberRM Client. The Question window appears:

6-50 © 2005 No Magic, Inc.

Page 49: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H C A L I B E R R MC a l i b e r R M a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

6

2 Click Yes. The Integration with CaliberRM Web Viewer dialog box appears:

3 Select the viewer home directory and click OK. The Logon dialog box appears. Type Host, User name and Password for login to Caliber Viewer. Click Logon.

© 2005 No Magic, Inc. 6-51

Page 50: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H C A L I B E R R MC a l i b e r R M a n d M a g i c D r a w I n t e g r a t i o n Fu n c t i o n a l i t y

6

4 CaliberRM client application workspace with projects and requirements will be opened:

6-52 © 2005 No Magic, Inc.

Page 51: MagicDraw Integrations UserGuide

IN T EGRAT ION W I TH CVS 7MagicDrawTM integration with CVS is used only for the storage of MagicDraw files in the CVS repository. Since MagicDrawTM has a built-in CVS client, no other application is needed to integrate MagicDraw with CVS.

GETTING STARTED

1 Define CVS properties in the CVS pane of the Environment Options dialog box.

2 Make sure that the module you are working with is checked out through MagicDraw or using some other program. For detailed instructions on how to check out a module in MagicDraw, see Section “Checkout module” on page 7-54.

NOTES: You can add, update, or commit projects to CVS only if they are saved in a checked out directory or subdirectory.

The Command line runs in a local folder, which is specified in the Environment Options dialog box. In order for the Command Line to find CVSROOT, the Local Folder must be checked out and must have a CVS subdirectory.

CVS PROPERTIES

Define CVS Properties in the CVS pane of the Environment Options dialog box:

1 From the Options menu, choose Environment. The Environment Options dialog box appears.

© 2005 No Magic, Inc. 7-53

Page 52: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H C V SC h e c k o u t m o d u l e

7

2 Open the CVS pane.

Figure 21 -- Environment Options dialog box. CVS pane

CHECKOUT MODULE

Use this option to checkout a new module on your disk.

Command Function

Add Project to CVS After Saving

In every instance where you save, a newly created project is added to CVS in the checked out directory to CVS. The Add Project to CVS dialog box appears.

Commit Project to CVS After Saving

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

Update Project from CVS Before Loading

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

Location of .cvspass

The path where the .cvspass is located. You may enter it here, or choose the path from the Open dialog box.

Local Folder The path where the module will be saved during the checkout action. You may enter it here, or choose the path from the Open dialog box.

7-54 © 2005 No Magic, Inc.

Page 53: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H C V SA d d a P r o j e c t t o C V S

7

From the Tools menu, select CVS. Then select Checkout Module. The Checkout Module dialog box appears.

Figure 22 -- Checkout Module dialog box

ADD A PROJECT TO CVS1 Create a new MagicDraw project.

2 Save it into the currently checked out directory.

3 From the Tools menu, select CVS and then select Add. The Add Project to CVS dialog box appears.

NOTE:

Command Function

CVS Root Shows CVSROOT variable and provides all previously typed CVS Root variables. You must enter the complete path of the module on the server: It should be something like: :pserver:[email protected]:/projects/CVS

Module name Enter the module name and path on the server.

Local Folder The path indicating where the CVS files will be saved locally in the disk. Enter the path, or select any directory by clicking the “…” button.

Prune Empty directories [-P]

Automatically removes empty folders when you update a module. NOTE: The sign for the options is listed in the brackets at the end of the check box name.

Reset sticky tags [-A] Checks out only the last project version.

Non-recursive [-I] Does not check out subdirectories.

© 2005 No Magic, Inc. 7-55

Page 54: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H C V SC o m m i t p r o j e c t t o C V S

7

If the Add Project to CVS After Saving command in the Environment Options dialog box, CVS pane is selected. The Add Project to CVS dialog box appears every time when new to CVS projects are saved.

Figure 23 -- Add to CVS Options dialog box

1 Enter a check in the Add as binary data [-kb] check box if the project is saved as XML.ZIP format.

2 Type the Log message if needed.

3 Click OK.

COMMIT PROJECT TO CVSCommit your project to CVS after making changes to the project.

NOTE: If Commit Project to CVS After Saving is selected (in the CVS pane located in the Environment Options dialog box), the project is committed to the CVS server every time it is saved.

1 Open your MagicDraw project.

7-56 © 2005 No Magic, Inc.

Page 55: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H C V SU p d a t e p r o j e c t

7

2 From the Tools menu, select CVS. Then select Commit Project to CVS. The Commit Project to CVS dialog box appears.

Figure 24 -- Commit Project to CVS dialog box

3 Type the log message if needed.

4 Click OK.

UPDATE PROJECT

Update your project when you receive a message indicating a new project version exists on the server.

From the Tools menu, choose CVS. Then choose Update CVS Project. The Update CVS Project dialog box appears.

Figure 25 -- Update CVS Project dialog box

Option Function

Reset sticky tags [-A]

Update to the last version of the project located on the server.

Retrieve rev./tag/branch

Type the tag or version number you want to change to.

© 2005 No Magic, Inc. 7-57

Page 56: MagicDraw Integrations UserGuide

I N T E G R A T I O N W I T H C V SU p d a t e p r o j e c t

7

You may click the “…” button and choose the desired project version from the Revisions dialog box.

Figure 26 -- Revisions dialog box

7-58 © 2005 No Magic, Inc.