Tutorial: Create Reusable Method Content
Exercise: Replace a Role
The goal of this exercise is to extend base method content associated with a Role using Replace variability.
- Switch to the Authoring perspective.
- Create a new Content Package named "Replace Test" in the My Plugin plug-in.
- Create a new Role named "my_replace_ui_designer role"
with presentation name "My Replace UI Designer".
- In the Variability Type select replaces and then choose the base role : rup_user_interface_designer.
-
Add a Brief Description: Replace Brief Description.
- Add a Main Description: Replace Main Description.
- Save the role by closing the Role editor.
- Update the Variability Test Configuration:
- Open the Variability Configuration and expand My Plugin > Method Content > Content Packages.
- Uncheck Extends Test.
- Check Replace Test.
This is done so there are no conflicting extensions in the same method element.
- Switch to the Browsing perspective.
- In the Configuration View you will see that there is no longer
a User-Interface Designer role in the Role Sets folder.
It was replaced by My Replace UI Designer role.
Moreover, other content elements in the base plug-in that referenced the
User-Interface Designer role now reference the replacing role instead
(e.g., if you open the disciplines folder and view the task Design The User Interface
you will see that the Performing Role is now My Replace UI Designer.)
Replace works in a similar way for tasks,
Artifacts , Guidance and Categories
(feel free to try it out).
End of Tutorial