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
Fig 1. Setting Collection Classes (for forward engineering).
Set language to C# as soon as possible to prevent all classes from having "Java" as default.
Fig. 2. Setting the language in Tools, Options.
Fig.3. Setting the language by right clicking a Package, Properties.
right click a package and choose "Code Engineering"," Import Source Directory".
Fig. 4. Importing a source directory.
Right click the diagram surface and choose "Import from source files"
Fig. 5. Importing a source file.
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.
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.
Fig. 6. Modeling an Object instance in a Composite Structure diagram.
Use Diagram, Save image. Save as jpg and import in other program.
Setting the Filename
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)