Notes on Source Code Import

Enterprise Architect enables you to import code into your project, in the following programming languages:

Enterprise Architect supports most constructs and keywords for each coding language.

If there is a particular feature you require support for that you feel is missing, please contact Sparx Systems.

You must select the appropriate type of source file for the language, as the source code to import.

ActionScript

Appropriate type of source file:   .as.

C

Appropriate type of source file:   .h header files and/or .c files.

When you select a header file Enterprise Architect automatically searches for the corresponding .c implementation file to import based on the options for extension and search path specified in the C options.

Enterprise Architect does not expand macros that have been used, these must be added into the internal list of Language Macros.

C++

Appropriate type of source file:   .h header file.

Enterprise Architect automatically searches for the .cpp implementation file based on the extension and search path set in the C++ options. When it finds the implementation file it can use it to resolve parameter names and method notes as necessary.

When importing C++ source code, Enterprise Architect ignores function pointer declarations. To import them into your model you could create a typedef to define a function pointer type, then declare function pointers using that type. Function pointers declared in this way are imported as attributes of the function pointer type.

Enterprise Architect does not expand macros that have been used; these must be added into the internal list of Language Macros.

C#

Appropriate type of source file:  .cs.

Delphi

Appropriate type of source file:  .pas.

Java

Appropriate type of source file:   .java.

Enterprise Architect supports the AspectJ language extensions.

ImportJava_Asspect

Aspects are modeled using Classes with the stereotype aspect. These aspects can then contain attributes and methods as for a normal Class. If an intertype attribute or operation is required, you can add a tag className with the value being the name of the Class it belongs to.

Pointcuts are defined as operations with the stereotype of pointcut. These can occur in any Java Class, Interface or aspect. The details of the pointcut are included in the behavior field of the method.

Advice is defined as an operation with the stereotype advice. The pointcut this advice operates on is in the behavior field and acts as part of the method's unique signature. After advice can also have one of the Tagged Values returning or throwing.

PHP

Appropriate type of source file:   .php, .php4, or .inc.

Python

Appropriate type of source file:   .py.

Visual Basic

Appropriate type of source file:   .cls Class file.

Visual Basic .NET

Appropriate type of source file:   .vb Class file.