Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Initial Code

Access    Project Browser Operation context menu | Operation Properties | Behavior




See also


On the Behavior page of the Operations dialog, use the Initial Code field to enter code to be inserted into an operation body when the operation is first generated to file.

After this point, forward code generation and synchronization do not replace the existing operation code with the Initial Code field.

By default, the Initial Code field also is not imported into the model during reverse engineering, but you can select to import the field by selecting the Include method bodies in model when reverse engineering checkbox on the Options dialog.

This field is most useful when combined with Design Patterns; elements within a pattern often require the same stub code.

Notice that the language-specific patterns available from include initial code for some of the defined operations; this helps speed up the process of applying patterns from model to implementation.

The Initial Code section is also useful for ensuring that the generated code is directly compilable.


Options- Attributes/Operations

Design Patterns