You are on page 1of 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
CONTENTS 0
1 Integration with Eclipse/WSAD 1-5
Installation 1-5
System requirements 1-5
Automatic MagicDraw installation into Eclipse 1-5
Manual MagicDraw Installation into Eclipse 1-6
MagicDraw and Eclipse integration functionality 1-7
Integration properties 1-7
Opening MagicDraw project from Eclipse 1-9
Updating the UML model 1-9
Selecting a class in the MagicDraw browser 1-12
Adding a class to the Eclipse project 1-12
Synchronization between MagicDraw and Eclipse 1-12
Going to class source 1-13
Eclipse integration and Teamwork 1-13
Libraries visualization 1-13
Known Eclipse problems 1-13

2 Integration with Borland’s JBuilderTM 2-15


Integration Process 2-15
Automatic MagicDraw integration with JBuilder 2-15
Manual MagicDraw Integration with JBuilder 2-16
JBuilder and MagicDraw Integration Functionality 2-17
Switching between JBuilder and MagicDraw user interfaces 2-17
MagicDraw Project Representation in JBuilder 2-17
Updating the MagicDraw UML model from the JBuilder Interface 2-19
Adding 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-23


MagicDraw Integration Process 3-23
Working with MagicDraw in sun Java Studio 3-25
Creating new class diagram using Java source code files 3-26
Updating UML Data using Java source 3-27
Selecting created class in UML Modeling browser 3-28
Saving UML Data 3-28
Adding a class to the Sun Java Studio project 3-28
Going to class source 3-29
MagicDraw Integrations User’s Guide
Contents

Menu system for UML modeling in NetBeans (Sun Java Studio) 3-29
UML Modeling Toolbar Configuration 3-30
MagicDraw Toolbar 3-30
Known Sun Java Studio/Netbeans problems 3-31
Integration Tool Error Messages 3-31
Wrong Forte4J Home Directory 3-31
Wrong MagicDraw UML Home Directory 3-31
Unknown OS 3-32
MagicDraw UML module not found 3-32
Cannot set CLASSPATH 3-32

4 Integration with IntelliJ IDEA 4-33


Installation 4-33
System Requirements 4-33
Automatic MagicDraw installation into IntelliJ IDEA 4-33
Manual MagicDraw Installation into IntelliJ IDEA 4-34
IntelliJ IDEA and MagicDraw Integration Functionality 4-35
Updating UML Model 4-35
Selecting a Class in the MagicDraw Browser 4-36
Adding a Class to the IntelliJ IDEA Project 4-36
Going to Class Source 4-37
Integration Properties 4-38

5 Integration with BEA WebLogic Workshop 5-41


Installation 5-41
System Requirements 5-41
Automatic MagicDraw installation into BEA Weblogic Workshop 5-41
Manual MagicDraw Installation into BEA Weblogic Workshop 5-42
BEA WebLogic Workshop and MagicDraw Integration Functionality 5-43
Updating UML Model 5-43
Selecting a Class in the MagicDraw Browser 5-44
Going to Class Source 5-45
Integration Properties 5-45

6 Integration with Caliber RM 6-47


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

© 2004 No Magic, Inc. 2


MagicDraw Integrations User’s Guide
Contents

7 Integration with CVS 7-53


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

© 2004 No Magic, Inc. 3


1
INTEGRATION WITH
ECLIPSE/WSAD

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

I NSTALLATION

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


1 INTEGRATION WITH ECLIPSE/WSAD
Installation

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 UML
or
install.root=C:/Program Files/MagicDraw UML

1-6 © 2005 No Magic, Inc.


INTEGRATION WITH ECLIPSE/WSAD 1
MagicDraw and Eclipse integration functionality

6 Copy all jars from <MagicDraw home>\lib folder into <eclipse


home>\plugins\com.nomagic.magicdraw.integrations.eclipse.
7 Launch Eclipse.

M AGIC D RAW AND E CLIPSE 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


1 INTEGRATION WITH ECLIPSE/WSAD
MagicDraw and Eclipse integration functionality

Figure 2 -- Integration Properties dialog box

Command Option Function


