Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html')
-rw-r--r--plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html1
1 files changed, 0 insertions, 1 deletions
diff --git a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html b/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html
deleted file mode 100644
index f097c3ec210..00000000000
--- a/plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body><h1 id="Viewpoints_in_Papyrus">Viewpoints in Papyrus</h1><h2 id="Introduction">Introduction</h2><p>Viewpoints in Papyrus enable the specialization and customization of the user experience by constraining what can be seen and interacted with in Papyrus diagrams and tables. Viewpoints can be used for the following purposes in Papyrus:</p><ul><li>Constrain the set of diagrams and tables that are available to a particular class of users</li><li>Define new kinds of diagrams with custom names, icons, figures and palette in order to implement domain-specific views in Papyrus, based on the classical UML and SysML diagrams.</li></ul><h2 id="Configuration_Options_for_Viewpoints">Configuration Options for Viewpoints</h2><p>At any given time, there can only be one viewpoint that is currently applied to an Eclipse instance. Users are free to select any viewpoint that is provided to them. Papyrus itself comes with a default viewpoint that is automatically selected when to other viewpoint is specified.</p><p>All the viewpoints-related configuration options available to the users are provided in the <i>Papyrus &gt; Viewpoints Configuration</i> preference page of Eclipse:</p><p><img border="0" src="captures/preferences.png"/></p><p>The first available option is the <i>Configuration selection</i>. It determines how the current viewpoint is selected. The possible options are:</p><ul><li><b>Default (Papyrus built-in configuration)</b>. This option forces the selection of the default viewpoint provided by Papyrus. This default viewpoint exposes all the UML and SysML diagrams and tables implemented in Papyrus and does not restrict their use.</li><li><b>Deployed through the extension point</b>. This option allows Papyrus to choose the viewpoint with the highest priority provided through the appropriate extension point. This option is typically chosen when 3rd party viewpoints are provided through the extension point. In this way they are automatically applied. When no custom viewpoint is provide through the extension point the default Papyrus viewpoint is applied instead.</li><li><b>Manual configuration selection</b>. This option allows the user to force the application of a specific viewpoint that is manually selected. When this option is chosen the second part of the preference page becomes available. The appropriate configuration file containing the viewpoint can be selected through 3 possible schemes:<ul><li><b>Absolute path</b>: The absolute path a file in the local file system.</li><li><b>Workspace file</b>: The selection of a file in the current Eclipse workspace</li><li><b>Embedded in a plugin</b>: The selection of a file contained within a plugin that has been loaded by the current Eclipse instance.</li></ul></li></ul><p>In the case where multiple viewpoints are available through the current configuration options as explained above the specific viewpoint to be applied can be chosen through the two drop-down lists:</p><ul><li><b>Stakeholder</b>. The class of user that is associated to a list of possible viewpoints.</li><li><b>Viewpoint</b>. The viewpoint will be applied. The list is populated based on the Stakeholder field.</li></ul><p>In addition, the checkbox <b>Multiplicity</b> can be activated so that at most one diagram or table of the each kind defined in the applied viewpoint can be created for each model element. For example, at most one class diagram per package, etc.</p><p>It is possible at any time to see the details of the diagrams and tables offered by the currently used viewpoint in the <i>Viewpoint Explorer</i> view in Eclipse. This view is available in <i>Window &gt; Show View &gt; Other</i>, and then selecting <i>Papyrus &gt; Viewpoint Explorer</i>.</p><p><img border="0" src="captures/explorer.png"/></p><p>This view summarizes the currently available diagrams and tables, as well as the conditions for their availability.</p><h2 id="Viewpoints-Related_UI_Elements">Viewpoints-Related UI Elements</h2><p>The application of a viewpoint has some impacts on the following UI elements in Papyrus:</p><ul><li>The diagram selection window in the <b>New Model</b> wizard is populated with only the diagrams and tables that are available in the current viewpoint.</li><li>The <b>New Diagram</b> and <b>New Table</b> contextual menus for the model elements provides only the diagrams and tables that are available in the current viewpoint and are applicable to the currently selected model element. For example, when a UML Activity is selected, the <b>New Diagram</b> context menu will not offer to create a Package diagram, or a class diagram.</li><li>The same holds for the toolbar elements for the creation of diagrams and tables.</li><li>The diagrams properties show the following information:</li></ul><p><img border="0" src="captures/properties.png"/></p><ul><li><b>View Type</b> is the qualified name of the diagram’s type. It gives an indication of which viewpoint is providing it.</li><li>The <b>Owner</b> attribute is the model element that syntactically contains the diagram in the model explorer. It can be different from the root element.</li><li>The <b>Root</b> element attribute is the model element that is the diagram’s root semantic element.</li></ul><h2 id="Definition_of_New_Viewpoints">Definition of New Viewpoints</h2><p>Papyrus supports the definition of new viewpoints that can subsequently be used by selecting them in the Papyrus Viewpoints preference panel, as presented above. Papyrus viewpoints are defined in configuration files with the ‘.configuration’ extension. They are really just an ECore model that can be edited with the specialized viewpoint configuration editor provided by Papyrus.</p><h3 id="Basic_Concepts">Basic Concepts</h3><p>Viewpoints in Papyrus are implemented as an extension to the ISO 42010 standard for architecture description framework. Hence many concepts presented here are derived from those presented in the ISO 42010 standard. However, the standard has been extended with Papyrus-specific concepts and properties.</p><ul><li>A <i>configuration</i> is a top element of a configuration file. It contains can contains <i>viewpoints</i> specifications, <i>stakeholders</i>, as well as <i>view categories</i>.</li><li>A <i>stakeholder</i> (from ISO 42010) represents in Papyrus an archetype of users. They can be attributed <i>viewpoints</i>, thus defining what users of this kind can see.</li><li>A <i>viewpoint</i> (from ISO 42010) in Papyrus is simply set of <i>views</i>, which can be <i>diagrams</i> or <i>tables</i>.</li><li>A <i>diagram</i> in this context does not represent a single instance (for example the diagram named X in model Y), but the specification (or prototype) of future diagrams of this kind. For example the <i>UML Class Diagram</i>.</li><li>A <i>table</i> is another kind of view in Papyrus that enables the presentation of models in a tabular format.</li></ul><h3 id="Walkthrough">Walkthrough</h3><p>The definition of a new viewpoint in Papyrus starts with the creation of a new configuration file: <i>Viewpoint s configuration</i> in the Papyrus folder of the Eclipse new element creation dialog. The top element of the file should be a <i>Papyrus Configuration</i> element.</p><p><u>Step 1</u>: Select the metamodel that is applicable to this configuration. Generally, this should be UML. The metamodel is selected as the <i>metamodel</i> property of the <i>Papyrus Configuration</i> root element. The drop-down value selection is automatically filled with the currently metamodel currently loaded in Eclipse. For UML select, "<a href="http://www.eclipse.org/uml2/5.0.0/UML">http://www.eclipse.org/uml2/5.0.0/UML</a>".</p><p><u>Step 2</u>: Add the basic elements. The setting of the elements below is required for the configuration to work correctly.</p><ul><li>Right click on the <i>Papyrus Configuration</i> root element to a new <i>Stakeholder</i> child.</li><li>Give it an appropriate name</li><li>Right click on the <i>Papyrus Configuration</i> root element to a new <i>Viewpoint</i> child.</li><li>Give it an appropriate name</li><li>In the properties of the new stakeholder, add the new viewpoint to the <i>viewpoints</i> property to specify that this stakeholder will have to the specified viewpoint.</li><li>In the properties of the <i>Papyrus Configuration</i> root element, select the new stakeholder in the <i>Default Stakeholder</i> property.</li></ul><p>Notes:</p><ul><li>Stakeholder attributes other than <i>viewpoints</i> and <i>name</i> are inherited from the ISO 42010 implementation and are currently not used in Papyrus.</li><li>Viewpoint attributes other than <i>parent</i> and <i>name</i> are inherited from the ISO 42010 implementation and are currently not used in Papyrus.</li></ul><p><u>Step 3</u>: Complete the viewpoint with new diagrams and tables. Those elements can be added by right clicking on the viewpoint element, in the <i>New child</i> menu. Refer to the sections below for more information on the specification of diagrams and tables.</p><p><u>Step 4</u>: Deploy the configuration. The new configuration file can be deployed in an Eclipse plugin and registered through an extension point. The extension point to use is <code>org.eclipse.papyrus.infra.viewpoints.policy.custom</code>. It comes in two flavors that are the possible child elements for it:</p><ul><li>The <i>configuration</i> element lets you register a configuration file and give it a priority. The configuration file is selected with the <i>file</i> property. Giving an URI of the form <code>platform:/plugin/my.plugin.name/path/myconfig.configuration</code> is a good practice. The <i>priority</i> is a value between 0 and 100, 100 is the highest priority. This value will be used to select the configuration with the highest priority when the user selects the <i>Deployed through the extension point</i> option in the configuration page as explained above. In this mode, the deployed configuration replaces the default Papyrus configuration and its viewpoint. This means that unless the provided viewpoint extends the default one or replicate it, the UML and SysML diagrams and tables will not be available.</li><li>The <i>contribution</i> elements lets you specifies a configuration file as an extension of another one. The custom configuration file is selected with the <i>file</i> property. The <i>original</i> property is used to select the configuration file that is extended. To extend the default Papyrus configuration, this value must be <code>platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration</code>. In this mode the custom viewpoints must have the same name as the extended on in the original configuration file. In essence, the diagrams and tables defined in the new custom viewpoint will be available along the one in the original viewpoints, instead of replacing them. This mode is used by RobotML to add the RobotML diagrams to the default Papyrus viewpoint.</li></ul><h3 id="Diagram_Specification">Diagram Specification</h3><p>A diagram has the following attributes:</p><ul><li>A <i>name</i> (required) that is the user-visible name of the diagram. It will appear in the creation menus and property panel.</li><li>An <i>icon</i> (required), as an URI of the form <code>platform:/plugin/...</code>.</li><li>An <i>implementation ID</i> (required) which selects the physical (hard-coded) diagram in Papyrus that will be used as a base. The possible values for this property are summarized in the following table.</li><li>An optional <i>parent</i> that specifies a parent viewpoint-defined diagram to inherit from. Essentially, the inheriting diagram will defer to its parent’s rules (see below) when its own are not sufficient to take a decision.</li><li>An optional list of <i>profiles</i> that must be applied on the model for this diagram to be available. The possible values are automatically populated from the loaded EPackages.</li><li>An optional <i>custom style</i> as an URI of the form <code>platform:/plugin/...</code>. It must point to a CSS file that will then be automatically applied to the diagram.</li><li>An optional <i>custom palette</i> as an URI of the form <code>platform:/plugin/...</code>. It must point a palette definition in XML that will be automatically applied to the diagram.</li><li>Other attributes are inherited from the ISO 42010 implementation and are currently not used in Papyrus.</li></ul><table border="solid 1px grey"><tr><th>Implementation ID</th><th>Description</th></tr><tr><td><b>PapyrusUMLActivityDiagram</b></td><td>UML Activity Diagram</td></tr><tr><td><b>PapyrusUMLClassDiagram</b></td><td>UML Class Diagram</td></tr><tr><td><b>PapyrusUMLCommunicationDiagram</b></td><td>UML Communication Diagram</td></tr><tr><td><b>PapyrusUMLComponentDiagram</b></td><td>UML Component Diagram</td></tr><tr><td><b>CompositeStructure</b></td><td>UML Composite Diagram</td></tr><tr><td><b>PapyrusUMLDeploymentDiagram</b></td><td>UML Deployment Diagram</td></tr><tr><td><b>PapyrusUMLProfileDiagram</b></td><td>UML Profile Diagram</td></tr><tr><td><b>PapyrusUMLSequenceDiagram</b></td><td>UML Sequence Diagram</td></tr><tr><td><b>PapyrusUMLStateMachineDiagram</b></td><td>UML State Machine Diagram</td></tr><tr><td><b>PapyrusUMLTimingDiagram</b></td><td>UML Timing Diagram</td></tr><tr><td><b>UseCase</b></td><td>UML Use Case Diagram</td></tr><tr><td><b>PapyrusUMLInteractionOverviewDiagram</b></td><td>UML Interaction Overview Diagram</td></tr><tr><td><b>BlockDefinition</b></td><td>SysML Block Definition Diagram</td></tr><tr><td><b>InternalBlock</b></td><td>SysML Internal Block Diagram</td></tr><tr><td><b>Parametric</b></td><td>SysML Parametric Diagram</td></tr><tr><td><b>RequirementDiagram</b></td><td>SysML Requirements Diagram</td></tr></table><p>Once a diagram has been created it is possible to constraint it using rules. There are four kinds of rules:</p><ul><li>Model rules constrain the type of the (root) model elements that can be visualized through this view. Hence model rules control what model elements can be selected for the <i>Root element</i> property of the diagrams, as shown in the capture below.</li><li>Owning rules constrain the type of the model elements that can own the diagram itself. In practice this materializes as the type of model elements under which the diagrams can appear in the model explorer. Owning rules control what model elements can be selected for the <i>Owner</i> property of the diagrams, as shown in the capture below.</li><li>Child rules constrain the type of the model elements that can be dropped within this diagram.</li><li>Palette rules constrain the display of the diagram's palette elements.</li></ul><p><img border="0" src="captures/properties.png"/></p><p>Each rule has a <i>permit</i> property that specify whether the rule authorizes or forbids the action it represents. Otherwise, the properties of the rules are as follow:</p><ul><li><i>Model rules</i><ul><li><i>element</i> (required) represents the type of the model elements to apply the rule on.</li><li><i>multiplicity</i> (required, default is -1) represents the maximum number of this kind of diagram that can be created for the referenced model element. -1 represents an unbounded number.</li><li><i>stereotypes</i> represents the set of stereotypes that must be applied in the model element for the rule to match. The stereotypes can be picked from the classifiers of the <i>profiles</i> defined in the parent diagram.</li></ul></li><li><i>Owning rules</i><ul><li><i>element</i> (required) represents the type of the model elements to apply the rule on.</li><li><i>multiplicity</i> (required, default is -1) represents the maximum number of this kind of diagram that can be created for the referenced model element. -1 represents an unbounded number.</li><li><i>stereotypes</i> represents the set of stereotypes that must be applied in the model element for the rule to match. The stereotypes can be picked from the classifiers of the <i>profiles</i> defined in the parent diagram.</li></ul></li><li><i>Child rules</i><ul><li><i>element</i> (required) represents the type of the model elements begin dropped.</li><li><i>stereotypes</i> represents the set of stereotypes that must be applied in the model element for the rule to match. The stereotypes can be picked from the classifiers of the <i>profiles</i> defined in the parent diagram.</li><li><i>origin</i> (required) represents the type of the model elements that are the target of the drop. It is usually one of the type defined in the <i>model rules</i>.</li><li>Additionally, <i>child rules</i> can be completed with children called <i>path elements</i> using the <b>New Child</b> contextual menu. <i>Path elements</i> defines a path of properties that must be used from the <i>origin</i> to insert the new <i>element</i> in the model.</li></ul></li><li><i>Palette rules</i><ul><li><i>element</i> (required) represents a pattern to match for the identifier of a palette element.<ul><li>If the value ends with '*', it will match any palette element with the prefix specified before the '*'.</li><li>If the value is '*', it will match any palette element.</li></ul></li></ul></li></ul><p>The minimal required rules for a diagram specification to work are:</p><ul><li>A model rule that allows the diagram to be created for a model element. For example, a model rule with <i>element</i> set to UML Package, <i>multiplicity</i> to -1 and <i>permit</i> to true; meaning this diagram can be created for UML Packages and an unlimited number of diagrams can be created for each UML Package.</li><li>An owning rule that allows the diagram to be owned by a model element (appear under an element in the model explorer). For example, an owning rule with <i>element</i> set to UML Package, <i>multiplicity</i> set to -1 and <i>permit</i> to true; meaning an unlimited number of diagrams of this kind can be placed under each UML Package element in the model explorer.</li><li>A child rule that allows the dropping of any element in the diagram, expressed with the <i>permit</i> attribute set to true and other attributes left empty.</li></ul></body></html> \ No newline at end of file

Back to the top