The goal of this exercise is to extend a role by adding a contribution.
- Switch to the Authoring perspective if you are not already using
it.
- Expand my_plug-in until you see the Content Packages node.
Right-click this node to create a new content package called "Contribution
Test". Save your changes by closing the editor window after you name the new
content package.
- Right-click the Roles folder and select New > Role.
- Use the following attributes for this new role:
- Name: my_contributing_architect
Do not close the editor window yet because we have not finished defining
this role.
- Scroll down the window to the Content Variability section
and use the Variability type menu to select Contributes.
- Click Select for this section. The Select Dialog: Roles
window opens. Choose the base role architect. You will find this in
the core.default.role_def.base plug-in. Click OK to complete the selection. You can
now continue using the role editor. The Content Variability section
should look like this:
- Add some sample text to the Brief description and Main description
fields.
- Brief description: Contributing brief description text
- Main description: Contributing main description text
These are the text strings that we will look for later in this exercise.
Save your changes by closing the role editor.
- In the Library view under Configuration, double-click my.basic.configuration to
open it.
- Click the Plug-in and Package Selection tab. Make sure that base under core
> default > role_def package and the method plug-in that we created earlier
(my_plug-in) are selected. Save the new configuration by closing the
editor window.
- Use the configuration selection pull-down menu to select my.basic.configuration.
- Switch to the Browsing perspective and then open the Architect role
in the configuration panel. It is in the Role Sets > Basic Roles folder. 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.
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.