Generate Full Class Name The import statement with full class name is
imports 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 Enter a name of the model element to generate in the source code in
Element Name instances when a model element within your model does not yet have
a name attached to it.
Unnamed Type Enter a name of the type to generate in the source code in instances
Name 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 Update Model by Removes all methods/attributes/associations
Model Code 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 Creates attributes in MagicDraw for new
attributes create attributes created in Eclipse.
Association Creates associations in MagicDraw for new
attributes created in Eclipse.
Synchronization Manual Synchronization between model and code is
Mode 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 Every time code is changed, model is
automatic 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 If selected, library classes in model will be created with attributes and
members for methods.
libraries
Default source Choose available source paths for all linked projects. You may define
path source paths in Eclipse.

1-8 © 2005 No Magic, Inc.


INTEGRATION WITH ECLIPSE/WSAD 1
MagicDraw and Eclipse integration functionality

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


1 INTEGRATION WITH ECLIPSE/WSAD
MagicDraw and Eclipse integration functionality

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


INTEGRATION WITH ECLIPSE/WSAD 1
MagicDraw and Eclipse integration functionality

• 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:
Update Model by Removes all methods/attributes/associations from the model if they do
Code 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.

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.

© 2005 No Magic, Inc. 1 -11


1 INTEGRATION WITH ECLIPSE/WSAD
MagicDraw and Eclipse integration functionality

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:
Synchronization Description
mode
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 Every time code is changed, model is updated. Changes are not
automatic 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.

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

1-12 © 2005 No Magic, Inc.


INTEGRATION WITH ECLIPSE/WSAD 1
Known Eclipse problems

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

K NOWN E CLIPSE 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


1 INTEGRATION WITH ECLIPSE/WSAD
Known Eclipse problems

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

1-14 © 2005 No Magic, Inc.


2
INTEGRATION WITH
B O R L A N D ’ S J B U I L D E R TM

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

I NTEGRATION P ROCESS

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


2 INTEGRATION WITH BORLAND’S JBUILDERTM
Integration Process

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 UML
or
install.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.


INTEGRATION WITH BORLAND’S JBUILDERTM 2
J B u il d er and Ma g ic D r a w I n t e gr ati on Fun c t io n a li t y

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.

JB UILDER AND M AGIC D RAW I NTEGRATION


F UNCTIONALITY

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


2 INTEGRATION WITH BORLAND’S JBUILDERTM
J B u i ld er and Ma g ic D r aw I n t e gr ati on Fun c t i ona li t y

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 Full Class Name The import statement with full class
imports 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 Update Model by Code Removes all
Model 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 Enter a name of the model element to generate in the
Element Name source code if that model element does not have a name in
the model.

2-18 © 2005 No Magic, Inc.


INTEGRATION WITH BORLAND’S JBUILDERTM 2
J B u il d er and Ma g ic D r a w I n t e gr ati on Fun c t io n a li t y

Command Option Function


Unnamed Type Enter a name of the type to generate in the source code if
Name 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.

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

© 2005 No Magic, Inc. 2 -19


2 INTEGRATION WITH BORLAND’S JBUILDERTM
J B u i ld er and Ma g ic D r aw I n t e gr ati on Fun c t i ona li t y

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


INTEGRATION WITH BORLAND’S JBUILDERTM 2
Known JBuilder problems

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

K NOWN JB UILDER 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


INTEGRATION WITH SUN

3
JAVA STUDIO AND
NETBEANS

MagicDraw 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

M AGIC D RAW I NTEGRATION P ROCESS


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


3 INTEGRATION WITH SUN JAVA STUDIO AND NETBEANS
M a g i c D r a w I n t e g r a ti o n Pr o c e s s

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.


INTEGRATION WITH SUN JAVA STUDIO AND NETBEANS 3
Wo 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

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

W ORKING WITH M AGIC D RAW IN SUN J AVA S TUDIO


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


3 INTEGRATION WITH SUN JAVA STUDIO AND NETBEANS
Wo 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

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.


INTEGRATION WITH SUN JAVA STUDIO AND NETBEANS 3
Wo 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

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


3 INTEGRATION WITH SUN JAVA STUDIO AND NETBEANS
Wo 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

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

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.

3-28 © 2005 No Magic, Inc.


INTEGRATION WITH SUN JAVA STUDIO AND NETBEANS 3
Menu system for UML modeling in NetBeans (Sun Java Studio)

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

M ENU SYSTEM FOR UML MODELING IN N ET B EANS


(S UN J AVA S TUDIO )
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


