VP-UML IDE Integration User’s Guide
0 - 1
VP-UML IDE Integration User’s Guide (Part 1)
0 - 2
VP-UML IDE Integration User’s Guide
Visual Paradigm for the Unified Modeling Language:
VP-UML 5.2 IDE Integration User’s Guide
The software and documentation are furnished under the Visual Paradigm for UML license agreement and may be used only in
accordance with the terms of the agreement.
Copyright Information
Copyright © 1999-2006 by Visual Paradigm. All rights reserved.
The material made available by Visual Paradigm in this document is protected under the laws and various international laws
and treaties. No portion of this document or the material contained on it may be reproduced in any form or by any means
without prior written permission from Visual Paradigm.
Every effort has been made to ensure the accuracy of this document. However, Visual Paradigm makes no warranties with
respect to this documentation and disclaims any implied warranties of merchantability and fitness for a particular purpose.
The information in this document is subject to change without notice.
All examples with names, company names, or companies that appear in this document are imaginary and do not refer to, or
portray, in name or substance, any actual names, companies, entities, or institutions. Any resemblance to any real person,
company, entity, or institution is purely coincidental.
Trademark Information
Visual Paradigm for UML is registered trademark of Visual Paradigm.
Sun, Sun ONE, Java, Java2, J2EE and EJB, NetBeans are all registered trademarks of Sun Microsystems, Inc.
Eclipse is registered trademark of Eclipse
IBM, WebSphere are registered trademark of International Business Machines Corporation.
JBuilder is registered trademark of Borland Corporation.
IntelliJ and IntelliJ IDEA are registered trademarks of JetBrains.
Microsoft, Windows, Windows NT, Visio, and the Windows logo are trademarks or registered trademarks of Microsoft
Corporation. Oracle is a registered trademark, and JDeveloper is a trademark or registered trademark of Oracle Corporation.
BEA is registered trademarks of BEA Systems, Inc. BEA WebLogic Workshop is trademark of BEA Systems, Inc.
WinZip is a registered trademark of WinZip Computing, Inc.
Other trademarks or service marks referenced herein are property of their respective owners.
Visual Paradigm for UML License Agreement
THE USE OF THE SOFTWARE LICENSED TO YOU IS SUBJECT TO THE TERMS AND CONDITIONS OF THIS
SOFTWARE LICENSE AGREEMENT. BY INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE, YOU
ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUNDED
BY ALL OF THE TERMS AND CONDITIONS OF THIS SOFTWARE LICENSE AGREEMENT.
1. Limited License Grant. Visual Paradigm grants to you ("the Licensee") a personal, non-exclusive, non-transferable, limited,
perpetual, revocable license to install and use Visual Paradigm Products ("the Software" or "the Product"). The Licensee must
not re-distribute the Software in whole or in part, either separately or included with a product.
2. Restrictions. The Software is confidential copyrighted information of Visual Paradigm, and Visual Paradigm and/or its
licensors retain title to all copies. The Licensee shall not modify, adapt, decompile, disassemble, decrypt, extract, or otherwise
reverse engineer the Software. Software may not be leased, rented, transferred, distributed, assigned, or sublicensed, in whole
or in part. The Software contains valuable trade secrets. The Licensee promises not to extract any information or concepts from
it as part of an effort to compete with the licensor, nor to assist anyone else in such an effort. The Licensee agrees not to
remove, modify, delete or destroy any proprietary right notices of Visual Paradigm and its licensors, including copyright
notices, in the Software.
3. Disclaimer of Warranty. The software and documentation are provided "AS IS," WITH NO WARRANTIES
WHATSOEVER. ALL EXPRESS OR IMPLIED REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED
WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT,
ARE HEREBY EXCLUDED. THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY
AND EFFORT IS WITH THE LICENSEE. THERE IS NO WARRANTY THE DOCUMENTATION, Visual Paradigm's
EFFORTS OR THE LICENSED SOFTWARE WILL FULFILL ANY OF LICENSEE'S PARTICULAR PURPOSES OR
NEEDS. IF THESE WARRANTIES ARE UNENFORCEABLE UNDER APPLICABLE LAW, THEN Visual Paradigm
DISCLAIMS SUCH WARRANTIES TO THE MAXIMUM EXTENT PERMITTED BY SUCH APPLICABLE LAW.
4. Limitation of Liability. Visual Paradigm AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES
SUFFERED BY THE LICENSEE OR ANY THIRD PARTY AS A RESULT OF USING OR DISTRIBUTING SOFTWARE.
IN NO EVENT WILL Visual Paradigm OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
OR FOR DIRECT, INDIRECT, EXEMPLARY, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES,
HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR
INABILITY TO USE THE SOFTWARE, EVEN IF Visual Paradigm HAS BEEN ADVISED OF THE POSSIBILITY OF
0 - 3
VP-UML IDE Integration User’s Guide (Part 1)
SUCH DAMAGES.
5. Termination. The Licensee may terminate this License at any time by destroying all copies of Software. Visual Paradigm
will not be obligated to refund any License Fees, if any, paid by the Licensee for such termination. This License will terminate
immediately without notice from Visual Paradigm if the Licensee fails to comply with any provision of this License. Upon
such termination, the Licensee must destroy all copies of the Software. Visual Paradigm reserves all rights to terminate this
License.
SPECIFIC DISCLAIMER FOR HIGH-RISK ACTIVITIES. The SOFTWARE is not designed or intended for use in
high-risk activities including, without restricting the generality of the foregoing, on-line control of aircraft, air traffic, aircraft
navigation or aircraft communications; or in the design, construction, operation or maintenance of any nuclear facility. Visual
Paradigm disclaims any express or implied warranty of fitness for such purposes or any other purposes.
NOTICE. The Product is not intended for personal, family or household use; rather, it is intended exclusively for professional
use. Its utilization requires skills that differ from those needed to use consumer software products such as word processing or
spreadsheet software.
GOVERNMENT RIGHTS. If the Software is licensed by or on behalf of a unit or agency of any government, the Licensee
agrees that the Software is "commercial computer software", "commercial computer software documentation" or similar terms
and that, in the absence of a written agreement to the contrary, the Licensee's rights with respect to the Software are limited by
the terms of this Agreement.
Acknowledgements
This Product includes software developed by the Apache Software Foundation (http://www.apache.org). Copyright ©1999 The
Apache Software Foundation. All rights reserved.
0 - 4
VP-UML IDE Integration User’s Guide (Part 1)
Table of Contents
Chapter 1 – Integration with Eclipse/WSAD .................................................................................................................................................. 2
Overview ..................................................................................................................................................................................................... 2
Installation ................................................................................................................................................................................................... 3
Creating a VP-UML Project in Eclipse ....................................................................................................................................................... 4
Opening a VP-UML Project from Eclipse................................................................................................................................................... 6
Reverse Engineering from Code to Model .................................................................................................................................................. 7
Project Based Reverse Engineering ................................................................................................................................................. 7
Package Based Reverse Engineering ............................................................................................................................................... 7
Class Based Reverse Engineering.................................................................................................................................................... 8
Selecting Corresponding Elements in VP-UML from Eclipse .................................................................................................................... 9
Code Generation from Model to Code....................................................................................................................................................... 10
Project Based Code Generation ..................................................................................................................................................... 11
Package Based Code Generation ................................................................................................................................................... 11
Class Based Code Generation........................................................................................................................................................ 11
Selecting Corresponding Elements in Eclipse from VP-UML .................................................................................................................. 12
Importing a VP-UML Project into Eclipse ................................................................................................................................................ 13
Exporting a VP-UML Project from Eclipse............................................................................................................................................... 14
Model Representation of Code .................................................................................................................................................................. 15
Chapter 2 – Integration with NetBeans/Sun™ ONE ...................................................................................................................................... 2
Overview ..................................................................................................................................................................................................... 2
Installation ................................................................................................................................................................................................... 3
Creating a VP-UML Project in NetBeans.................................................................................................................................................... 4
Opening a VP-UML Project from NetBeans ............................................................................................................................................... 6
Reverse Engineering from Code to Model .................................................................................................................................................. 6
Project Based Reverse Engineering ................................................................................................................................................. 7
Package Based Reverse Engineering ............................................................................................................................................... 7
Class Based Reverse Engineering.................................................................................................................................................... 8
Selecting Corresponding Elements in VP-UML from NetBeans................................................................................................................. 9
Code Generation from Model to Code....................................................................................................................................................... 11
Project Based Code Generation ..................................................................................................................................................... 11
Package Based Code Generation ................................................................................................................................................... 11
Class Based Code Generation........................................................................................................................................................ 12
Selecting Corresponding Elements in NetBeans from VP-UML............................................................................................................... 12
Importing a VP-UML Project into NetBeans ............................................................................................................................................ 13
Exporting a VP-UML Project from NetBeans ........................................................................................................................................... 15
Model Representation of Code .................................................................................................................................................................. 16
Chapter 3 – Integration with JBuilder............................................................................................................................................................. 2
Overview ..................................................................................................................................................................................................... 2
Installation ................................................................................................................................................................................................... 3
Creating a VP-UML Project in JBuilder...................................................................................................................................................... 4
Opening a VP-UML Project from JBuilder ................................................................................................................................................. 6
Reverse Engineering from Code to Model .................................................................................................................................................. 6
Project Based Reverse Engineering ................................................................................................................................................. 6
Package Based Reverse Engineering ............................................................................................................................................... 7
Class Based Reverse Engineering.................................................................................................................................................... 7
Selecting Corresponding Elements in VP-UML from JBuilder................................................................................................................... 8
Code Generation from Model to Code......................................................................................................................................................... 9
Project Based Code Generation ....................................................................................................................................................... 9
Package Based Code Generation ................................................................................................................................................... 10
Class Based Code Generation........................................................................................................................................................ 10
Selecting Corresponding Elements in JBuilder from VP-UML................................................................................................................. 11
0 - 5
VP-UML IDE Integration User’s Guide (Part 1)
Importing a VP-UML Project into JBuilder...............................................................................................................................................12
Exporting a VP-UML Project from JBuilder .............................................................................................................................................14
Model Representation of Code...................................................................................................................................................................15
Chapter 4 – Integration with IntelliJ IDEA™.................................................................................................................................................2
Overview......................................................................................................................................................................................................2
Installation ...................................................................................................................................................................................................3
Creating a VP-UML Project in IntelliJ IDEA ..............................................................................................................................................4
Opening a VP-UML Project from IntelliJ IDEA..........................................................................................................................................6
Reverse Engineering from Code to Model...................................................................................................................................................7
Project Based Reverse Engineering..................................................................................................................................................7
Package Based Reverse Engineering................................................................................................................................................7
Class Based Reverse Engineering ....................................................................................................................................................8
Selecting Corresponding Elements in VP-UML from IntelliJ IDEA ...........................................................................................................8
Code Generation from Model to Code .........................................................................................................................................................9
Project Based Code Generation......................................................................................................................................................10
Package Based Code Generation....................................................................................................................................................10
Class Based Code Generation ........................................................................................................................................................10
Selecting Corresponding Elements in IntelliJ IDEA from VP-UML .........................................................................................................11
Importing a VP-UML Project into IntelliJ IDEA.......................................................................................................................................12
Exporting a VP-UML Project from IntelliJ IDEA .....................................................................................................................................13
Model Representation of Code...................................................................................................................................................................14
Chapter 5 – Integration with JDeveloper.........................................................................................................................................................2
Overview......................................................................................................................................................................................................2
Installation ...................................................................................................................................................................................................3
Creating a VP-UML Project in JDeveloper..................................................................................................................................................4
Opening a VP-UML Project from JDeveloper .............................................................................................................................................6
Reverse Engineering from Code to Model...................................................................................................................................................6
Project Based Reverse Engineering..................................................................................................................................................7
Package Based Reverse Engineering................................................................................................................................................7
Class Based Reverse Engineering ....................................................................................................................................................8
Selecting Corresponding Elements in VP-UML from JDeveloper...............................................................................................................8
Code Generation from Model to Code .........................................................................................................................................................9
Project Based Code Generation......................................................................................................................................................10
Package Based Code Generation....................................................................................................................................................10
Class Based Code Generation ........................................................................................................................................................10
Selecting Corresponding Elements in JDeveloper from VP-UML.............................................................................................................11
Importing a VP-UML Project into JDeveloper ..........................................................................................................................................12
Exporting a VP-UML Project from JDeveloper.........................................................................................................................................13
Model Representation of Code...................................................................................................................................................................14
Chapter 6 – Integration with WebLogic Workshop™....................................................................................................................................2
Overview......................................................................................................................................................................................................2
Installation ...................................................................................................................................................................................................3
Creating a VP-UML Project in WebLogic Workshop™..............................................................................................................................4
Opening a VP-UML Project from WebLogic Workshop™ .........................................................................................................................6
Reverse Engineering from Code to Model...................................................................................................................................................7
Project Based Reverse Engineering..................................................................................................................................................7
Package Based Reverse Engineering................................................................................................................................................7
Class Based Reverse Engineering ....................................................................................................................................................8
Selecting Corresponding Elements in VP-UML from WebLogic Workshop™...........................................................................................8
Code Generation from Model to Code .........................................................................................................................................................9
Project Based Code Generation......................................................................................................................................................10
Package Based Code Generation....................................................................................................................................................10
Class Based Code Generation ........................................................................................................................................................10
0 - 6
VP-UML IDE Integration User’s Guide (Part 1)
Selecting Corresponding Elements in WebLogic Workshop™ from VP-UML ........................................................................................ 11
Importing a VP-UML Project into WebLogic Workshop™...................................................................................................................... 12
Exporting a VP-UML Project from WebLogic Workshop™ .................................................................................................................... 14
Model Representation of Code .................................................................................................................................................................. 15
0 - 7
VP-UML IDE Integration User’s Guide (Part 1)
0 - 8
1
Integration with Eclipse/WSAD
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
Chapter 1 – Integration with Eclipse/WSAD
Overview
VP-UML Professional and Enterprise Edition allows you to integrate the VP-UML module with Eclipse or WSAD, providing
full software development life cycle support. By designing your software system in VP-UML, you can generate programming
source code from class diagram to an Eclipse project. Also, you can reverse engineer your source code into class models in
VP-UML.
1-
2
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
Installation
First of all, please make sure your machine has Eclipse 3.0 or above / IBM WebSphere Studio Application Developer ® 5.1 or
above properly installed.
To install Eclipse Integration from VP-UML:
1. Start VP-UML
2. Select Tools > IDE Integration… from the main menu of VP-UML.
3. This displays the VP-Suite dialog box.
4. Check Eclipse/IBM WebSphere Studio Integration.
5. Click Next. This displays the Product Configuration page.
6. Locate the Eclipse home directory in the Directory field. You can enter the path directly in the text field, or press … to
select the directory from the Open dialog box.
7. Click Next. This displays the Installing Files page and starts the installation process.
1-
3
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
8. Click Finish to close the dialog box when the installation is completed.
You can install Eclipse Integration only on a “clean” copy of Eclipse. A clean copy of Eclipse is one which has no
other kinds of integration such as SDE for Eclipse and DB-VA for Eclipse installed.
Eclipse Integration can only be installed on ONE Eclipse directory only. The next time you start the VP-Suite
dialog from VP-UML you will see the option Eclipse/WebSphere Studio Integration is selected.
Creating a VP-UML Project in Eclipse
To create a VP-UML Project in Eclipse:
1. Start Eclipse.
2. Select the Eclipse project for which you want to create a VP-UML project for it.
3. Right-click on the selected project and choose VP-UML Project > New Project from popup menu.
1-
4
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
This displays the Project Structure dialog box.
4. Select from the Project Structure dialog box the location of the VP-UML project is to be saved. The VP-UML project,
with .vpp extension, is the UML project file that is going to be associated with the selected Eclipse project file. Select
Create in default path result in saving the VP-UML project to %Eclipse_Project_Directory%/vpproject while selecting
Create at external location require you to specify the project path.
5. Click OK.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is associated with the Eclipse
project.
1-
5
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
Opening a VP-UML Project from Eclipse
1. Start Eclipse.
2. Select the Eclipse project for which you want to open the VP-UML project from it.
3. Right-click on the selected project and choose Open VP-UML Project from popup menu.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is associated with the Eclipse
project.
1-
6
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
Reverse Engineering from Code to Model
Code reverse engineering updates UML class models from source code in Eclipse. You can update the whole project, package
(s) and class (es) from Eclipse to VP-UML. Before reverse engineering, you must open the UML model of the desired project.
More information about how to open a VP-UML from Eclipse can be found from the section
in this Chapter.
Project Based Reverse Engineering
You can update models in VP-UML from an Eclipse project. Models of the selected project, child packages and classes will be
updated or created (if the models are not already exists).
To reverse engineer code from an Eclipse project to UML model, right-click on the project node in Eclipse and select Update
VP-UML Model from popup menu.
This updates/creates the corresponding UML model in VP-UML.
Package Based Reverse Engineering
You can update models in VP-UML from an Eclipse project. Models of the selected package, child packages and classes will
be updated or created (if the models are not already exists).
To reverse engineer code from a package in an Eclipse project to UML model, right-click on the package in Eclipse and select
Update VP-UML Model from popup menu.
1-
7
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
This updates/creates the corresponding UML model in VP-UML.
The model will be updated according to the package hierarchy. You may change the layout of the Package
Explorer in Eclipse to Hierarchical Layout rather than Flat Layout to see the package hierarchy.
Class Based Reverse Engineering
You can update models in VP-UML from an Eclipse project. Models of the selected class and child classes (inner class) will be
updated or created (if the models are not already exists).
To reverse engineer code from a class in an Eclipse project to UML model, right-click on the class file in Eclipse and select
Update VP-UML Model from popup menu.
1-
8
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
This updates/creates the corresponding UML model in VP-UML.
Selecting Corresponding Elements in VP-UML from Eclipse
VP-UML helps selects class models in VP-UML corresponding to the source code in Eclipse. To select corresponding models
in VP-UML from Eclipse, perform one of the following actions:
Select on the desired piece of source elements from the Package Explorer of Eclipse. Right-click on the selection
and choose Select in VP-UML from popup menu.
1-
9
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
When the code editor for the desired piece of source is active, choose VP-UML > Select in VP-UML from Eclipse
main menu.
In both cases, the corresponding model in VP-UML is selected.
Code Generation from Model to Code
Code generation creates/updates source code in a Eclipse project from UML models. You can select to update the whole
project, package (s) and class (es) from VP-UML to Eclipse. Before updating/generating code, you must open the UML model
of the desired project. More information about how to open a VP-UML from Eclipse can be found from the section
in this Chapter.
Furthermore, there are 2 ways in synchronizing (updating) model to code. They are Sync to Code and Force Sync to Code.
1-
10
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
Sync to Code
Removed sources will not be recovered. Only the existing sources will be synchronized with the UML models.
Force Sync to Code
Removed sources will be recovered. Existing sources will be synchronized with the UML models, while removed sources will
be reconstructed.
Project Based Code Generation
To generate all classes and/or packages within a UML project:
1. Right-click the project (the root) in the Diagram Navigator, in the Model Tree or in the Class Repository Tree.
2. Select Update Project to Eclipse from popup menu.
Package Based Code Generation
To generate a package together with class/classes inside:
1. Select the desired package for generating code on a class diagram, in the Diagram Navigator, in the Model Tree or in the
Class Repository Tree.
2. Right-click on the selection and choose Update to Eclipse from popup menu.
Class Based Code Generation
To generate class/classes:
1-
11
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
1. Select class/classes on a class diagram, in the Diagram Navigator, in the Model Tree or in the Class Repository Tree for
generating code.
2. Right-click on the selection and select Update to Eclipse from popup menu.
Selecting Corresponding Elements in Eclipse from VP-UML
VP-UML helps selects element in VP-UML corresponding to the source code in Eclipse. To select corresponding piece of
source code in Eclipse from VP-UML, perform one of the following actions:
Select on the desired UML model in the Diagram Navigator, in the Model Tree or in the Class Repository Tree.
Right-click on the selection and choose Select in Eclipse from popup menu.
Select the desired model for generating code on a class diagram. Right-click on the selection and choose Select in
Eclipse from popup menu.
1-
12
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
In both cases, the corresponding source files will be opened and activated in Eclipse.
Importing a VP-UML Project into Eclipse
You can import another VP-UML project into an Eclipse project. If there is a VP-UML associating with the Eclipse project,
importing a VP-UML project results in replacing the original one with the one going to be imported.
Before importing a VP-UML project, you must open the UML model of the desired project. More information about how to
open a VP-UML from Eclipse can be found from the section
Opening a VP-UML Project from Eclipse
in this Chapter.
To import a VP-UML project:
1. Select the Eclipse project for which you want to import a VP-UML project into it.
2. Right-click on the selected project and choose VP-UML Project > Import from popup menu.
3. This displays the Import Project dialog box.
1-
13
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
4. Locate the file path of the source VP-UML project. The source project is the one that is going to be imported into the
selected Eclipse project. If there is an existing VP-UML project associated with the selected Eclipse project, the target
project path is the path of the existing VP-UML project. If there is no existing VP-UML project associated with the
selected Eclipse project, the path is the default one, which is %Eclipse_Project_Directory%/vpproject.
5. Click OK.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is the imported one which is
now associated with the Eclipse project.
Exporting a VP-UML Project from Eclipse
You can export the VP-UML project that is associated with an Eclipse project. The exported VP-UML project has no
association with both the Eclipse project and the VP-UML project it exported from.
Before exporting a VP-UML project, you must open the UML model of the desired project. More information about how to
open a VP-UML from Eclipse can be found from the section
Opening a VP-UML Project from Eclipse
in this Chapter.
To export a VP-UML project:
1. Select the Eclipse project for which you want to export the VP-UML associated with it.
2. Right-click on the selected project and choose VP-UML Project > Export from popup menu.
1-
14
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
This displays the Save As dialog box.
3. Locate the project file path for the output project.
4. Click Save.
The VP-UML project is exported to the specified location.
Model Representation of Code
The following table shows some of the model representation of code.
Model
Code
Class
public
class
MyClass
{
}
Abstract Class
public
abstract
class
MyClass
{
}
Attribute
Instance Scope
public
class
MyClass
{
private
Integer intValue;
1-
15
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
}
classifier Scope
public
class
MyClass {
private
static
Integer intValue;
}
Operation
Instance Scope
public
class
MyClass
{
private
Integer intValue;
public
integer
getIntValue()
{
}
}
Classifier Scope
public
class
MyClass
{
private
static
Integer intValue;
public
static
Integer getIntValue()
{
}
}
Package
package
Package;
Containment
package
Package;
public
class
MyClass
{
}
Inner Class
public
class
OuterClass
{
class
InnerClass
{
}
}
1-
16
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
Generalization
public
class
MyClass
extends
OtherClass
{
}
Realization
public
class
MyClass
implements
MyInterface
{
}
Association
public
class
MyClass {
Otherclass
otherClass;
}
1-
17
VP-UML IDE Integration User’s Guide
Chapter 1 – Integration with Eclipse/WSAD
1-
18
2
Integration with NetBeans/Sun™ ONE
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
Chapter 2 – Integration with NetBeans/Sun™ ONE
Overview
VP-UML Professional and Enterprise Edition allows you to integrate the VP-UML module with NetBeans, providing full
software development life cycle support. By designing your software system in VP-UML, you can generate programming
source code from class diagram to a NetBeans project. Also, you can reverse engineer your source code into class models in
VP-UML.
2- 2
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
Installation
First of all, please make sure your machine has NetBeans IDE 4.0 or above / Sun™ ONE Studio 5 or above properly installed.
To install NetBeans Integration from VP-UML:
1. Start VP-UML
2. Select Tools > IDE Integration… from the main menu of VP-UML.
3. This displays the VP-Suite dialog box.
4. Check NetBeans / Sun ONE Integration.
5. Click Next. This displays the Product Configuration page.
6. Locate the NetBeans home directory in the Directory field. You can enter the path directly in the text field, or press … to
select the directory from the Open dialog box.
7. Click Next. This displays the Installing Files page and starts the installation process.
2- 3
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
8. Click Finish to close the dialog box when the installation is completed.
You can install NetBeans Integration only on a “clean” copy of NetBeans. A clean copy of NetBeans is one which
has no other kinds of integration such as SDE for NetBeans and DB-VA for NetBeans installed.
NetBeans Integration can only be installed on ONE NetBeans directory only. The next time you start the
VP-Suite dialog from VP-UML you will see the option NetBeans/Sun ONE Integration is selected.
Creating a VP-UML Project in NetBeans
To create a VP-UML Project in NetBeans:
1. Start NetBeans.
2. Select the NetBeans project for which you want to create a VP-UML project for it.
3. Right-click on the selected project and choose Tools > Visual Paradigm for UML %EDITION% > New VP-UML
%EDITION% Project from popup menu.
2- 4
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
This displays the Project Structure dialog box.
4. Select from the Project Structure dialog box the location of the VP-UML project is to be saved. The VP-UML project,
with .vpp extension, is the UML project file that is going to be associated with the selected NetBeans project file. Select
Create in default path result in saving the VP-UML project to %NetBeans_Project_Directory%/vpproject while selecting
Create at external location require you to specify the project path.
5. Click OK.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is associated with the
NetBeans project.
2- 5
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
Opening a VP-UML Project from NetBeans
1. Start NetBeans.
2. Select the NetBeans project for which you want to open the VP-UML project from it.
3. Right-click on the selected project and choose Tools > Visual Paradigm for UML %EDITION% > Open VP-UML
%EDITION% Project from popup menu.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is associated with the
NetBeans project.
Reverse Engineering from Code to Model
Code reverse engineering updates UML class models from source code in NetBeans. You can update the whole project,
package (s) and class (es) from NetBeans to VP-UML. Before reverse engineering, you must open the UML model of the
desired project. More information about how to open a VP-UML from NetBeans can be found from the section
in this Chapter.
2- 6
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
Project Based Reverse Engineering
You can update models in VP-UML from a NetBeans project. Models of the selected project, child packages and classes will
be updated or created (if the models are not already exists).
To reverse engineer code from a NetBeans project to UML model, right-click on the project node in NetBeans and select Tools
> Visual Paradigm for UML %EDITION% > Update VP-UML %EDITION% Model from popup menu.
This updates/creates the corresponding UML model in VP-UML.
Package Based Reverse Engineering
You can update models in VP-UML from a NetBeans project. Models of the selected package, child packages and classes will
be updated or created (if the models are not already exists).
To reverse engineer code from a package in a NetBeans project to UML model, right-click on the package in NetBeans and
select Tools > Visual Paradigm for UML %EDITION% > Update VP-UML %EDITION% Model from popup menu.
2- 7
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
This updates/creates the corresponding UML model in VP-UML.
Class Based Reverse Engineering
You can update models in VP-UML from a NetBeans project. Models of the selected class and child classes (inner class) will
be updated or created (if the models are not already exists).
To reverse engineer code from a class in a NetBeans project to UML model, right-click on the class file(s) in NetBeans and
select Tools > Visual Paradigm for UML %EDITION% > Update VP-UML %EDITION% Model from popup menu.
2- 8
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
This updates/creates the corresponding UML model in VP-UML.
Selecting Corresponding Elements in VP-UML from NetBeans
VP-UML helps selects class models in VP-UML corresponding to the source code in NetBeans. To select corresponding
models in VP-UML from NetBeans, perform one of the following actions:
Select on the desired piece of source elements from the Projects Windows of NetBeans. Right-click on the selection
and choose Tools > Visual Paradigm for UML %EDITION% > Select in VP-UML %EDITION% Model from
popup menu.
2- 9
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
When the code editor for the desired piece of source is active, choose Tools > Visual Paradigm for UML
%EDITION% > Select in VP-UML from NetBeans main menu.
In both cases, the corresponding model in VP-UML is selected.
2- 10
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
Code Generation from Model to Code
Code generation creates/updates source code in a NetBeans project from UML models. You can select to update the whole
project, package (s) and class (es) from VP-UML to NetBeans. Before updating/generating code, you must open the UML
model of the desired project. More information about how to open a VP-UML from NetBeans can be found from the section
Opening a VP-UML Project from NetBeans
in this Chapter.
Furthermore, there are 2 ways in synchronizing (updating) model to code. They are Sync to Code and Force Sync to Code.
Sync to Code
Removed sources will not be recovered. Only the existing sources will be synchronized with the UML models.
Force Sync to Code
Removed sources will be recovered. Existing sources will be synchronized with the UML models, while removed sources will
be reconstructed.
Project Based Code Generation
To generate all classes and/or packages within a UML project:
1. Right-click the project (the root) in the Diagram Navigator, in the Model Tree or in the Class Repository Tree.
2. Select Update Project to NetBeans from popup menu.
Package Based Code Generation
To generate a package together with class/classes inside:
1. Select the desired package for generating code on a class diagram, in the Diagram Navigator, in the Model Tree or in the
Class Repository Tree.
2- 11
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
2. Right-click on the selection and choose Update to NetBeans from popup menu.
Class Based Code Generation
To generate class/classes:
1. Select class/classes on a class diagram, in the Diagram Navigator, in the Model Tree or in the Class Repository Tree for
generating code.
2. Right-click on the selection and select Update to NetBeans from popup menu.
Selecting Corresponding Elements in NetBeans from VP-UML
VP-UML helps selects element in VP-UML corresponding to the source code in NetBeans. To select corresponding piece of
source code in NetBeans from VP-UML, perform one of the following actions:
Select on the desired UML model in the Diagram Navigator, in the Model Tree or in the Class Repository Tree.
Right-click on the selection and choose Select in NetBeans from popup menu.
2- 12
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
Select the desired model for generating code on a class diagram. Right-click on the selection and choose Select in
NetBeans from popup menu.
In both cases, the corresponding source files will be opened and activated in NetBeans.
Importing a VP-UML Project into NetBeans
You can import another VP-UML project into a NetBeans project. If there is a VP-UML associating with the NetBeans project,
importing a VP-UML project results in replacing the original one with the one going to be imported.
Before importing a VP-UML project, you must open the UML model of the desired project. More information about how to
open a VP-UML from NetBeans can be found from the section
Opening a VP-UML Project from NetBeans
in this Chapter.
To import a VP-UML project:
2- 13
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
1. Select the NetBeans project for which you want to import a VP-UML project into it.
2. Right-click on the selected project and choose Tools > Visual Paradigm for UML %EDITION% > Import VP-UML
%EDITION% Project from popup menu.
3. This displays the Import Project dialog box.
4. Locate the file path of the source VP-UML project. The source project is the one that is going to be imported into the
selected NetBeans project. If there is an existing VP-UML project associated with the selected NetBeans project, the target
project path is the path of the existing VP-UML project. If there is no existing VP-UML project associated with the
selected NetBeans project, the path is the default one, which is %NetBeans_Project_Directory%/vpproject.
5. Click OK.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is the imported one which is
now associated with the NetBeans project.
2- 14
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
Exporting a VP-UML Project from NetBeans
You can export the VP-UML project that is associated with an NetBeans project. The exported VP-UML project has no
association with both the NetBeans project and the VP-UML project it exported from.
Before exporting a VP-UML project, you must open the UML model of the desired project. More information about how to
open a VP-UML from NetBeans can be found from the section
Opening a VP-UML Project from NetBeans
in this Chapter.
To export a VP-UML project:
1. Select the NetBeans project for which you want to export the VP-UML associated with it.
2. Right-click on the selected project and choose Tools > Visual Paradigm for UML %EDITION% > Export VP-UML
%EDITION% Project from popup menu.
This displays the Save As dialog box.
3. Locate the project file path for the output project.
4. Click Save.
2- 15
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
The VP-UML project is exported to the specified location.
Model Representation of Code
The following table shows some of the model representation of code.
Model
Code
Class
public
class
MyClass
{
}
Abstract Class
public
abstract
class
MyClass
{
}
Attribute
Instance Scope
public
class
MyClass
{
private
Integer intValue;
}
classifier Scope
public
class
MyClass {
private
static
Integer intValue;
}
Operation
Instance Scope
public
class
MyClass
{
private
Integer intValue;
public
integer
getIntValue()
{
}
}
Classifier Scope
public
class
MyClass
{
private
static
Integer intValue;
public
static
Integer getIntValue()
{
}
2- 16
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
}
Package
package
Package;
Containment
package
Package;
public
class
MyClass
{
}
Inner Class
public
class
OuterClass
{
class
InnerClass
{
}
}
Generalization
public
class
MyClass
extends
OtherClass
{
}
Realization
public
class
MyClass
implements
MyInterface
{
}
Association
public
class
MyClass {
Otherclass
otherClass;
}
2- 17
VP-UML IDE Integration User’s Guide
Chapter 2 – Integration with NetBeans/Sun™ ONE
2- 18
3
Integration with JBuilder
VP-UML IDE Integration User’s Guide
Chapter 3 – Integration with JBuilder
Chapter 3 – Integration with JBuilder
Overview
VP-UML Professional and Enterprise Edition allows you to integrate the VP-UML module with Borland JBuilder, providing
full software development life cycle support. By designing your software system in VP-UML, you can generate programming
source code from class diagram to a JBuilder project. Also, you can reverse engineer your source code into class models in
VP-UML.
3 - 2
VP-UML IDE Integration User’s Guide
Chapter 3 – Integration with JBuilder
Installation
First of all, please make sure your machine has JBuilder® 9 or above properly installed.
To install JBuilder Integration from VP-UML:
1. Start VP-UML
2. Select Tools > IDE Integration… from the main menu of VP-UML.
3. This displays the VP-Suite dialog box.
4. Check JBuilder Integration.
5. Click Next. This displays the Product Configuration page.
6. Locate the JBuilder home directory in the Directory field. You can enter the path directly in the text field, or press … to
select the directory from the Open dialog box.
7. Click Next. This displays the Installing Files page and starts the installation process.
3 - 3
VP-UML IDE Integration User’s Guide
Chapter 3 – Integration with JBuilder
8. Click Finish to close the dialog box when the installation is completed.
You can install JBuilder Integration only on a “clean” copy of JBuilder. A clean copy of JBuilder is one which has
no other kinds of integration such as SDE for JBuilder and DB-VA for JBuilder installed.
JBuilder Integration can only be installed on ONE JBuilder directory only. The next time you start the VP-Suite
dialog from VP-UML you will see the option JBuilder Studio Integration is selected.
Creating a VP-UML Project in JBuilder
To create a VP-UML Project in JBuilder:
1. Start JBuilder.
2. Select the JBuilder project for which you want to create a VP-UML project for it.
3. Right-click on the selected project and choose VP-UML %EDITION% Project > New VP-UML %EDITION%
Project from popup menu.
3 - 4
VP-UML IDE Integration User’s Guide
Chapter 3 – Integration with JBuilder
This displays the Project Structure dialog box.
4. Select from the Project Structure dialog box the location of the VP-UML project is to be saved. The VP-UML project,
with .vpp extension, is the UML project file that is going to be associated with the selected JBuilder project file. Select
Create in default path result in saving the VP-UML project to %JBuilder_Project_Directory%/vpproject while selecting
Create at external location require you to specify the project path.
5. Click OK.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is associated with the
JBuilder project.
3 - 5
VP-UML IDE Integration User’s Guide
Chapter 3 – Integration with JBuilder
Opening a VP-UML Project from JBuilder
1. Start JBuilder.
2. Select the JBuilder project for which you want to open the VP-UML project from it.
3. Right-click on the selected project and choose VP-UML %EDITION% Project > Open VP-UML %EDITION%
Project from popup menu.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is associated with the
JBuilder project.
Reverse Engineering from Code to Model
Code reverse engineering updates UML class models from source code in JBuilder. You can update the whole project, package
(s) and class (es) from JBuilder to VP-UML. Before reverse engineering, you must open the UML model of the desired project.
More information about how to open a VP-UML from JBuilder can be found from the section
in this Chapter.
Project Based Reverse Engineering
You can update models in VP-UML from a JBuilder project. Models of the selected project, child packages and classes will be
updated or created (if the models are not already exists).
To reverse engineer code from a JBuilder project to UML model, right-click on the project node in JBuilder and select Update
VP-UML %EDITION% Model from popup menu.
3 - 6
VP-UML IDE Integration User’s Guide
Chapter 3 – Integration with JBuilder
This updates/creates the corresponding UML model in VP-UML.
Package Based Reverse Engineering
You can update models in VP-UML from a JBuilder project. Models of the selected package, child packages and classes will
be updated or created (if the models are not already exists).
To reverse engineer code from a package in a JBuilder project to UML model, right-click on the package in JBuilder and select
Update VP-UML %EDITION% Model from popup menu.
This updates/creates the corresponding UML model in VP-UML.
The model will be updated according to the package hierarchy.
Class Based Reverse Engineering
You can update models in VP-UML from a JBuilder project. Models of the selected class and child classes (inner class) will be
updated or created (if the models are not already exists).
To reverse engineer code from a class in a JBuilder project to UML model, right-click on the class file in JBuilder and select
3 - 7
VP-UML IDE Integration User’s Guide
Chapter 3 – Integration with JBuilder
Update VP-UML %EDITION% Model from popup menu.
This updates/creates the corresponding UML model in VP-UML.
Selecting Corresponding Elements in VP-UML from JBuilder
VP-UML helps selects class models in VP-UML corresponding to the source code in JBuilder. To select corresponding models
in VP-UML from JBuilder, perform one of the following actions:
Select on the desired piece of source elements from the Project Pane of JBuilder. Right-click on the selection and
choose Select in VP-UML %EDITION% Project from popup menu.
When the code editor for the desired piece of source is active, choose VP-UML %EDITION% > Select in
VP-UML %EDITION% from JBuilder main menu.
3 - 8
VP-UML IDE Integration User’s Guide
Chapter 3 – Integration with JBuilder
In both cases, the corresponding model in VP-UML is selected.
Code Generation from Model to Code
Code generation creates/updates source code in a JBuilder project from UML models. You can select to update the whole
project, package (s) and class (es) from VP-UML to JBuilder. Before updating/generating code, you must open the UML model
of the desired project. More information about how to open a VP-UML from JBuilder can be found from the section
in this Chapter.
Furthermore, there are 2 ways in synchronizing (updating) model to code. They are Sync to Code and Force Sync to Code.
Sync to Code
Removed sources will not be recovered. Only the existing sources will be synchronized with the UML models.
Force Sync to Code
Removed sources will be recovered. Existing sources will be synchronized with the UML models, while removed sources will
be reconstructed.
Project Based Code Generation
To generate all classes and/or packages within a UML project:
1. Right-click the project (the root) in the Diagram Navigator, in the Model Tree or in the Class Repository Tree.
2. Select Update Project to JBuilder from popup menu.
3 - 9
VP-UML IDE Integration User’s Guide
Chapter 3 – Integration with JBuilder
Package Based Code Generation
To generate a package together with class/classes inside:
1. Select the desired package for generating code on a class diagram, in the Diagram Navigator, in the Model Tree or in the
Class Repository Tree.
2. Right-click on the selection and choose Update to JBuilder from popup menu.
Class Based Code Generation
To generate class/classes:
1. Select class/classes on a class diagram, in the Diagram Navigator, in the Model Tree or in the Class Repository Tree for
generating code.
2. Right-click on the selection and select Update to JBuilder from popup menu.
3 - 10
VP-UML IDE Integration User’s Guide
Chapter 3 – Integration with JBuilder
Selecting Corresponding Elements in JBuilder from VP-UML
VP-UML helps selects element in VP-UML corresponding to the source code in JBuilder. To select corresponding piece of
source code in JBuilder from VP-UML, perform one of the following actions:
Select on the desired UML model in the Diagram Navigator, in the Model Tree or in the Class Repository Tree.
Right-click on the selection and choose Select in JBuilder from popup menu.
Select the desired model for generating code on a class diagram. Right-click on the selection and choose Select in
JBuilder from popup menu.
3 - 11
VP-UML IDE Integration User’s Guide
Chapter 3 – Integration with JBuilder
In both cases, the corresponding source files will be opened and activated in JBuilder.
Importing a VP-UML Project into JBuilder
You can import another VP-UML project into a JBuilder project. If there is a VP-UML associating with the JBuilder project,
importing a VP-UML project results in replacing the original one with the one going to be imported.
Before importing a VP-UML project, you must open the UML model of the desired project. More information about how to
open a VP-UML from JBuilder can be found from the section
Opening a VP-UML Project from JBuilder
in this Chapter.
To import a VP-UML project:
1. Select the JBuilder project for which you want to import a VP-UML project into it.
2. Right-click on the selected project and choose VP-UML %EDITION% Project > Import VP-UML %EDITION%
Project from popup menu.
3 - 12
VP-UML IDE Integration User’s Guide
Chapter 3 – Integration with JBuilder
3. This displays the Import Project dialog box.
4. Locate the file path of the source VP-UML project. The source project is the one that is going to be imported into the
selected JBuilder project. If there is an existing VP-UML project associated with the selected JBuilder project, the target
project path is the path of the existing VP-UML project. If there is no existing VP-UML project associated with the
selected JBuilder project, the path is the default one, which is %JBuilder_Project_Directory%/vpproject.
5. Click OK.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is the imported one which is
now associated with the JBuilder project.
3 - 13
VP-UML IDE Integration User’s Guide
Chapter 3 – Integration with JBuilder
Exporting a VP-UML Project from JBuilder
You can export the VP-UML project that is associated with an JBuilder project. The exported VP-UML project has no
association with both the JBuilder project and the VP-UML project it exported from.
Before exporting a VP-UML project, you must open the UML model of the desired project. More information about how to
open a VP-UML from JBuilder can be found from the section
Opening a VP-UML Project from JBuilder
in this Chapter.
To export a VP-UML project:
1. Select the JBuilder project for which you want to export the VP-UML associated with it.
2. Right-click on the selected project and choose VP-UML %EDITION% Project > Export VP-UML %EDITION%
Project from popup menu.
This displays the Save As dialog box.
3. Locate the project file path for the output project.
4. Click Save.
The VP-UML project is exported to the specified location.
3 - 14
VP-UML IDE Integration User’s Guide
Chapter 3 – Integration with JBuilder
Model Representation of Code
The following table shows some of the model representation of code.
Model
Code
Class
public
class
MyClass
{
}
Abstract Class
public
abstract
class
MyClass
{
}
Attribute
Instance Scope
public
class
MyClass
{
private
Integer intValue;
}
classifier Scope
public
class
MyClass {
private
static
Integer intValue;
}
Operation
Instance Scope
public
class
MyClass
{
private
Integer intValue;
public
integer
getIntValue()
{
}
}
Classifier Scope
public
class
MyClass
{
private
static
Integer intValue;
public
static
Integer getIntValue()
{
}
}
3 - 15
VP-UML IDE Integration User’s Guide
Chapter 3 – Integration with JBuilder
Package
package
Package;
Containment
package
Package;
public
class
MyClass
{
}
Inner Class
public
class
OuterClass
{
class
InnerClass
{
}
}
Generalization
public
class
MyClass
extends
OtherClass
{
}
Realization
public
class
MyClass
implements
MyInterface
{
}
Association
public
class
MyClass {
Otherclass
otherClass;
}
3 - 16
4
Integration with IntelliJ IDEA™
VP-UML IDE Integration User’s Guide
Chapter 4 – Integration with IntelliJ IDEA™
Chapter 4 – Integration with IntelliJ IDEA™
Overview
VP-UML Professional and Enterprise Edition allows you to integrate the VP-UML module with IntelliJ IDEA, providing full
software development life cycle support. By designing your software system in VP-UML, you can generate programming
source code from class diagram to an IntelliJ IDEA project. Also, you can reverse engineer your source code into class models
in VP-UML.
4- 2
VP-UML IDE Integration User’s Guide
Chapter 4 – Integration with IntelliJ IDEA™
Installation
First of all, please make sure your machine has IntelliJ IDEA 4 or above properly installed.
To install IntelliJ IDEA Integration from VP-UML:
1. Start VP-UML
2. Select Tools > IDE Integration… from the main menu of VP-UML.
3. This displays the VP-Suite dialog box.
4. Check IntelliJ IDEA Integration.
5. Click Next. This displays the Product Configuration page.
6. Locate the IntelliJ IDEA home directory in the Directory field. You can enter the path directly in the text field, or press …
to select the directory from the Open dialog box.
7. Click Next. This displays the Installing Files page and starts the installation process.
4- 3
VP-UML IDE Integration User’s Guide
Chapter 4 – Integration with IntelliJ IDEA™
8. Click Finish to close the dialog box when the installation is completed.
You can install IntelliJ Integration only on a “clean” copy of IntelliJ. A clean copy of IntelliJ is one which has no
other kinds of integration such as SDE for IntelliJ IDEA and DBVA for IntelliJ IDEA installed.
IntelliJ IDEA Integration can only be installed on ONE IntelliJ IDEA directory only. The next time you start the
VP-Suite dialog from VP-UML you will see the option IntelliJ IDEA Integration is selected.
Creating a VP-UML Project in IntelliJ IDEA
To create a VP-UML Project in IntelliJ IDEA:
1. Start IntelliJ IDEA.
2. Select the IntelliJ IDEA project for which you want to create a VP-UML project for it.
3. Right-click on the selected project and choose VP-UML > New VP-UML Project from popup menu.
4- 4
VP-UML IDE Integration User’s Guide
Chapter 4 – Integration with IntelliJ IDEA™
This displays the Project Structure dialog box.
4. Select from the Project Structure dialog box the location of the VP-UML project is to be saved. The VP-UML project,
with .vpp extension, is the UML project file that is going to be associated with the selected IntelliJ IDEA project file.
Select Create in default path result in saving the VP-UML project to %IntelliJ_IDEA_Project_Directory%/vpproject
while selecting Create at external location require you to specify the project path.
5. Click OK.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is associated with the IntelliJ
IDEA project.
4- 5
VP-UML IDE Integration User’s Guide
Chapter 4 – Integration with IntelliJ IDEA™
Opening a VP-UML Project from IntelliJ IDEA
1. Start IntelliJ IDEA.
2. Select the IntelliJ IDEA project for which you want to open the VP-UML project from it.
3. Right-click on the selected project and choose VP-UML > Open VP-UML Project from popup menu.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is associated with the IntelliJ
IDEA project.
4- 6
VP-UML IDE Integration User’s Guide
Chapter 4 – Integration with IntelliJ IDEA™
Reverse Engineering from Code to Model
Code reverse engineering updates UML class models from source code in IntelliJ IDEA. You can update the whole project,
package (s) and class (es) from IntelliJ IDEA to VP-UML. Before reverse engineering, you must open the UML model of the
desired project. More information about how to open a VP-UML from IntelliJ IDEA can be found from the section
VP-UML Project from IntelliJ IDEA
in this Chapter.
Project Based Reverse Engineering
You can update models in VP-UML from an IntelliJ IDEA project. Models of the selected project, child packages and classes
will be updated or created (if the models are not already exists).
To reverse engineer code from an IntelliJ IDEA project to UML model, right-click on the project node in IntelliJ IDEA and
select VP-UML > Update VP-UML Model from popup menu.
This updates/creates the corresponding UML model in VP-UML.
Package Based Reverse Engineering
You can update models in VP-UML from an IntelliJ IDEA project. Models of the selected package, child packages and classes
will be updated or created (if the models are not already exists).
To reverse engineer code from a package in an IntelliJ IDEA project to UML model, right-click on the package in IntelliJ
IDEA and select VP-UML > Update VP-UML Model from popup menu.
4- 7
VP-UML IDE Integration User’s Guide
Chapter 4 – Integration with IntelliJ IDEA™
This updates/creates the corresponding UML model in VP-UML.
The model will be updated according to the package hierarchy.
Class Based Reverse Engineering
You can update models in VP-UML from an IntelliJ IDEA project. Models of the selected class and child classes (inner class)
will be updated or created (if the models are not already exists).
To reverse engineer code from a class in an IntelliJ IDEA project to UML model, right-click on the class file in IntelliJ IDEA
and select VP-UML > Update VP-UML Model from popup menu.
This updates/creates the corresponding UML model in VP-UML.
Selecting Corresponding Elements in VP-UML from IntelliJ IDEA
VP-UML helps selects class models in VP-UML corresponding to the source code in IntelliJ IDEA. To select corresponding
models in VP-UML from IntelliJ IDEA, perform one of the following actions:
Select on the desired piece of source elements from the IntelliJ IDEA. Right-click on the selection and choose
VP-UML > Select in VP-UML from popup menu.
4- 8
VP-UML IDE Integration User’s Guide
Chapter 4 – Integration with IntelliJ IDEA™
When the code editor for the desired piece of source is active, choose VP-UML > Select in VP-UML from IntelliJ
IDEA main menu.
In both cases, the corresponding model in VP-UML is selected.
Code Generation from Model to Code
Code generation creates/updates source code in a IntelliJ IDEA project from UML models. You can select to update the whole
project, package (s) and class (es) from VP-UML to IntelliJ IDEA. Before updating/generating code, you must open the UML
model of the desired project. More information about how to open a VP-UML from IntelliJ IDEA can be found from the
section
Opening a VP-UML Project from IntelliJ IDEA
in this Chapter.
Furthermore, there are 2 ways in synchronizing (updating) model to code. They are Sync to Code and Force Sync to Code.
Sync to Code
Removed sources will not be recovered. Only the existing sources will be synchronized with the UML models.
Force Sync to Code
Removed sources will be recovered. Existing sources will be synchronized with the UML models, while removed sources will
be reconstructed.
4- 9
VP-UML IDE Integration User’s Guide
Chapter 4 – Integration with IntelliJ IDEA™
Project Based Code Generation
To generate all classes and/or packages within a UML project:
1. Right-click the project (the root) in the Diagram Navigator, in the Model Tree or in the Class Repository Tree.
2. Select Update Project to IntelliJ from popup menu.
Package Based Code Generation
To generate a package together with class/classes inside:
1. Select the desired package for generating code on a class diagram, in the Diagram Navigator, in the Model Tree or in the
Class Repository Tree.
2. Right-click on the selection and choose Update to IntelliJ from popup menu.
Class Based Code Generation
To generate class/classes:
1. Select class/classes on a class diagram, in the Diagram Navigator, in the Model Tree or in the Class Repository Tree for
generating code.
2. Right-click on the selection and select Update to IntelliJ from popup menu.
4- 10
VP-UML IDE Integration User’s Guide
Chapter 4 – Integration with IntelliJ IDEA™
Selecting Corresponding Elements in IntelliJ IDEA from VP-UML
VP-UML helps selects element in VP-UML corresponding to the source code in IntelliJ IDEA. To select corresponding piece
of source code in IntelliJ IDEA from VP-UML, perform one of the following actions:
Select on the desired UML model in the Diagram Navigator, in the Model Tree or in the Class Repository Tree.
Right-click on the selection and choose Select in IntelliJ from popup menu.
Select the desired model for generating code on a class diagram. Right-click on the selection and choose Select in
IntelliJ from popup menu.
In both cases, the corresponding source files will be opened and activated in IntelliJ IDEA.
4- 11
VP-UML IDE Integration User’s Guide
Chapter 4 – Integration with IntelliJ IDEA™
Importing a VP-UML Project into IntelliJ IDEA
You can import another VP-UML project into an IntelliJ IDEA project. If there is a VP-UML associating with the IntelliJ IDEA
project, importing a VP-UML project results in replacing the original one with the one going to be imported.
Before importing a VP-UML project, you must open the UML model of the desired project. More information about how to
open a VP-UML from IntelliJ IDEA can be found from the section
Opening a VP-UML Project from IntelliJ IDEA
in this
Chapter.
To import a VP-UML project:
1. Select the IntelliJ IDEA project for which you want to import a VP-UML project into it.
2. Right-click on the selected project and choose VP-UML > Import VP-UML Project from popup menu.
3. This displays the Import Project dialog box.
4- 12
VP-UML IDE Integration User’s Guide
Chapter 4 – Integration with IntelliJ IDEA™
4. Locate the file path of the source VP-UML project. The source project is the one that is going to be imported into the
selected IntelliJ IDEA project. If there is an existing VP-UML project associated with the selected IntelliJ IDEA project,
the target project path is the path of the existing VP-UML project. If there is no existing VP-UML project associated with
the selected IntelliJ IDEA project, the path is the default one, which is %IntelliJ_IDEA_Project_Directory%/vpproject.
5. Click OK.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is the imported one which is
now associated with the IntelliJ IDEA project.
Exporting a VP-UML Project from IntelliJ IDEA
You can export the VP-UML project that is associated with an IntelliJ IDEA project. The exported VP-UML project has no
association with both the IntelliJ IDEA project and the VP-UML project it exported from.
Before exporting a VP-UML project, you must open the UML model of the desired project. More information about how to
open a VP-UML from IntelliJ IDEA can be found from the section
Opening a VP-UML Project from IntelliJ IDEA
in this
Chapter.
To export a VP-UML project:
1. Select the IntelliJ IDEA project for which you want to export the VP-UML associated with it.
2. Right-click on the selected project and choose VP-UML > Export VP-UML Project from popup menu.
4- 13
VP-UML IDE Integration User’s Guide
Chapter 4 – Integration with IntelliJ IDEA™
This displays the Save As dialog box.
3. Locate the project file path for the output project.
4. Click Save.
The VP-UML project is exported to the specified location.
Model Representation of Code
The following table shows some of the model representation of code.
Model
Code
Class
public
class
MyClass
{
}
Abstract Class
public
abstract
class
MyClass
{
}
Attribute
Instance Scope
public
class
MyClass
{
private
Integer intValue;
}
classifier Scope
public
class
MyClass {
private
static
Integer intValue;
}
4- 14
VP-UML IDE Integration User’s Guide
Chapter 4 – Integration with IntelliJ IDEA™
Operation
Instance Scope
public
class
MyClass
{
private
Integer intValue;
public
integer
getIntValue()
{
}
}
Classifier Scope
public
class
MyClass
{
private
static
Integer intValue;
public
static
Integer getIntValue()
{
}
}
Package
package
Package;
Containment
package
Package;
public
class
MyClass
{
}
Inner Class
public
class
OuterClass
{
class
InnerClass
{
}
}
Generalization
public
class
MyClass
extends
OtherClass
{
}
4- 15
VP-UML IDE Integration User’s Guide
Chapter 4 – Integration with IntelliJ IDEA™
Realization
public
class
MyClass
implements
MyInterface
{
}
Association
public
class
MyClass {
Otherclass
otherClass;
}
4- 16
5
Integration with JDeveloper
VP-UML IDE Integration User’s Guide
Chapter 5 – Integration with JDeveloper
Chapter 5 – Integration with JDeveloper
Overview
VP-UML Professional and Enterprise Edition allows you to integrate the VP-UML module with Oracle JDeveloper, providing
full software development life cycle support. By designing your software system in VP-UML, you can generate programming
source code from class diagram to a JDeveloper project. Also, you can reverse engineer your source code into class models in
VP-UML.
5- 2
VP-UML IDE Integration User’s Guide
Chapter 5 – Integration with JDeveloper
Installation
First of all, please make sure your machine has Oracle JDeveloper 10g or above properly installed.
To install JDeveloper Integration from VP-UML:
1. Start VP-UML
2. Select Tools > IDE Integration… from the main menu of VP-UML.
3. This displays the VP-Suite dialog box.
4. Check JDeveloper Integration.
5. Click Next. This displays the Product Configuration page.
6. Locate the JDeveloper home directory in the Directory field. You can enter the path directly in the text field, or press … to
select the directory from the Open dialog box.
7. Click Next. This displays the Installing Files page and starts the installation process.
5- 3
VP-UML IDE Integration User’s Guide
Chapter 5 – Integration with JDeveloper
8. Click Finish to close the dialog box when the installation is completed.
You can install JDeveloper Integration only on a “clean” copy of JDeveloper. A clean copy of JDeveloper is one
which has no other kinds of integration such as SDE for JDeveloper and DB-VA for JDeveloper installed.
JDeveloper Integration can only be installed on ONE JDeveloper directory only. The next time you start the
VP-Suite dialog from VP-UML you will see the option JDeveloper Integration is selected.
Creating a VP-UML Project in JDeveloper
To create a VP-UML Project in JDeveloper:
1. Start JDeveloper.
2. Select the JDeveloper project for which you want to create a VP-UML project for it.
3. Right-click on the selected project and choose New VP-UML %EDITION% Project from popup menu.
5- 4
VP-UML IDE Integration User’s Guide
Chapter 5 – Integration with JDeveloper
This displays the Project Structure dialog box.
4. Select from the Project Structure dialog box the location of the VP-UML project is to be saved. The VP-UML project,
with .vpp extension, is the UML project file that is going to be associated with the selected JDeveloper project file. Select
Create in default path result in saving the VP-UML project to % JDeveloper_Project_Directory%/vpproject while
selecting Create at external location require you to specify the project path.
5. Click OK.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is associated with the
JDeveloper project.
5- 5
VP-UML IDE Integration User’s Guide
Chapter 5 – Integration with JDeveloper
Opening a VP-UML Project from JDeveloper
1. Start JDeveloper.
2. Select the JDeveloper project for which you want to open the VP-UML project from it.
3. Right-click on the selected project and choose Open VP-UML %EDITION% Model from popup menu.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is associated with the
JDeveloper project.
Reverse Engineering from Code to Model
Code reverse engineering updates UML class models from source code in JDeveloper. You can update the whole project,
package (s) and class (es) from JDeveloper to VP-UML. Before reverse engineering, you must open the UML model of the
desired project. More information about how to open a VP-UML from JDeveloper can be found from the section
VP-UML Project from JDeveloper
in this Chapter.
5- 6
VP-UML IDE Integration User’s Guide
Chapter 5 – Integration with JDeveloper
Project Based Reverse Engineering
You can update models in VP-UML from an JDeveloper project. Models of the selected project, child packages and classes
will be updated or created (if the models are not already exists).
To reverse engineer code from an JDeveloper project to UML model, right-click on the project node in JDeveloper and select
Update VP-UML %EDITION% Model from popup menu.
This updates/creates the corresponding UML model in VP-UML.
Package Based Reverse Engineering
You can update models in VP-UML from a JDeveloper project. Models of the selected package, child packages and classes
will be updated or created (if the models are not already exists).
To reverse engineer code from a package in a JDeveloper project to UML model, right-click on the package in JDeveloper and
select Update VP-UML %EDITION% Model from popup menu.
This updates/creates the corresponding UML model in VP-UML.
5- 7
VP-UML IDE Integration User’s Guide
Chapter 5 – Integration with JDeveloper
Class Based Reverse Engineering
You can update models in VP-UML from a JDeveloper project. Models of the selected class and child classes (inner class) will
be updated or created (if the models are not already exists).
To reverse engineer code from a class in a JDeveloper project to UML model, right-click on the class file in JDeveloper and
select Update VP-UML %EDITION% Model from popup menu.
This updates/creates the corresponding UML model in VP-UML.
Selecting Corresponding Elements in VP-UML from JDeveloper
VP-UML helps selects class models in VP-UML corresponding to the source code in JDeveloper. To select corresponding
models in VP-UML from JDeveloper, perform one of the following actions:
Select on the desired piece of source elements from either the System Navigator or Applications Navigator of
JDeveloper. Right-click on the selection and choose Select in VP-UML %EDITION% Project from popup menu.
5- 8
VP-UML IDE Integration User’s Guide
Chapter 5 – Integration with JDeveloper
When the code editor for the desired piece of source is active, choose VP-UML %EDITION% > Select in
VP-UML %EDITION% Project from JDeveloper main menu.
In both cases, the corresponding model in VP-UML is selected.
Code Generation from Model to Code
Code generation creates/updates source code in a JDeveloper project from UML models. You can select to update the whole
project, package (s) and class (es) from VP-UML to JDeveloper. Before updating/generating code, you must open the UML
model of the desired project. More information about how to open a VP-UML from JDeveloper can be found from the section
Opening a VP-UML Project from JDeveloper
in this Chapter.
Furthermore, there are 2 ways in synchronizing (updating) model to code. They are Sync to Code and Force Sync to Code.
Sync to Code
Removed sources will not be recovered. Only the existing sources will be synchronized with the UML models.
5- 9
VP-UML IDE Integration User’s Guide
Chapter 5 – Integration with JDeveloper
Force Sync to Code
Removed sources will be recovered. Existing sources will be synchronized with the UML models, while removed sources will
be reconstructed.
Project Based Code Generation
To generate all classes and/or packages within a UML project:
1. Right-click the project (the root) in the Diagram Navigator, in the Model Tree or in the Class Repository Tree.
2. Select Update Project to JDeveloper from popup menu.
Package Based Code Generation
To generate a package together with class/classes inside:
1. Select the desired package for generating code on a class diagram, in the Diagram Navigator, in the Model Tree or in the
Class Repository Tree.
2. Right-click on the selection and choose Update to JDeveloper from popup menu.
Class Based Code Generation
To generate class/classes:
1. Select class/classes on a class diagram, in the Diagram Navigator, in the Model Tree or in the Class Repository Tree for
generating code.
5- 10
VP-UML IDE Integration User’s Guide
Chapter 5 – Integration with JDeveloper
2. Right-click on the selection and select Update to JDeveloper from popup menu.
Selecting Corresponding Elements in JDeveloper from VP-UML
VP-UML helps selects element in VP-UML corresponding to the source code in JDeveloper. To select corresponding piece of
source code in JDeveloper from VP-UML, perform one of the following actions:
Select on the desired UML model in the Diagram Navigator, in the Model Tree or in the Class Repository Tree.
Right-click on the selection and choose Select in JDeveloper from popup menu.
Select the desired model for generating code on a class diagram. Right-click on the selection and choose Select in
JDeveloper from popup menu.
In both cases, the corresponding source files will be opened and activated in JDeveloper.
5- 11
VP-UML IDE Integration User’s Guide
Chapter 5 – Integration with JDeveloper
Importing a VP-UML Project into JDeveloper
You can import another VP-UML project into a JDeveloper project. If there is a VP-UML associating with the JDeveloper
project, importing a VP-UML project results in replacing the original one with the one going to be imported.
Before importing a VP-UML project, you must open the UML model of the desired project. More information about how to
open a VP-UML from JDeveloper can be found from the section
Opening a VP-UML Project from JDeveloper
in this Chapter.
To import a VP-UML project:
1. Select the JDeveloper project for which you want to import a VP-UML project into it.
2. Right-click on the selected project and choose VP-UML %EDITION% > Import VP-UML %EDITION% Project
from popup menu.
3. This displays the Import Project dialog box.
5- 12
VP-UML IDE Integration User’s Guide
Chapter 5 – Integration with JDeveloper
4. Locate the file path of the source VP-UML project. The source project is the one that is going to be imported into the
selected JDeveloper project. If there is an existing VP-UML project associated with the selected JDeveloper project, the
target project path is the path of the existing VP-UML project. If there is no existing VP-UML project associated with the
selected JDeveloper project, the path is the default one, which is %JDeveloper_Project_Directory%/vpproject.
5. Click OK.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is the imported one
which is now associated with the JDeveloper project.
Exporting a VP-UML Project from JDeveloper
You can export the VP-UML project that is associated with a JDeveloper project. The exported VP-UML project has no
association with both the JDeveloper project and the VP-UML project it exported from.
Before exporting a VP-UML project, you must open the UML model of the desired project. More information about how to
open a VP-UML from JDeveloper can be found from the section
Opening a VP-UML Project from JDeveloper
in this Chapter.
To export a VP-UML project:
1. Select the JDeveloper project for which you want to export the VP-UML associated with it.
2. Right-click on the selected project and choose VP-UML %EDITION% > Export VP-UML %EDITION% Project
from popup menu.
5- 13
VP-UML IDE Integration User’s Guide
Chapter 5 – Integration with JDeveloper
This displays the Save As dialog box.
3. Locate the project file path for the output project.
4. Click Save.
The VP-UML project is exported to the specified location.
Model Representation of Code
The following table shows some of the model representation of code.
Model
Code
Class
public
class
MyClass
{
}
Abstract Class
public
abstract
class
MyClass
{
}
Attribute
Instance Scope
public
class
MyClass
{
private
Integer intValue;
}
classifier Scope
public
class
MyClass {
private
static
Integer intValue;
}
5- 14
VP-UML IDE Integration User’s Guide
Chapter 5 – Integration with JDeveloper
Operation
Instance Scope
public
class
MyClass
{
private
Integer intValue;
public
integer
getIntValue()
{
}
}
Classifier Scope
public
class
MyClass
{
private
static
Integer intValue;
public
static
Integer getIntValue()
{
}
}
Package
package
Package;
Containment
package
Package;
public
class
MyClass
{
}
Inner Class
public
class
OuterClass
{
class
InnerClass
{
}
}
Generalization
public
class
MyClass
extends
OtherClass
{
}
5- 15
VP-UML IDE Integration User’s Guide
Chapter 5 – Integration with JDeveloper
Realization
public
class
MyClass
implements
MyInterface
{
}
Association
public
class
MyClass {
Otherclass
otherClass;
}
5- 16
6
Integration with WebLogic Workshop™
VP-UML IDE Integration User’s Guide
Chapter 6 – Integration with WebLogic Workshop™
Chapter 6 – Integration with WebLogic Workshop™
Overview
VP-UML Professional and Enterprise Edition allows you to integrate the VP-UML module with WebLogic Workshop™,
providing full software development life cycle support. By designing your software system in VP-UML, you can generate
programming source code from class diagram to a WebLogic Workshop™ project. Also, you can reverse engineer your source
code into class models in VP-UML.
6 - 2
VP-UML IDE Integration User’s Guide
Chapter 6 – Integration with WebLogic Workshop™
Installation
First of all, please make sure your machine has WebLogic Workshop™ 8.1 or above properly installed.
To install WebLogic Workshop™ Integration from VP-UML:
1. Start VP-UML
2. Select Tools > IDE Integration… from the main menu of VP-UML.
3. This displays the VP-Suite dialog box.
4. Check WebLogic Workshop Integration.
5. Click Next. This displays the Product Configuration page.
6. Locate the WebLogic Workshop™ home directory in the Directory field. You can enter the path directly in the text field,
or press … to select the directory from the Open dialog box.
7. Click Next. This displays the Installing Files page and starts the installation process.
6 - 3
VP-UML IDE Integration User’s Guide
Chapter 6 – Integration with WebLogic Workshop™
8. Click Finish to close the dialog box when the installation is completed.
You can install WebLogic Workshop™ Integration only on a “clean” copy of WebLogic Workshop™. A clean
copy of WebLogic Workshop™ is one which has no other kinds of integration such as SDE for WebLogic
Workshop™ and DB-VA for WebLogic Workshop™ installed.
WebLogic Workshop™ Integration can only be installed on ONE WebLogic Workshop™ directory only. The
next time you start the VP-Suite dialog from VP-UML you will see the option WebLogic Workshop™
Integration is selected.
Creating a VP-UML Project in WebLogic Workshop™
To create a VP-UML Project in WebLogic Workshop™:
1. Start WebLogic Workshop™.
2. Select the WebLogic Workshop™ project for which you want to create a VP-UML project for it.
3. Right-click on the selected project and choose New VP-UML %EDITION% Project from popup menu.
6 - 4
VP-UML IDE Integration User’s Guide
Chapter 6 – Integration with WebLogic Workshop™
This displays the Project Structure dialog box.
4. Select from the Project Structure dialog box the location of the VP-UML project is to be saved. The VP-UML project,
with .vpp extension, is the UML project file that is going to be associated with the selected WebLogic Workshop™ project
file. Select Create in default path result in saving the VP-UML project to
%WebLogic_Workshop_Project_Directory%/vpproject while selecting Create at external location require you to specify
the project path.
5. Click OK.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is associated with the
WebLogic Workshop™ project.
6 - 5
VP-UML IDE Integration User’s Guide
Chapter 6 – Integration with WebLogic Workshop™
Opening a VP-UML Project from WebLogic Workshop™
1. Start WebLogic Workshop™.
2. Select the WebLogic Workshop™ project for which you want to open the VP-UML project from it.
3. Right-click on the selected project and choose Open VP-UML %EDITION% Project from popup menu.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is associated with the
WebLogic Workshop™ project.
6 - 6
VP-UML IDE Integration User’s Guide
Chapter 6 – Integration with WebLogic Workshop™
Reverse Engineering from Code to Model
Code reverse engineering updates UML class models from source code in WebLogic Workshop™. You can update the whole
project, package (s) and class (es) from WebLogic Workshop™ to VP-UML. Before reverse engineering, you must open the
UML model of the desired project. More information about how to open a VP-UML from WebLogic Workshop™ can be found
from the section
Opening a VP-UML Project from WebLogic Workshop™
in this Chapter.
Project Based Reverse Engineering
You can update models in VP-UML from a WebLogic Workshop™ project. Models of the selected project, child packages and
classes will be updated or created (if the models are not already exists).
To reverse engineer code from a WebLogic Workshop™ project to UML model, right-click on the project node in WebLogic
Workshop™ and select Update VP-UML %EDITION% Model from popup menu.
This updates/creates the corresponding UML model in VP-UML.
Package Based Reverse Engineering
You can update models in VP-UML from a WebLogic Workshop™ project. Models of the selected package, child packages
and classes will be updated or created (if the models are not already exists).
To reverse engineer code from a package in an WebLogic Workshop™ project to UML model, right-click on the package in
WebLogic Workshop™ and select Update VP-UML %EDITION% Model from popup menu.
6 - 7
VP-UML IDE Integration User’s Guide
Chapter 6 – Integration with WebLogic Workshop™
This updates/creates the corresponding UML model in VP-UML.
The model will be updated according to the package hierarchy.
Class Based Reverse Engineering
You can update models in VP-UML from a WebLogic Workshop™ project. Models of the selected class and child classes
(inner class) will be updated or created (if the models are not already exists).
To reverse engineer code from a class in a WebLogic Workshop™ project to UML model, right-click on the class file in
WebLogic Workshop™ and select Update VP-UML %EDITION% Model from popup menu.
This updates/creates the corresponding UML model in VP-UML.
Selecting Corresponding Elements in VP-UML from WebLogic Workshop™
VP-UML helps selects class models in VP-UML corresponding to the source code in WebLogic Workshop™. To select
corresponding models in VP-UML from WebLogic Workshop™, perform one of the following actions:
Select on the desired piece of source elements from the WebLogic Workshop™. Right-click on the selection and
choose Select in VP-UML %EDITION% from popup menu.
6 - 8
VP-UML IDE Integration User’s Guide
Chapter 6 – Integration with WebLogic Workshop™
When the code editor for the desired piece of source is active, choose VP-UML > Select in VP-UML
%EDITION% from WebLogic Workshop™ main menu.
In both cases, the corresponding model in VP-UML is selected.
Code Generation from Model to Code
Code generation creates/updates source code in a WebLogic Workshop™ project from UML models. You can select to update
the whole project, package (s) and class (es) from VP-UML to WebLogic Workshop™. Before updating/generating code, you
must open the UML model of the desired project. More information about how to open a VP-UML from WebLogic
Workshop™ can be found from the section
Opening a VP-UML Project from WebLogic Workshop™
in this Chapter.
Furthermore, there are 2 ways in synchronizing (updating) model to code. They are Sync to Code and Force Sync to Code.
Sync to Code
Removed sources will not be recovered. Only the existing sources will be synchronized with the UML models.
Force Sync to Code
Removed sources will be recovered. Existing sources will be synchronized with the UML models, while removed sources will
be reconstructed.
6 - 9
VP-UML IDE Integration User’s Guide
Chapter 6 – Integration with WebLogic Workshop™
Project Based Code Generation
To generate all classes and/or packages within a UML project:
1. Right-click the project (the root) in the Diagram Navigator, in the Model Tree or in the Class Repository Tree.
2. Select Update Project to WebLogic Workshop from popup menu.
Package Based Code Generation
To generate a package together with class/classes inside:
1. Select the desired package for generating code on a class diagram, in the Diagram Navigator, in the Model Tree or in the
Class Repository Tree.
2. Right-click on the selection and choose Update to WebLogic Workshop from popup menu.
Class Based Code Generation
To generate class/classes:
1. Select class/classes on a class diagram, in the Diagram Navigator, in the Model Tree or in the Class Repository Tree for
generating code.
2. Right-click on the selection and select Update to WebLogic Workshop from popup menu.
6 - 10
VP-UML IDE Integration User’s Guide
Chapter 6 – Integration with WebLogic Workshop™
Selecting Corresponding Elements in WebLogic Workshop™ from VP-UML
VP-UML helps selects element in VP-UML corresponding to the source code in WebLogic Workshop™. To select
corresponding piece of source code in WebLogic Workshop™ from VP-UML, perform one of the following actions:
Select on the desired UML model in the Diagram Navigator, in the Model Tree or in the Class Repository Tree.
Right-click on the selection and choose Select in WebLogic Workshop from popup menu.
Select the desired model for generating code on a class diagram. Right-click on the selection and choose Select in
WebLogic Workshop from popup menu.
6 - 11
VP-UML IDE Integration User’s Guide
Chapter 6 – Integration with WebLogic Workshop™
In both cases, the corresponding source files will be opened and activated in WebLogic Workshop™.
Importing a VP-UML Project into WebLogic Workshop™
You can import another VP-UML project into a WebLogic Workshop™ project. If there is a VP-UML associating with the
WebLogic Workshop™ project, importing a VP-UML project results in replacing the original one with the one going to be
imported.
Before importing a VP-UML project, you must open the UML model of the desired project. More information about how to
open a VP-UML from WebLogic Workshop™ can be found from the section
Opening a VP-UML Project from WebLogic
in this Chapter.
To import a VP-UML project:
1. Select the WebLogic Workshop™ project for which you want to import a VP-UML project into it.
2. Right-click on the selected project and choose Import VP-UML %EDITION% Project from popup menu.
6 - 12
VP-UML IDE Integration User’s Guide
Chapter 6 – Integration with WebLogic Workshop™
3. This displays the Import Project dialog box.
4. Locate the file path of the source VP-UML project. The source project is the one that is going to be imported into the
selected WebLogic Workshop™ project. If there is an existing VP-UML project associated with the selected WebLogic
Workshop™ project, the target project path is the path of the existing VP-UML project. If there is no existing VP-UML
project associated with the selected WebLogic Workshop™ project, the path is the default one, which is
%WebLogic_Workshop_Project_Directory%/vpproject.
5. Click OK.
This starts a new instance of VP-UML on a separate window. The project opened from VP-UML is the imported one which is
now associated with the WebLogic Workshop™ project.
6 - 13
VP-UML IDE Integration User’s Guide
Chapter 6 – Integration with WebLogic Workshop™
Exporting a VP-UML Project from WebLogic Workshop™
You can export the VP-UML project that is associated with a WebLogic Workshop™ project. The exported VP-UML project
has no association with both the WebLogic Workshop™ project and the VP-UML project it exported from.
Before exporting a VP-UML project, you must open the UML model of the desired project. More information about how to
open a VP-UML from WebLogic Workshop™ can be found from the section
Opening a VP-UML Project from WebLogic
in this Chapter.
To export a VP-UML project:
1. Select the WebLogic Workshop™ project for which you want to export the VP-UML associated with it.
2. Right-click on the selected project and choose Export VP-UML %EDITION% Project from popup menu.
6 - 14
VP-UML IDE Integration User’s Guide
Chapter 6 – Integration with WebLogic Workshop™
This displays the Save As dialog box.
3. Locate the project file path for the output project.
4. Click Save.
The VP-UML project is exported to the specified location.
Model Representation of Code
The following table shows some of the model representation of code.
Model
Code
Class
public
class
MyClass
{
}
Abstract Class
public
abstract
class
MyClass
{
}
Attribute
Instance Scope
public
class
MyClass
{
private
Integer intValue;
}
classifier Scope
public
class
MyClass {
private
static
Integer intValue;
}
Operation
Instance Scope
public
class
MyClass
{
private
Integer intValue;
public
integer
getIntValue()
{
}
}
Classifier Scope
public
class
MyClass
{
private
static
Integer intValue;
6 - 15
VP-UML IDE Integration User’s Guide
Chapter 6 – Integration with WebLogic Workshop™
public
static
Integer getIntValue()
{
}
}
Package
package
Package;
Containment
package
Package;
public
class
MyClass
{
}
Inner Class
public
class
OuterClass
{
class
InnerClass
{
}
}
Generalization
public
class
MyClass
extends
OtherClass
{
}
Realization
public
class
MyClass
implements
MyInterface
{
}
Association
public
class
MyClass {
Otherclass
otherClass;
}
6 - 16