Enterprise Architect has comprehensive support for Delphi properties. These are implemented as Tagged Values, with a specialized property editor to help create and modify Class properties. The Class image below illustrates the appearance of a Delphi Class that has had properties added to it. These are stored as Tagged Values, and by using the Feature Visibility element context menu option, you can display the 'tags' compartment that contains the properties. Imported Delphi Classes with properties have this feature automatically made visible for your convenience.
When you use the Create Property dialog from the Attribute screen, Enterprise Architect generates a pair of Get and Set functions, together with the required property definition as Tagged Values. You can manually edit these Tagged Values if required.
To manually activate the property editor
- Ensure the Class you have selected has the code generation language set to Delphi
- Right-click on the Class and select the Delphi Properties context menu option to open the editor.
The Delphi Properties editor enables you to build properties in a simple and straightforward manner. From here you can:
- Change the name and scope (only Public and Published are currently supported)
- Change the property type (the drop-down list includes all defined Classes in the project)
- Set the Read and Write information (the drop-down lists have all the attributes and operations from the current Class; you can also enter free text)
- Set Stored to True or False
- Set the Implements information
- Set the Default value, if one exists.
- Only Public and Published are supported
- If you change the name of a property and forward engineer, a new property is added, but the old one must be manually deleted from the source file.