Reuse Method Content: Extend a Role
The goal of this exercise is to extend base method content associated with a Role by using Extends Variability.
Extends variability works differently than contributes variability in that the method content element
that extends the base method element inherits the attributes of the extended base element.
- Switch back to the Authoring perspective.

- Create a new Content Package under My Plug-in.

Name the new plug-in "Extends Test".
Close the editor panel to save your changes.
- Create a new Role under the Extends Test content package.

Use these attributes for the new role:
- Name: my_extends_developer
- Presentation name: Extends OpenUP Developer
- Brief Description: Extends Role Brief Description
- Main Description Extends Role Main Description
- Use the Variability Type menu to select Extends
then click the Select... button.
The Select Dialog: Roles window will appear.
- Select the developer role and click OK.
This will be the base role that our customizations extend.
- Save the new role by closing the editor panel.
- Update the variability configuration to include the new content package
by doing the following:
- Double-click on the Variability Configuration icon
in the library view panel.
The configuration editor panel will appear.
- Click on the Plug-in and Package Selection tab.
- Expand My Plug-in, then Method Content,
then Content Packages.
- Uncheck Contribution Test.
- Make sure Extends Test is checked. This is done so there
that are no conflicting extensions to the same method element.
- Close and save the changes to the configuration.

- Now switch to Browsing perspective.

- In the Configuration View, select the Extends
OpenUP Developer in the Uncategorized Roles folder
under the Role Sets folder. You will see in the HTML page
that content entered in the extending role has been replaced, whereas content
not provided has been inherited from the base artifact. Note that the extended
role Developer remains unchanged.
Continue