There are basically two different kinds of EA models: either they are stored in local eap-files or in remote database repositories such as a MSSQL database.
Eap-files can directly be accessed within Eclipse, e.g. by copying a file into a project of the current workspace. The file extension eap is automatically registered for the default EA UML Editor as shown in the figure below.
Instead of placing eap-files physically into your workspace projects, they can also be linked into the workspace whereas the physical files are located somewhere else on your file system. To do so, choose File -> New -> File -> press Advanced and select Link to file in the file system -> Browse to your eap-file -> choose a location and name for the link in your workspace.
Within the Eclipse Project Explorer, linked files will be shown with a link-arrow decorator on the file icon, as shown in the screenshot below.
The YAKINDU EA-Bridge also ships an own New EAP File wizard (via File - New - Other... - YAKINDU EA-Bridge) for creating new EA models as shown in the screenshot below. Here, in addition to the file location (relative to the workspace root), the Default Language must be specified. It will be the default Code Engineering Language in EA, which maps to a corresponding primitive types library in Eclipse (more details here).
Besides local eap-files, the Enterprise Architect allows to store its models in a remote database systems (MSSQL, MySQL, Oracle, and others). The YAKINDU EA-Bridge also supports access to such remote database systems if the corresponding database driver feature is installed. A list of all installed drivers is shown in the preferences page Window - Preferences - YAKINDU EA-Bridge - Database Drivers.
The Microsoft JDBC Driver 4.0 may not be redistributed, but it can easily be added manually.
It must be downloaded from the Microsoft Download Center and the file sqljdbc4.jar
, which is contained in the downloaded archive, must be copied to: <eclipse folder>/plugins/com.yakindu.bridges.ea.core.mssql-fragment_<version>/lib/
That target folder also contains a readme.txt file with instructions how to install the Microsoft MSSQL driver.
Each database driver ships a wizard for creating a configuration file as illustrated for an MSSQL database configuration in the screenshot below.
The newly created database configuration file (sample.mssql.eap in the example above) can then be accessed by the YAKINDU EA-Bridge the same way as normal eap-files.
The YAKINDU EA-Bridge loads EA models as regular UML2 models, so the regular UML Model Editor can be used to open EA models. It is the default editor for eap-files, so double-clicking eap-files within the Eclipse workspace should open the UML Model Editor. Alternatively, it can be opened via the context menu Open With - UML Model Editor.
By default, the editor loads all stable supported UML model elements including profiled UML models. Additional UML libraries are loaded (lazily) into the resource set as shown at the bottom in the figure above:
example.profile.uml
*.profile.uml
UML.metamodel.uml
example.library.eap
*.library.uml
Write support is restricted, so it is disabled by default but can be enabled in the preferences. The creation and deletion of most supported UML elements and the modification of their properties works fine whereas certain UI operations such as moving elements are not yet properly supported and may yield undefined results. Please keep in mind that the primary use case of the YAKINDU EA-Bridge should be to read and process EA models programmatically - the Enterprise Architect should remain the main authoring tool for EA models. Therefore, the main use case for the default UML Model Editor is to validate and review EA models, maybe to perform minor model changes. Programmatic creation and modification of EA models (like code generation, model transformation, or model validation), on the other hand, works fine if you follow the guidelines in the API section.
The YAKINDU EA-Bridge has preference pages that provide options to configure its behavior. The individual options are briefly explained here and, if needed, explained in detail in further sections.
The Database Drivers preference page is explained in the Installation section.
There are further UML-specific options in the preference page UML as shown below.
Float
is entered for one of its attributes, then it is only resolved correctly if this option is enabled. However, if you have an equally-named type in your model which should be used as type, this setting might lead to a mismatch.Port.isConjugated()
is true, it is a required interface, if it is false, it is a provided interface. However, the Enterprise Architect has explicit (non-UML) elements to specify provided/required interfaces, independent of the actual port type. If there is a single such provided/required interface modeled, and the actual port type is unset, then this interface is loaded as port type be the YAKINDU EA-Bridge. This boolean option specifies, whether the conjugated flag should also affect such a single provided/required interface (this option is true
) or not (this option is false
).Most of these options can also be set as resource load options for programmatic access (more details in load options section).
UML Profiles can be loaded from multiple locations; the default locations used by Enterprise Architect installations are enabled by default.
The UML concepts to be supported by the YAKINDU EA-Bridge can be restricted. This is useful because the disabled parts will not be loaded (which saves time) nor validated (which will avoid error reporting on these parts). The YAKINDU EA-Bridge is very often used to validate structural models e.g. for code or report generation. Typically, only specific parts of an EA model are relevant for this, so some UML concepts and/or specific packages may be excluded as described below.
EABridge-hidePackage
set to true
are not loaded by the YAKINDU EA-Bridge. Please note that this could lead to inconsistent models, e.g. if the hidden package contains cross-reference targets. Hidden packages can be shown again via the context menu on the parent package as explained below.The nested UML preference page Extensions controls further EA-specific concepts that are not part of the UML standard. They are described below in the #Extensions section.
The YAKINDU EA-Bridge provides additional EA-specific actions on EA models and their model elements.
The context menu on eap-files provides an action to open the Enterprise Architect with the selected file. This does only work on the Windows platform with the Enterprise Architect being installed.
The YAKINDU EA-Bridge may - dependent on the preferences - create resource markers for all loading errors (more details below). Since there is no automated background job that cleans up these error markers in case the model has been fixed, this action may be used to remove all these error markers. If there are still errors in the model, the resource markers may of course re-appear when the EA-model is loaded the next time.
The action Open EA and Select Element in Project Browser on EA model elements is only available on the Windows platform with the 'EA Integration' feature and the Enterprise Architect being installed. This action opens the Enterprise Architect with the current model (if it is not already open) and selects the currently selected model element in the EA Project Browser.
The action Get Selected Element in EA Project Browser on EA model elements is also only available on the Windows platform with the 'EA Integration' feature and the Enterprise Architect being installed. This action asks a running Enterprise Architect instance for currently selected model element in the EA Project Browser and selects the same element inside the Eclipse UML Editor.
Each EA project has a default code engineering language configured (in EA, select Tools - Options - Source Code Engineering - Default Language for Code Generation).
In addition, each EA element (roughly corresponding to sub-types of the UML meta class Classifier
) may individually refine its code engineering language in its properties dialog as shown below.
The important implication of that setting is the drop-down list of primitive types in all child elements; e.g. if the language of a Class is set to C++, then the available primitive types in all owned attributes are only C++ types.
Keep in mind that the consequence of changing the language for an element affects all uses of primitive types in its child features.
For example, if the language of Class1 in the figure above is changed to Delphi, then type int
of the attribute becomes invalid.
The Enterprise Architect does not validate that error; but the EA-Bridge does and produces a load error that will be promoted as explained in the error handling section.
Packages may be hidden such that they are not loaded anymore by the YAKINDU EA-Bridge.
This is useful if the contents of particular packages is not of interest, e.g. because they contain documentation that is not relevant when processing the EA model in Eclipse.
A package is hidden if it has the tagged value EABridge-hidePackage set to true
.
The action for hiding/un-hiding packages is only available on packages.
The eap-file must be opened with write access to be able to write tagged values (can be enabled in the preferences).
The YAKINDU EA-Bridge comes with a flexible extension mechanism that e.g. allows to represent EA-specific properties via EMF model annotations. All extensions are listed in the Extensions preference page and explained next.
UML profile and stereotype handling in the Enterprise Architect does not follow the UML convention, so it is possible to apply an arbitrary stereotype to an element regardless of whether they are defined in a profile or not. The correct way to apply stereotypes to EA elements is via the '...' button next to the stereotype text field in an element's property page, selecting a profile and stereotype as shown in the screenshot below.
If the stereotype is not properly set with the '...' dialog (e.g. the stereotype name is manually typed into the text field), it is stored in the database without the information to which profile it might belong. This is where the Stereotype Resolution strategies come into play. Whenever stereotypes are found for an EA element, these strategies work as follows.
Please note that additional strategies may be contributed (more details in API section).
There are a couple of EA-specific properties that are not part of the UML standard as already discussed in the introduction. The YAKINDU EA-Bridge ships with extensions that can load several of these properties as EMF annotations in the UML model. Examples are Fixed Value for parameters and Transient for attributes as shown in the UML Model Editor in the screenshot below. Please do not hesitate to contact us via email if you need access to further EA-specific properties.
Furthermore, the YAKINDU EA-Bridge ships extensions to load EA requirements as model annotations and/or as stereotyped classes with stereotype properties as shown in the figure above.
Each of these extensions can be enabled or disabled via the preferences. It is also possible to contribute additional custom extensions, as explained here.
In case the YAKINDU EA-Bridge is not able to load or save an EA model to construct a proper UML model for it, so-called load or save errors occur. The preference settings Abort on first error, Report errors to Eclipse Error Log, and Report loading errors as Resource markers for the eap-file specify how such errors are handled. The following combinations are possible:
The latter two reporting options can be combined. It is also possible to deactivate error reporting entirely, but then there is no indicator anymore whether the model is loaded/saved correctly.
These options can also be used as resource load options for programmatic access (as explained here).
The default UML Model Editor also shows load errors and warnings in its Problems tab. It is still possible to switch back to the Selection tab to browse the loaded model. The button Open with Text Editor opens a read-only text editor with a database dump of the EA database contents for low-level review of the model.