3 INTEGRATION WITH SUN JAVA STUDIO AND NETBEANS
U 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

UML M ODELING T OOLBAR C ONFIGURATION


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 Create new Implementation diagram
Diagrams
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.


INTEGRATION WITH SUN JAVA STUDIO AND NETBEANS 3
Known Sun Java Studio/Netbeans problems

Zoom Out Zoom out active diagram.


Print Active Diagram Prints active diagram.

K NOWN S UN J AVA S TUDIO /N ETBEANS PROBLEMS


• strictfp modifier is not updated from source.
• Changing method from native to simple does not restore method
body correctly.

I NTEGRATION T OOL E RROR M ESSAGES


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.

© 2005 No Magic, Inc. 3 -31


3 INTEGRATION WITH SUN JAVA STUDIO AND NETBEANS
I 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

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: support@magicdraw.com

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.


4
INTEGRATION WITH INTELLIJ
IDEA

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

I NSTALLATION

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.

© 2005 No Magic, Inc. 4-33


4 INTEGRATION WITH INTELLIJ IDEA
Installation

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 UML
or
install.root=C:/Program Files/MagicDraw UML
6 Copy all jars from <MagicDraw home>\lib folder into < IntelliJ
settings>\config\plugins\com.nomagic.magicdraw.integration\li
b 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.


INTEGRATION WITH INTELLIJ IDEA 4
IntelliJ IDEA and MagicDraw Integration Functionality

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

I NTELLI J IDEA AND M AGIC D RAW I NTEGRATION


F UNCTIONALITY

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


4 INTEGRATION WITH INTELLIJ IDEA
Inte ll iJ IDEA a nd M a gi cDra w Integ ra tio n Functi o nal ity

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


INTEGRATION WITH INTELLIJ IDEA 4
IntelliJ IDEA and MagicDraw Integration Functionality

• 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


4 INTEGRATION WITH INTELLIJ IDEA
Inte ll iJ IDEA a nd M a gi cDra w Integ ra tio n Functi o nal ity

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

Command Option Function


Generate Full Class The import statement with full class name is added
Imports Name during source generation from MagicDraw.
Package Name The import statement with package name and * is
added during source generation from MagicDraw.
Do Not The import statement is not added during source
Generate generation from MagicDraw.
Update Update Model Removes all methods/attributes/associations from the
UML Model by Code model if they do not exist in the code at the time Update
UML Model is executed.
Merge Model Leaves all methods/attributes/associations in the model
by Code if they do not exist in the code at the time Update UML
Model is executed.
Unnamed Enter a name of the model element to generate in the source code in
Element instances when a model element within your model does not yet have a
Name name attached to it.
Unnamed Enter a name of the type to generate in the source code in instances
Type Name 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 Enable to appear Select Source Directory dialog before adding new class
Source into IntelliJ IDEA project.
Directory
Dialog

4-38 © 2005 No Magic, Inc.


INTEGRATION WITH INTELLIJ IDEA 4
IntelliJ IDEA and MagicDraw Integration Functionality

Synchronize Enables to save MagicDraw project, on every IntelliJ IDEA workspace


Model saving (on focus lost, according to IntelliJ IDEA save options,… ). If
Saving with option is deselected, MagicDraw project is saved on MagicDraw save
IDE action and on closing IntelliJ IDEA project.
Update Saving Source Updates model on IntelliJ IDEA source file save
Model on File

Manual Update Updates model on manual user action Update UML
Model

© 2005 No Magic, Inc. 4 -39


5
INTEGRATION WITH BEA
WEBLOGIC WORKSHOP

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

I NSTALLATION

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.

© 2005 No Magic, Inc. 5-41


5 I N T E G R A T I O N W I T H B E A WE B L O G I C WO R K S H O P
Installation

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 UML


or
install.root=C:/Program Files/MagicDraw UML

7 Launch BEA WebLogic Workshop.

5-42 © 2005 No Magic, Inc.


I N T E G R A T I O N W I T H B E A WE B L O G I C WO R K S H O P 5
B E A We b L o 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 F u n c t i o n a l i t y

BEA W EB L OGIC W ORKSHOP AND M AGIC D RAW


I NTEGRATION F UNCTIONALITY

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


5 I N T E G R A T I O N W I T H B E A WE B L O G I C WO R K S H O P
B E A We b L o 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 F u n c t i o n a l i t y

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


