Skip to main content
blob: 41bb3e024b1b567ae23e067214d6217dba963e6e (plain) (blame)
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""><html xmlns=""><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body><ol style="list-style: none;"><li><a href="#Requirements">Requirements</a></li><li><a href="#Use_Cases">Use Cases</a><ol style="list-style: none;"><li><a href="#UseCreateMenu">UseCreateMenu</a><ol style="list-style: none;"><li><a href="#How_to">How to</a></li></ol></li><li><a href="#Create_or_modify_ElementCreationModel">Create or modify ElementCreationModel</a><ol style="list-style: none;"><li><a href="#How_to_2">How to</a></li></ol></li><li><a href="#Generate_.22ElementCreationModel.22_from_a_profile">Generate "ElementCreationModel" from a profile</a></li><li><a href="#Hide.2C_change_order_or_add_submenus">Hide, change order or add submenus</a><ol style="list-style: none;"><li><a href="#How_to_3">How to</a></li></ol></li><li><a href="#Create_or_modify_ElementCreationModel_at_runtime_thanks_to_a_GUI">Create or modify ElementCreationModel at runtime thanks to a GUI</a></li></ol></li></ol><h1 id="Requirements">Requirements</h1><dl><dt>AddNewChild (id=newChild001):</dt><dd>Papyrus shall add in the menu new child for new customized elements by using extended type</dd><dt>HideElement (id=newChild002):</dt><dd>Papyrus shall not display all UML or SysML element creation</dd><dt>newChildFromProfile (id=newChild003):</dt><dd>Papyrus shall add the creation of new element from a subset of profile</dd><dt>newChildMenuDisplay (id=newChild004):</dt><dd>Papyrus shall be able to associate icons to folder or creation menu</dd><dt>RoleAndElementCreation (id=newChild005):</dt><dd>When an element can be created from several roles for a container, Papyrus shall let the possibility to choose the role or to let to the possibility to be created from all roles.</dd></dl><h1 id="Use_Cases">Use Cases</h1><p><img title="UseCaseDiagram" alt="UseCaseDiagram" border="0" src="UseCaseDiagram.png"/><br/></p><h2 id="UseCreateMenu">UseCreateMenu</h2><p>The Papyrus User shall use this functionality from the model explorer in order to create elements in the model. He can decide to display or not this element creation.</p><h3 id="How_to">How to</h3><p>In order to not display a menu,  a user can edit the model that represents the creation menu and set the attribute visibility to false. 
<img title="EnableCreationMenu" alt="EnableCreationMenu" border="0" src="EnableCreationMenu.png"/><br/></p><h2 id="Create_or_modify_ElementCreationModel">Create or modify ElementCreationModel</h2><p>An advanced User is able to create or modify creation menu. This menu is a model that can be edited </p><h3 id="How_to_2">How to</h3><p>An advanced user can contribute to the menu by adding a new plugin that contains:</p><ul><li>a xmi file that represents a creation menu. The model must be an instance of org.eclipse.papyrus.infra.newchild/resource/elementCreationMenuModel.ecore. It contains<br/><ul><li>CreationMenu<br/><ul><li>It corresponds to a menu<br/></li><li>The ElemenTypeIDRef corresponds a reference to the element Type.<br/></li><li>The role can be filled in order to specify the role play by the element.<br/></li><li>If displayAllRole is set to true, it displays all roles played by the element if the number of roles is greater than 1. By default this property is true;<br/></li></ul></li><li>Folder<br/><ul><li>It is possible to add owns label an icon.<br/></li></ul></li><li>Visibility to specify if the folder is visible.<br/></li></ul></li><li>a reference to an extension point, to specify that papyrus must take in account this file to display the menu<br/></li></ul><pre class="source-xml">&lt;extension

</pre><p>In the following example, a menu creation for a package is presented. This menu is contained in the folder SimpleUMLTest. We have associated an image for this menu.
<br/><img title="Creation menu for a package with a specific icon" alt="Creation menu for a package with a specific icon" border="0" src="PackageWithIconO.png"/><br/>
<br/><img title="Result for this menu" alt="Result for this menu" border="0" src="PackageWithIconOIllustration.png"/><br/></p><p>In this following example, a creation menu will be specified to allow creation of nested classifier. That 's why the role "nestedClassifier" is precised. The label for this creation is "nestedClass"
<br/><img title="Result for the menu nestedClass" alt="Result for the menu nestedClass" border="0" src="NestedClassifierIllustration.png"/><br/>
<br/><img title="Creation menu model for nested class" alt="Creation menu model for nested class" border="0" src="NestedClassifier.png"/><br/></p><p>In the following example a creation menu is created for activities. In this case, all roles are displayed. Thanks to this, when we want to associate an activity to a state, 3 roles are proposed. 
<br/><img title="Creation menu model for activity" alt="Creation menu model for activity" border="0" src="AllPossibleActivities.png"/><br/>
<br/><img title="Result for this menu activity" alt="Result for this menu activity" border="0" src="AllPossibleActivitiesIllustration.png"/><br/></p><h2 id="Generate_.22ElementCreationModel.22_from_a_profile">Generate "ElementCreationModel" from a profile</h2><p>From a stereotyped profile, a model of new child menu can be generated.
For example a user after designing a profile, want to have a dedicated menu  from this profile/
For the moment this function is not implemented.</p><h2 id="Hide.2C_change_order_or_add_submenus">Hide, change order or add submenus</h2><p>The User can modify the creation menu by adding submenus: order about new child menu, precise if the role must be displayed.</p><h3 id="How_to_3">How to</h3><p>It only needed to change the order of element in the corresponding creation menu model</p><h2 id="Create_or_modify_ElementCreationModel_at_runtime_thanks_to_a_GUI">Create or modify ElementCreationModel at runtime thanks to a GUI</h2><p>A user can edit a the model that represents the creation menu  at runtime for papyrus thanks to a dedicated UI.
For the moment this function is not implemented.</p></body></html>

Back to the top