You are on page 1of 14

How to integrate Visual Paradigm with NetBeans

Visual Paradigm enables you to integrate the visual modeling environment with NetBeans,
providing full software development life cycle support. By designing your software system in
Visual Paradigm, you can generate programming source code from class diagram to an
NetBeans project. Also, you can reverse engineer your source code into class models in Visual
Paradigm.

Installation
First of all, please make sure you have NetBeans 6.7 or above available. To install NetBeans
Integration from Visual Paradigm:

1. In Visual Paradigm, select Window > Integration > IDE Integration... from the toolbar.
2. Select NetBeans Integration. You can run Visual Paradigm in multiple IDEs. In other
words, if you need you can select multiple IDEs here. Click Next.

3. Specify the folder path of NetBeans. Click Next to start copying files to your IDE.

1/2
Notes:
1. NetBeans integration can only be installed on one NetBeans directory only.
2. If you cannot find any Visual Paradigm menus in NetBeans after the installation, it could be
due to our plug-in failed to be recognized by NetBeans. To solve this problem, please deactivate
any plug-in in NetBeans and restart NetBeans.
3. You can manage plug-in in NetBeans by selecting Tools > Plugin in NetBeans.

Un-Installation
To remove the installation with an integrated IDE, perform an uninstallation.

1. In Visual Paradigm, select Window > Integration > IDE Integration... from the toolbar.
2. Select the radio button Uninstall.
3. Select NetBeans Integration.

4. Click Next.
5. Click Next for file removal.

2/2
How to create a UML project in NetBeans
You can create UML project for any of your Java project in NetBeans. Note that
one Java project can associate with at most one UML project and you cannot create UML project
without associating it with any Java project. Once you have created a UML project for a Java project,
you cannot remove it or de-associate it.

Creating a New UML Project


1. In NetBeans, select the Java project where you want to create a UML project for it.
2. Right click on the project and select Open Visual Paradigm EE from the popup menu.

3. Select from the Project Structure window the location of the Visual Paradigm project is to be
saved. The Visual Paradigm 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 will save
the UML project
to %NetBeans_Project_Directory%/vpproject while selecting Create at external
location require you to specify the project path you desire. If you want to create in default path
for all projects, check Create in default path and Remember my decision.

1/
4. Click OK.

Creating a UML Project by Importing an Existing .vpp Project File


1. In NetBeans, select the Java project where you want to create a UML project for it.
2. Right click on the project and select Visual Paradigm EE > Import Visual
Paradigm EE Project... from the popup menu.

3. Specify the path of source .vpp project as well as the location of the imported project file is to be
saved. Select Create in default path will save the UML project
to %NetBeans_Project_Directory%/vpproject while selecting Create at external
location require you to specify the project path you desire. If you want to create in default path
for all projects check Create in default path and Remember my decision.

2/
4. Click OK.

3/
How to open a UML project in NetBeans
1. In NetBeans, select the Java project where you want to open its UML project.
2. Right click on the project and select Open Visual Paradigm EE from the popup menu.

1/
How to reverse engineer UML model in NetBeans
Reverse engineering is the process to reverse engineer UML model from Java source. With reverse
engineering, you can visualize your program or system with class diagram. Before reverse
engineering, you must open the UML project from the Java project.

Project Based Reverse Engineering


You can produce and update UML models from all source files in a Java project. Models of the selected
project, child packages and classes will be created (if the models are not already exists) or updated. To
reverse engineer from an NetBeans project, right-click on the project node in NetBeans and select
Update UML Model from the popup menu.

Package Based Reverse Engineering


You can produce and update UML models from source files under a package. Models of the selected
package, child packages and classes will be created (if the models are not already exists) or updated.
To reverse engineer from a package in a Java project, right-click on the package in any tree and select
Tools > Visual Paradigm EE > Update UML Model from the popup menu.

2/
Class Based Reverse Engineering
You can produce and update UML models from classes in NetBeans. Models of the selected class and
child classes (inner class) will be created (if the models are not already exists) or updated. To reverse
engineer code from a class in a Java project, right-click on the class file in any tree or in code editor and
select Update UML Model from the popup menu.

2/
How to generate Java from UML in NetBeans
Code generation creates and updates source files in a Java project from UML models. You can select to
update the whole project, package(s) and class(es) from Visual Paradigm to NetBeans. Before updating
source files, you must open the UML project from the Java project.

Project Based Code Generation


You can generate and update source files from the whole UML project. Packages and classes will be
created (if not already exists) or updated. To generate/update source files from UML project, perform
any of the steps below:

Click in NetBeans toolbar.


Click at the top of Diagram Navigator.
Right click on the root node of Diagram Navigator and select Update Project to
Code from the popup menu.

Package Based Code Generation


You can generate and update package and its containing source file(s) from a UML package. Package
and classes will be created (if not already exists) or updated. To generate/update source files from
UML package, perform any of the steps below:

Right click on the package in any diagram and select Update to Code from the popup menu.

1/
Right click on the package under Diagram Navigator/Model Explorer/Class
Repository and select Update to Code from the popup menu.

Class Based Code Generation


You can generate and update source file from a UML class. Class will be created (if not already exists)
or updated. To generate/update source file from UML class, perform any of the steps below:

Right click on the class in any diagram and select Update to Code from the popup
menu.

Right click on the class under Diagram Navigator/Model Explorer/Class

2/
Repository and select Update to Code from the popup menu.

3/
How to select UML class from source code in NetBeans
Once a UML class is associated with a Java source by code reversal/generation, you can select from
source file the corresponding UML class in Visual Paradigm.

Selecting UML Class in Model Explorer


To select the UML class from a source file, right-click on the class file in any tree or in code editor
and select Select In Model from the popup menu.

Selecting UML Class in Diagram


To select the view of UML class from a source file, right-click on the class file in any tree or in code
editor and select Select In Diagram from the popup menu. If the class has been visualized with
multiple views, you will be prompted to select a view to open.

1/
2/
How to select source code in NetBeans from UML
Once a UML class is associated with a Java source by code reversal/generation, you can select from
UML class the corresponding Java source file in NetBeans.

Selecting Java Source from UML Class


To open a Java source file from a UML class, right-click on the UML class in Diagram
Navigator/Model Explorer/Class Repository or in diagram and select Select in Code from
the popup menu. This opens the corresponding source file in code editor.

1/

You might also like