Importing/Exporting Stereotypes
With the import/export stereotypes utility in VP-UML and SDE, you can easily share custom stereotypes with colleagues without having to configure them again from scratch. If conflicts are detected when importing stereotypes, you can select to resolve them to ensure important configurations are not accidentally overwritten by other team members.
Important Concepts
Stereotypes can be of two different scopes - workspace-based or project-based. When configuring stereotypes you are changing the workspace-based stereotypes. Once you applied a workspace-based stereotype to a model, this stereotype will be copied to the model’s project and become a project-based stereotype.
Importing/exporting of stereotypes also handles stereotypes by their scopes. When exporting stereotypes, stereotypes defined in the current workspace plus stereotypes used in the current project are exported. When importing stereotypes, stereotypes imported are compared with stereotypes in the current workspace or project depending on their scopes to check for added stereotypes or conflicts.
The Configure Stereotypes Dialog Box
To import/export stereotypes, first of all you need to open the Configure Stereotypes dialog box. Select menu Tools > Configure Stereotypes....
Exporting Stereotypes
Click
Export... in the
Configure Stereotypes dialog box. Specify the path of the exported file in the file dialog box.
The stereotypes are exported in
XML format. The picture below shows part of its content.
Importing Stereotypes
Click
Import... in the
Configure Stereotypes dialog box. Select an exported stereotypes file in the file dialog box.
After importing stereotypes, if new stereotypes are found, they are automatically added to the current workspace or project according to their scopes.
If the same stereotypes are found but their model properties are different, conflicts are said to occur and the
Resolve Import Stereotypes Conflicts dialog box shows. Select
Overwrite to let imported stereotype replace existing one, or select
Unchanged to keep the existing one unchanged.
Stereotypes are added and/or overwritten from the imported file. Note that importing stereotypes will never delete stereotypes in the current workspace or project.