You are on page 1of 16

Automatic code generation from models

with easyUML (NetBeans plugin)

23/10/2017 easyUML 1
Topics covered

 Introduction to easyUML
 Hands-on session
 Other UML tools

23/10/2017 easyUML 2
Introduction to easyUML

23/10/2017 easyUML 3
easyUML

 easyUML is a simple plugin for NetBeans


 It allows to create UML class diagrams and automatically generate
code from diagrams. And viceversa it allows to create UML diagrams
from code.
 http://plugins.netbeans.org/plugin/55435/easyuml

23/10/2017 easyUML 4
Before installation (for lab computers)

 'Tools > Plugins’ > ‘Settings’ and set ‘Plugin Install Location’ into
▪ ‘Force install into user directory’

23/10/2017 easyUML 5
Install easyUML

 NetBeans 8.0+:
▪ The plugin is available on the NetBeans Plugin Portal Update
Center. Use 'Tools > Plugins' action from the NetBeans IDE main
menu.
 Manual installation:
▪ Download the plugin and extract the archive
http://plugins.netbeans.org/plugin/55435/easyuml
▪ Install it manually
From the NetBeans IDE main menu: Tools > Plugins >
‘Downloaded’ tab > ‘Add Plugins…’ button > Go to the directory that
contains the plugin and open all the .nbm files > ‘Install’ button

23/10/2017 easyUML 6
easyUML: Hands-on session

23/10/2017 easyUML 7
Create new UML project

File > New Project…

23/10/2017 easyUML 8
Create new UML project (2)

UML Diagrams Project

Select UML

23/10/2017 easyUML 9
Create new UML project (2)

1. Name of the project

2 . Finish

23/10/2017 easyUML 10
Add a class diagram

1. Right click on Class


Diagrams folder

2. File > Class Diagram …

23/10/2017 easyUML 11
Create a Diagram

1. Name of the class


diagram

2. Finish

23/10/2017 easyUML 12
Live Example

23/10/2017 Sviluppo open source 13


Generate code from model

1. Right click on .cdg


file

2. Select

23/10/2017 Sviluppo open source 14


Generate model from code

1. Right click on the


Java Package

2. Select

23/10/2017 Sviluppo open source 15


Other UML tools

 There are more sophisticated tools for UML design and automatic code
generation from UML diagrams.
▪ Modelio (open source): https://www.modelio.org/
▪ ArgoUML (open source): http://argouml.tigris.org/
▪ Umbrello (open source): https://umbrello.kde.org/

23/10/2017 easyUML 16

You might also like