I N T E G R A T I O N W I T H B E A WE B L O G I C WO R K S H O P 5
B E A We b L o 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 F u n c t i o n a l i t y

• 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 Full Class The import statement with full class name is added
Imports Name during source generation from MagicDraw.
(is not Package Name The import statement with package name and * is
implemented added during source generation from MagicDraw.
yet)
Do Not The import statement is not added during source
Generate generation from MagicDraw.
Update UML Update Model Removes all methods/attributes/associations from the
Model by Code model if they do not exist in the code at the time Update
UML Model is executed.
Merge Model Leaves all methods/attributes/associations in the model
by Code if they do not exist in the code at the time Update UML
Model is executed.

© 2005 No Magic, Inc. 5 -45


5 I N T E G R A T I O N W I T H B E A WE B L O G I C WO R K S H O P
B E A We b L o 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 F u n c t i o n a l i t y

Unnamed Enter a name of the model element to generate in the source code in
Element instances when a model element within your model does not yet have a
Name name attached to it.
(is not
implemented
yet)
Unnamed Enter a name of the type to generate in the source code in instances
Type Name when attributes, operations, or parameters do not yet have a type in your
(is not model. If an attribute without a type exists in a model, then, after adding
implemented the class of this attribute into the BEA WebLogic Workshop project, an
yet) attribute with int type will be generated in the source code.
Synchronize Enables to save MagicDraw project, on every IntelliJ IDEA workspace
Model Saving saving (on focus lost, according to IBEA WebLogic Workshop save
with IDE options,… ). If option is deselected, MagicDraw project is saved on
MagicDraw save action and on closing BEA WebLogic Workshop
project.
Update
Model Step After specified number of files is parsed, model is updated. Default
Size number of files is 100.
Update Saving Source Updates model on BEA WebLogic Workshop source
Model on … File file save
Manual Update Updates model on manual user action Update UML
Model

5-46 © 2005 No Magic, Inc.


6
INTEGRATION WITH
CALIBER RM

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

C ALIBER RM AND M AGIC D RAW I NTEGRATION


F UNCTIONALITY

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


6 INTEGRATION WITH CALIBER RM
C 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

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.


INTEGRATION WITH CALIBER RM 6
C al ib er R M and Ma g ic D r a w I n t e gr ati on Fun c t io n a li t y

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


6 INTEGRATION WITH CALIBER RM
C 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

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.


INTEGRATION WITH CALIBER RM 6
C al ib er R M and Ma g ic D r a w I n t e gr ati on Fun c t io n a li t y

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


6 INTEGRATION WITH CALIBER RM
C 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

4 CaliberRM client application workspace with projects and


requirements will be opened:

6-52 © 2005 No Magic, Inc.


INTEGRATION WITH CVS 7
MagicDrawTM 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.

G ETTING S TARTED
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


7 INTEGRATION WITH CVS
Checkout module

2 Open the CVS pane.

Figure 21 -- Environment Options dialog box. CVS pane

Command Function
Add Project to In every instance where you save, a newly created project is
CVS After Saving added to CVS in the checked out directory to CVS. The Add
Project to CVS dialog box appears.
Commit Project Commits the project to CVS after saving it. The Commit Project
to CVS After to CVS dialog box appears.
Saving
Update Project Updates the project that is added to CVS while loading. The
from CVS Before Update Project dialog box appears.
Loading
Location of The path where the .cvspass is located. You may enter it here, or
.cvspass 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.

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

7-54 © 2005 No Magic, Inc.


INTEGRATION WITH CVS 7
Add a Project to CVS

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

Figure 22 -- Checkout Module dialog box

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:martina@cvs.nomagic.com:/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 Automatically removes empty folders when you update a
directories [-P] 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.

A DD A P ROJECT TO CVS
1 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:

© 2005 No Magic, Inc. 7 -55


7 INTEGRATION WITH CVS
Commit project to CVS

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.

C OMMIT PROJECT TO CVS


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


INTEGRATION WITH CVS 7
Update project

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.

U PDATE 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 Update to the last version of the project located on the server.
[-A]
Retrieve Type the tag or version number you want to change to.
rev./tag/branch

© 2005 No Magic, Inc. 7 -57


7 INTEGRATION WITH CVS
Update project

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.

You might also like