Reuse Method Content: Replace a Role
The goal of this exercise is to extend base method content associated with a Role using Replace variability.
- Switch back to the Authoring perspective.

Create a new Content Package in the My Plug-in plug-in.
Name the new content package "Replace Test".
Save your changes by closing the editor panel.
- Create a new Role in the content package we just created.

Use these attributes for the new role:
- Name: my_replace_developer
- Presentation name: My Replace Developer
- Brief description: Replace Brief Description
- Main description: Replace Main Description
- Use the Variability Type menu to select Replaces
then click the Select... button in this section.
The Select Dialog: Roles window will appear.

- Select developer to be the base role.
Click OK to save changes and close the selection window.
- Save your changes by closing the role editor panel.
- Update the Variability Configuration by doing the following:
- Double-click on the Variability Configuration icon
in the library view panel.
The configuration editor will appear.
- Expand My Plug-in >
Method Content > Content Packages.
- Uncheck Extends Test.
- Check Replace Test. This is done so there are no conflicting
extensions in the same method element.
- Close the configuration editor panel to save your changes.

- Now switch to the Browsing perspective.

- In the configuration view you will see that there is no
longer a Developer role in the Role Sets folder.
It was replaced by the My Replace Developer role.
Moreover, other content elements in the base plug-in that referenced the Developer
role now reference the replacing role instead (e.g., if you open the disciplines
folder and view the task Design Solution you will see that
the Performing Role is now My Replace Developer.)
Replace works in a similar way for tasks,
Artifacts, Guidance and Categories
(feel free to try it out).
End of Tutorial