Reuse Method Content: Contribute to a Role

The goal of this exercise is to extend a role by adding a contribution.

  1. Switch to the Authoring perspective if you are not already using it. authoring perspective button
  2.  

  3. Create a new content package in My Plug-in called "Contribution Test".
  4.  

    new content package

     

    Save your changes by closing the editor window after you've named the new content package.

     

  5. Open the new content package folder. Notice how it is already populated with four standard subfolders.
  6.  

  7. Create a new role uder the Roles folder.
  8.  

    new role created in tree browser

     

  9. Use the following attributes for this new role:

     

     

    Don't close the editor window yet because we're not finished defining this role.

  10.  

  11. Scroll down the window to the Content Variability section and use the Variability Type menu to select Contributes.
  12.  

    changing variability settings

     

  13. Click on the Select... button for this section. The Role Selection window will appear. Choose the base role architect. You will find this in the openup_basic plug-in.

     

    role selection window

     

    Click OK to complete the selection. You can now continue using the role editor. The Content Variability section should look like this:

     

    content variability section set to architect

     

  14. Add some sample text to the Brief description and Main description fields.

     

    These are the text strings we will look for later in this exercise.

    Save your changes by closing the role editor.

  15.  

  16. Now create a new configuration by selecting the Configurations folder and selecting New then Method configuration. Name the configuration "Variability Configuration".

  17.  

    new configuration created in library view

     

  18. Click on the Plug-in and Package Selection tab. Select the base_concepts, openup_basic base and your plug-in (My Plug-in) by marking the checkboxes.

     

    plugin selection dialog box for new configuration

     

    Save the new configuration by closing the editor window.

  19.  

  20. Use the configuration selection pull-down menu to Variability Configuration.

  21.  

  22. Switch to the Browsing perspective and then open the Architect role in the configuration panel.

     

    configuration view shows architect role

     

    You should see the text that you included in the contributing role appended to the existing brief description of this role at the top of the page. This is how contributing variability works: it appends text to the base element.

  23.  

    architect role shows text appended to brief description

     

Note: The configuration view resolves variability relationships between related plug-ins in a configuration and shows the results as they will be published in a published web site.

 

Continue