Notebook Enterprise Architect

Alex van Buitenen, aug 2009

This is NOT a  tutorial nor a Quick reference for Enterprise Architect.
It is just my personal note book for Enterprise Architect.

Contents:

Set collection classes
Set language to C#
    in Tools, Options
    in Package, Properties
Reverse Engineering
    import complete source directory
    import from one source file
Updating a class in a diagram
Model an Object instance

Showing the diagram in another program

User experience

 

Set collection classes.

Setting Collection Classes (for forward engineering).

Fig 1. Setting Collection Classes (for forward engineering).

 

Set language to C#.

Set language to C# as soon as possible to prevent all classes from having "Java" as default.

in Tools, Options:

Setting the language in Tools,Options.

Fig. 2. Setting the language in Tools, Options.

In Package, Properties:

Setting the language by rightclicking a Package, Properties.

Fig.3. Setting the language by right clicking a Package, Properties.

Reverse Engineering.

Import complete source directory.

right click a package and choose "Code Engineering"," Import Source Directory".

 Importing a source directory.

Fig. 4. Importing a source directory.

Import from one source file.

Right click the diagram surface and choose "Import from source files"

Importing a source file.

Fig. 5. Importing a source file.

Updating a class in a diagram.

Select a class and choose "Synchronize with Code (or press F7).

Fig 6. Synchronizing with code.

Sometimes the connection between the diagram and the source code gets lost (for instance, when you rename a source file).
To restore the connection, choose "Generate Code...", the following Dialog pops up:



Fig 7. The "Generate Code" dialog.
Do NOT Press The Generate button, this will overwrite your source file!
(this scenario presumes you are not doing round-trip engineering)

Press the "..." button, and browse to the proper source file.
Choose "Save" in the "Generate Code" dialog box, then close the dialog box.

Model an Object instance.

Use a Composite Structure Diagram.
Drag a "Part" to the surface.
Use "Set Property Type" to set the type, then
use "Set Property Values' to set the values.

Modeling an Object instance in a Composite Structure diagram.

Fig. 6. Modeling an Object instance in a Composite Structure diagram.

Showing the diagram in another program.

Use Diagram, Save image. Save as jpg and import in other program.

Setting the Filename

User Experience.

I used several UML packages in the past years:

Only Rational XDE and Enterprise architect offered the possibility to update the diagrams from the source files (or even do round-trip engineering).
For Visual Studio 2005 I use Enterprise Architect, which works very well and is relatively cheap. (see http://www.sparxsystems.com)