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

Contents
Prev Next

Create Properties

You can configure Enterprise Architect to automatically create properties in the modeled code in any of the programming languages that the system supports. You control property creation from the 'Attributes' page of the 'Features' dialog. Each language has slightly different syntax and generates slightly different results:

  • Java and C++ generate get and set functions
  • C# and VB.Net create property functions
  • Delphi creates get and set functions as well as a specialized Delphi property Tagged Value

Access

Ribbon

Design > Element > Attributes

Context Menu

Right-click element in diagram | Features and Properties | Attributes  or

Right-click element in Project Browser | Attributes

Keyboard Shortcuts

F9

Configure Properties for an attribute

Step

Action

See also

1

In the list of attributes, click on the attribute for which to configure property creation.

2

In the lower left panel of the dialog page, click on the 'Property' field and on the button.

The 'Create Property Implementation' dialog displays.

3

The 'Language' panel defaults to the radio button for the language defined in the Class properties; however, you can click on any other radio button to select another language for which to configure property creation.

Each language enables its own combination of fields in the 'Property Details' panel.

4

The 'Name' field defaults to the name of the attribute. If necessary, you can overtype this with a different name.

Select the checkboxes or values from drop-down lists for these fields as required (and if available) to define the property for the selected programming language:

  • By Ref
  • Stereotype
  • Get Scope
  • Set Scope
  • Published
  • Read
  • Write
  • Abstract

5

Click on the OK button

The system generates the required operations and properties to comply with the selected language.

Notes

  • Get and Set functions have the stereotypes «property get» and «property set», making it easy to recognize property functions in the operations compartment of the element on a diagram; you can also hide these specialized functions on a specific diagram, by deselecting the 'Property Methods' checkbox on the 'Features' page of the 'Diagram Properties' dialog, which then makes it easier to view the Classes uncluttered by many get and set methods
  • For the Delphi programming language, enable the Tagged Values compartment to see the generated property Tagged Value

Learn more