Reuse Method Content: Replace a Role

The goal of this exercise is to extend base method content associated with a Role using Replace variability.

  1. Switch back to the Authoring perspective. authoring icon
  2.  

  3. 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.

  4.  

  5. Create a new Role in the content package we just created.
  6.  

    new role created under Replace Test

     

  7. Use these attributes for the new role:

     

  8.  

  9. Use the Variability Type menu to select Replaces then click the Select... button in this section. The Select Dialog: Roles window will appear.
  10.  

    role selection window

     

  11. Select developer to be the base role. Click OK to save changes and close the selection window.
  12.  

  13. Save your changes by closing the role editor panel.
  14.  

  15. Update the Variability Configuration by doing the following:
  16.  

    variability configuration panel

     

  17. Now switch to the Browsing perspective. browsing perspective button
  18.  

  19. 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