blob: 845ce438225a61a0376d9fbc6c95af589081fb6e [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!--
Copyright (c) 2005, 2006 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors:
IBM Corporation - initial implementation
-->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 {font-family: "Courier New", Courier, mono}
-->
</style>
</head>
<body>
<h2><a>Exercise 4: Extending base method content associated with a role using <u>Extends</u> </a></h2>
<p>The purpose of this exercise is to extend base method content via 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. </p>
<ol>
<li>
<p> Switch to the <strong>Authoring </strong> perspective. </p>
</li>
<li>
<p> Create a new <strong>Content Package </strong> in the My Plugin Plug-in called Extends Test. </p>
</li>
<li>
<p> Create a new <strong>Role </strong>: <span class="style1">my_extends_ui_designer,</span> with the presentation name, <span class="style1">Extends RUP UI Designer</span>. </p>
</li>
<li>
<p> In the Variability Type select <strong>Extends </strong> and choose the base role: <span class="style1">rup_user_interface_designer</span>. </p>
</li>
<li>
<p> Add a <strong>Brief Description</strong>: Extends Role Brief Description. </p>
</li>
<li>
<p> Add a <strong>Main Description </strong>: Extends Role Main Description. </p>
</li>
<li>
<p> Save the new role by closing the role editor. </p>
</li>
<li> Update the Variability Configuration to include the new content package. </li>
<blockquote>
<p> &#149;&nbsp;Open the <span class="style1">Variability Configuration</span> and expand <strong>My Plugin &gt; Method Content &gt; Content Packages. </strong> </p>
<p>&#149; Uncheck Contribution Test. </p>
<p>&#149; Make sure <strong>Extends Test </strong>is checked. This is done so there that are no conflicting extensions to the same method element. </p>
<p>&#149; Close and save the changes to the configuration. </p>
</blockquote>
<li>
<p> Switch to <strong>Browsing </strong> perspective. </p>
</li>
<li> In the <strong>Configuration View</strong>, select the <span class="style1">Extends RUP UI Designer role</span> in the Uncategorized Roles folder under the “<strong>Role Sets</strong>” 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 <span class="style1">User-Interface Designer</span> remains unchanged. </li>
</ol>
</body>
</html>