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 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.
Note: 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
|1.||Ensure the Class you have selected has the code generation language set to Delphi|
|2.||Right-click on the Class and select the 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 and are currently supported)|
|·||Change the property type (the drop-down list includes all defined classes in the project)|
|·||Set the and information (the drop-down lists have all the attributes and operations from the current class; you can also enter free text)|
|·||Set the value, if one exists.|
Note: Public properties are displayed with a '+' symbol prefix and published with a '^'.
Note: When creating a property in the Property Wizard (accessed through the Attributes dialog), you can set the scope to Published if the property type is Delphi - see the example below.
|·||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.|