Replace a role
The goal of this exercise is to extend base method content
associated with a role using Replaces variability.
Procedure
- Switch back to the Authoring perspective.

- Create a new content package in My 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 that we just created.
- Use these attributes for the new role:
- Name: my_replace_tester
- Presentation name: My Replace Tester
- Brief description: My replaced brief description
- Main description: My replaced main description
Tip: If the Link name with presentation name for new method element option in Preferences is selected, typing a presentation name will auto-generate the name field. - Use the Variability type menu to select Replaces then click Select in this section. The Select Dialog: Roles window opens.
- Select rup_tester 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 My Basic Configuration by doing the following:
- Double-click the My Basic Configuration icon in the Library view panel. The configuration editor opens.
- In the Plug-in and Package Selection tab expand my_plug-in > Method Content > Content Packages.
- If they are checked, clear all.
- Check replace_test. This should be the only content package selected in my_plug-in. This is done so that 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.

- Expand Role Sets > Roles > Testers.
In the Configuration view you will see that there is no rup_tester role in the Testers folder. It was replaced by the My Replace Tester role.
Also notice that other content elements in the base plug-in that referenced the rup_tester role now reference the replacing role instead. If you open the Test discipline under the Disciplines folder and view the task Implement Test, you will see that the Primary Performer is now My Replace Tester. Replace works in a similar way for tasks, artifacts, guidance and categories.
Feedback