Extension Files

Extensions files (*.xem) provide means for customizing and extending PowerDesigner metaclasses, parameters and generation. You can use extensions to define additional properties for existing object types or entirely new kinds of objects, to modify the PowerDesigner interface (reorganizing and adding property sheet tabs, Toolbox tools and menu items), and to define additional generation targets and options.

PowerDesigner provides a number of predefined extension files and you can also create your own. Each extension file contains two first-level categories:

You can review and edit the profile in a resource file by opening it in the Resource Editor and expanding the top-level Profile category. You can add extensions to a metaclass (a type of object, such as Class in an OOM or Table in a PDM), or to a stereotype or criterion, which has previously been defined on a metaclass:



In the example above:

Extensions are inherited, so that any extensions made to a metaclass are available to its stereotyped children, and those that are subject to criteria.



Thus, in the example above, classes that bear the MyStereotype stereotype have available the Attribute_5 extended attribute, and those that bear this stereotype AND meet AnotherCriterion have Attribute_4 and Attribute_5 available.

Note: Since you can attach several resource files to a model (for example, a target language and one or more extension files) you can create conflicts, where multiple extensions with identical names (for example, two different stereotype definitions) are defined on the same metaclass in separate resource files. In case of such conflicts, the extension file extension usually prevails. When two XEMs are in conflict, priority is given to the one highest in the list.