EclipseUML - Omondo - First Steps
(Free Web Tutorials)
by Michael Thomas
UML Home Page
On the UML Home page, you can download
the whole UML site (all content, tutorials & examples) !!!
(Note: in the subfolder "eclipse\workspace" you will find the
Eclipse projects used in these tutorials.)
This tutorial covers: EclipseUML 2007 JEE Europa Free Edition for
Eclipse 3.3 (3.3.0v20071210) (as of 05/18/08)
General Info
Briefly glance at this section and then move on to the install below.
- Quotes from Omondo's web site or install for EclipseUML
- Omondo UML Plugin for Eclipse Europa is a plugin for UML modeling in
Eclipse 3.3. It can be used both for creating new models and for reverse
engineering existing models. .
- Free edition has:
- UML2
- Class diagram (live synchronization between the
class diagram and the java code).
- Component diagram.
- Deployment diagram.
- Object diagram.
- Use-case diagram.
- Activity diagram.
- Statechart diagram.
- Sequence diagram.
- Collaboration diagram. (aka Communication
for UML2)
- Other diagrams
- Robustness diagram
- Profile diagram
- Free edition is missing the following UML2 Diagrams:
- Composite Structure diagram
- Package diagram
- Timing diagram
- Interaction Overview diagram
- Eclipse requirements: (Included in the Eclipse JEE install.)
GEF (Graphical Editor Framework) build GEF-ALL-3.3.1 (provided with the
EclipseUML plugin)
EMF (Eclipse Modeling Framework) build emf-sdo-xsd-SDK-2.3.1 (http://www.eclipse.org/emf)
UML2 build mdt-uml2-SDK-M200708301304 (http://www.eclipse.org/uml2)
- EclipseUML by Omondo -
Email: support@omondo.com
Web:
www.eclipseuml.com (this
redirects - www.omondo.com )
- For enhancements and other requests, please contact us at eclipseuml@omondo.com.
FYI - Possible Errors:
Prerequisites
- Eclipse (JEE install which has Eudora) is installed. (note: At the
Tutorials Home Page we have a tutorial for installing Eclipse for JEE.)
- JDK (1.5 or greater) is installed.
- Install size for EclipseUML is 204.2 MB
Objectives
- Install EclipseUML from Omondo (The Live UML Company)
Download & Install EclipseUML by Omondo
- Download the EclipseUML install file.
- Go to: www.eclipsedownload.com
or www.eclipseuml.com
- Click the "Download" tab then "Free Edition", "Eclipse 3.3", "For Java
EE Modelers"
- Note: "Java Modelers" vs "Java EE Modelers" - the "Java Modelers"
will work with the JRE but the Java EE Modelers must use JDK.5 or JDK 6.
- Download to any directory of your choice.
- You have 3 options: Windows and/or Linux, Windows Vista, Eclipse 3.3
plus EclipseUML.
- Choose the appropriate download.
For this tutorial we will install:
EclipseUML Free Installer for Windows and Linux:
- an auto-installer
jar file which contains EclipseUML Studio Edition, EMF, GEF and UML2.
Download filename:
eclipseUML_E330_2007_freeEdition_JEE_3.3.0.v20071210.jar - 180MB
- Shutdown Eclipse - I would make sure Eclipse is not running.
- Run the Jar File to begin the Install
- My preference is to create the following batch file in the same
directory as the JAR file and then run it.
Filename: eclipseUML_jar_install.bat |
java -jar
eclipseUML_E330_2007_freeEdition_JEE_3.3.0.v20071210.jar
pause |
- Language - on the first screen select your language.
- Introduction Screen: Click Next
- Information Screen: Read, then Next
- License Screen: Click to accept then Next.
- Eclipse install path: C:\eclipse
- Configuration Screen: Click Next.
- Installation Screen: Wait for the install to complete (about 5
min).
- When you see "[Finished]" click Next.
- Click Quit
- FYI Notes:
- To uninstall go to: c:\eclipse\Uninstaller
- Verify the install
- Start Eclipse
- Help->About Eclipse Platform->Plug-in Details.
- Check for the following:
- EclipseUML 2007 JEE Eruopa Free Edition for Eclipse 3.3 - and other
entries.
- EMF etc... - many entries
- Graphical Editing Framework - about 2 entries.
Download the EclipseUML Docs
Configure the Eclipse Window
- In the very top bar, click "Window", "Preferences"
- Expand the "UML" tree.
- Click on "UML". Use defaults and make sure you have the following:
- Note: This below is not necessary, just a preference.
It adds text under the
icons of the Diagram tool bar and slightly changes the display of the
diagrams.
- Click the "Appearance" tab.
- Toolbar: All Checked (Flat, with Image, with Text)
- Diagram presentation style: Eclipse
- Notation: UML2
- Click the "Diagram" tab
- Check: grid
(Note: Doesn't seem to work for some versions - no grid displays! -
Eclipse 3.3.2 & EclipseUML 2007 JEE Europa Free Edition )
- Optional: Set the default output folder to be: classes (not bin)
- Expand "Java", "Build Path".
- Click on "Build Path".
- Change the output folder to: classes
- Click "OK"
Create your First Hello World Diagram - Class Diagram
- Overview
- Create a class diagram. Then create a Company Class that is
associated to a Location Class.
-
Finished Class Diagram - view
the final class diagram you will create.
- Create a Java Project
- File, New, Project, select "Java Project" (under Java), click Next.
- Project Name: myuml-firststeps-hello-world
(Use all the defaults.)
- Click Finish
- Create a Java Package
- Select the "src" folder then "New", "Package"
- Name: myuml
- Click Finish
- Create your first Class Diagram - empty for now.
- Select "myuml" package then "New UML Diagram", "UML Class
Diagram"
- At the bottom select all presentation modes: Association, Inheritance,
Dependency.
Then use all the defaults
- Click Finish
- Create a Company Class
- Right click on the diagram screen, "New", "Class"
(Option: You can click on the "Create a Class" select icon, select "Class",
move your mouse to the diagram and click.)
- Name: Company
- Click Finish
- Create a "Name" attribute
- Right click on "Company", "New", "Attribute"
- Name: name
- Type: java.lang.String (select from the pull down)
- Visibility: private
- Accessors - we want "Use Accessors" and "public"
- Click OK
- Notice the "name" attribute has public getter/setter methods created
from clicking "User Accessors" and "public".
- FYI - If you want to see the Java code that is being created just double
click on the words "Company".
- Create a Location Class
- Following the concepts used to create the "Company Class" create a
"Location Class":
- Class Name: Location
- Attributes of type java.lang.String: name, address1, address2,
city, state, zip
- Create an Association between the "Company" class and the "Location"
class.
- In the "Class Diagram" tool bar, look for the "Association" icon (~7
icons from the left).
- Click the pull down selector and choose "Assocation".
- Now click on the "Company" class then click on the "Location" class.
- Notice that the multiplicity for the association is 0..1 locations to a
company. Later you may want to change this to be 0 .. many!
- Save your Diagram as an Image
- Click on a blank spot of the diagram.
- Right click, "Save As Image File", "JPEG".
-
Finished Class Diagram - view
the final class diagram you should have created.
- View the Java source code created by your Class Diagram.
- Your Finished !!!