Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Papyrus/UserGuide/Papyrus stereotype display"

(Created page with "===<span id="_ucc00fwOEeWkK6hum4lQXg">Papyrus stereotype display</span>=== __TOC__ <br> ====<span id="_uceC8fwOEeWkK6hum4lQXg">Display applied stereotype name</span>==== ====...")
 
(Papyrus stereotype display)
 
Line 1: Line 1:
===<span id="_ucc00fwOEeWkK6hum4lQXg">Papyrus stereotype display</span>===
+
[https://help.eclipse.org/2020-09/topic/org.eclipse.papyrus.uml.diagram.common.doc/target/generated-eclipse-help/DisplayStereotypes.html?cp=73_0_1_5_0 Papyrus stereotype display (2020-09)]
__TOC__
+
<br>
+
  
====<span id="_uceC8fwOEeWkK6hum4lQXg">Display applied stereotype name</span>====
+
[[Category:Papyrus]]
======<span id="_uceC8fwOEeWkK6hum4lQXg">Display applied stereotype name</span>======
+
<span id="_ucf4IPwOEeWkK6hum4lQXg">  - traces to [[#_uZluEPwOEeWkK6hum4lQXg|Apply a stereotype]], [[#_uZm8MPwOEeWkK6hum4lQXg|Drop from  the model explorer]], [[#_uZoKUPwOEeWkK6hum4lQXg|Display the name of the stereotype ]], [[#_uZpYcPwOEeWkK6hum4lQXg|Display each applied stereotype name differently]], [[#_uZkf8PwOEeWkK6hum4lQXg|Display stereotype name]]</span><br>
+
<span id="_ucgfMfwOEeWkK6hum4lQXg">The diagram contains a shape. When you applied a stereotype on the element, the applied stereotype name is displayed on the shape below the name of the element.
+
When an element is dropped form the model explorer to the diagram, the applied stereotype named is displayed on the shape.
+
This is the same behavior for links. </span><br>
+
=====<span id="_uchtUfwOEeWkK6hum4lQXg">How to</span>=====
+
<span id="_uci7cfwOEeWkK6hum4lQXg">Inside  papyrus, it is possible to display the name of applied stereotype.
+
To do that:
+
1. Apply the profile  that contains the stereotype on your model.
+
2. Apply the wanted stereotype on the element.</span><br>
+
<br>
+
[[Image:ApplyProfile.png|Apply a profile]]
+
<br>''Apply a profile''<br>
+
<br>
+
<br>
+
[[Image:applyStereotype.png|Apply the stereotype]]
+
<br>''Apply the stereotype''<br>
+
<br>
+
<br>
+
[[Image:AppliedStereotype.png|Resulted applied stereotype]]
+
<br>''Resulted applied stereotype''<br>
+
<br>
+
====<span id="_ucnM4fwOEeWkK6hum4lQXg">Display stereotype properties</span>====
+
======<span id="_ucnM4fwOEeWkK6hum4lQXg">Display stereotype properties</span>======
+
<span id="_ucpCEPwOEeWkK6hum4lQXg">  - traces to [[#_uZdLMfwOEeWkK6hum4lQXg|Stereotype application properties dipslay]]</span><br>
+
<span id="_ucqQMPwOEeWkK6hum4lQXg">It is possible to display properties of stereotypes as "comment", as "compartment", as "brace"</span><br>
+
====<span id="_ucq3QfwOEeWkK6hum4lQXg">As "brace"</span>====
+
======<span id="_ucq3QfwOEeWkK6hum4lQXg">As "brace"</span>======
+
<span id="_ucsFYfwOEeWkK6hum4lQXg">  - traces to [[#_uZiqwPwOEeWkK6hum4lQXg|Display Requirement as a "brace"]]</span><br>
+
<span id="_uctTgfwOEeWkK6hum4lQXg">Properties of applied stereotype can be displayed as "brace". This is label that is set below the name, and contains a sequence of properties name with their values.</span><br>
+
=====<span id="_ucuhofwOEeWkK6hum4lQXg">How to</span>=====
+
<span id="_ucvvwPwOEeWkK6hum4lQXg">To do that:
+
1. Select your Element
+
2. Select the Appearance Tab in the property view
+
3. Select "In braces" for the line of your applied stereotype</span><br>
+
<br>
+
[[Image:DisplayInBrace.png|Sequence of actions to display in brace]]
+
<br>''Sequence of actions to display in brace''<br>
+
<br>
+
<br>
+
[[Image:ResultDisplayInBrace.png|Properties of stereotypes displayed in brace]]
+
<br>''Properties of stereotypes displayed in brace''<br>
+
<br>
+
====<span id="_ucyzEfwOEeWkK6hum4lQXg">As "compartment"</span>====
+
======<span id="_ucyzEfwOEeWkK6hum4lQXg">As "compartment"</span>======
+
<span id="_uc0BMfwOEeWkK6hum4lQXg">  - traces to [[#_uZg1kPwOEeWkK6hum4lQXg|Display Requirement as a "compartment"]]</span><br>
+
<span id="_uc1PUfwOEeWkK6hum4lQXg">Properties of applied stereotype can be displayed as a compartment. This compartment contains all labels that are properties of the applied stereotype.</span><br>
+
=====<span id="_uc12YfwOEeWkK6hum4lQXg">How to</span>=====
+
<span id="_uc3EgfwOEeWkK6hum4lQXg">To do that:
+
1. Select your Element
+
2. Select the Appearance Tab in the property view
+
3. Select "In Compartment" for the line of your applied stereotype</span><br>
+
<br>
+
[[Image:DisplayInCompartment.png|Sequence of actions to display in compartment]]
+
<br>''Sequence of actions to display in compartment''<br>
+
<br>
+
<br>
+
[[Image:ResultDisplayInCompartment.png|Properties of stereotypes displayed in compartment]]
+
<br>''Properties of stereotypes displayed in compartment''<br>
+
<br>
+
====<span id="_uc6u4PwOEeWkK6hum4lQXg">As "Comment"</span>====
+
======<span id="_uc6u4PwOEeWkK6hum4lQXg">As "Comment"</span>======
+
<span id="_uc79APwOEeWkK6hum4lQXg">  - traces to [[#_uZfAYfwOEeWkK6hum4lQXg|Display Requirement as a "comment"]]</span><br>
+
<span id="_uc8kEfwOEeWkK6hum4lQXg">Properties of applied stereotype can be displayed as a comment. This comment representation that contains all labels that are properties of the applied stereotype.</span><br>
+
<span id="_uc9yMfwOEeWkK6hum4lQXg">To do that:
+
1. Select your Element
+
2. Select the Appearance Tab in the property view
+
3. Select "In Comment" for the line of your applied stereotype</span><br>
+
<br>
+
[[Image:DisplayInComment.png|Sequence of actions to display in comment]]
+
<br>''Sequence of actions to display in comment''<br>
+
<br>
+
<br>
+
[[Image:ResultDisplayInComment.png|Properties of stereotype displayed in comment]]
+
<br>''Properties of stereotype displayed in comment''<br>
+
<br>
+
====<span id="_udA1gfwOEeWkK6hum4lQXg">Choose properties to display</span>====
+
======<span id="_udA1gfwOEeWkK6hum4lQXg">Choose properties to display</span>======
+
<span id="_udCqsPwOEeWkK6hum4lQXg">  - traces to [[#_uZtC0PwOEeWkK6hum4lQXg|Use CSS file]], [[#_uZuQ8fwOEeWkK6hum4lQXg|Use property view]], [[#_uZr0sPwOEeWkK6hum4lQXg|Choice on Stereotype properties to display]]</span><br>
+
<span id="_udD40fwOEeWkK6hum4lQXg">The list of properties of stereotypes can be chosen by the user by using the property view or by writing a css.
+
This choice runs for the 3 representations of applied stereotypes: brace, compartment, comment.</span><br>
+
=====<span id="_udEf4fwOEeWkK6hum4lQXg">How to</span>=====
+
<span id="_udFuAfwOEeWkK6hum4lQXg">By using the property view, it is possible to select the list of property of stereotype.
+
To do that:
+
1. Select your element.
+
2. Check that the applied stereotype has been displayed as brace, compartment or comment
+
3. Select lines that correspond to wanted properties of stereotype.</span><br>
+
<br>
+
[[Image:ChooseProperties_PV.png|Select properties by using the property view]]
+
<br>''Select properties by using the property view''<br>
+
<br>
+
<span id="_udIKQfwOEeWkK6hum4lQXg">By using CSS file:
+
<code>
+
<br>
+
Compartment[type=StereotypeCompartment]{
+
visible:true;
+
}
+
Compartment[type=StereotypeCompartment]>[property="derived"]{
+
visible:false;
+
}
+
Compartment[type=StereotypeCompartment]>[property="derivedFrom"]{
+
visible:false;
+
}
+
</code>
+
The compartment is displayed and the property derived and derivedFrom are not displayed
+
 
+
 
+
</span><br>
+
<br>
+
[[Image:ChooseProperties_CSS.png|Result by using the selection by CSS]]
+
<br>''Result by using the selection by CSS''<br>
+
<br>
+
<span id="_udKmgfwOEeWkK6hum4lQXg">The following CSS rules are implemented by default for all the Diagrams:
+
<code>
+
Shape[type=StereotypeComment]{
+
visible:false;
+
}
+
+
StereotypeComment Compartment[type=StereotypeBrace]{
+
visible:false;
+
}
+
+
Compartment[type=StereotypeCompartment]{
+
visible:false;
+
}
+
+
Compartment[type=StereotypeBrace]{
+
visible:false;
+
}
+
+
Label[type=StereotypeLabel]{
+
depth:"none";
+
}
+
+
Here is some example of CSS to display the Stereotype:
+
/* To modify the depth */
+
Label[type=StereotypeLabel]{
+
depth:"-1";
+
}
+
+
/* To make the properties visible into compartment */
+
Compartment[type=StereotypeCompartment]{
+
visible:true;
+
}
+
+
/* Hide the property "allocatedTo" into the compartment */
+
Compartment[type=StereotypeCompartment]>[property="allocatedTo"]{
+
visible:false;
+
}
+
+
/* Hide all the properties into the Compartment of the stereotype Block */
+
Compartment[stereotype="SysML::Blocks::Block"]{
+
visible:false;
+
}
+
+
/* Display the Comment shape */
+
StereotypeComment{
+
visible:true;
+
}
+
/* Display the properties in Brace into the Comment*/
+
StereotypeComment Compartment[type=StereotypeBrace]{
+
visible:true;
+
}
+
</code>
+
</span><br>
+
====<span id="_udL0ofwOEeWkK6hum4lQXg">Choose QN depth</span>====
+
======<span id="_udL0ofwOEeWkK6hum4lQXg">Choose QN depth</span>======
+
<span id="_udNCwfwOEeWkK6hum4lQXg">  - traces to [[#_uZqmkPwOEeWkK6hum4lQXg|Qualified name depth]]</span><br>
+
<span id="_udOQ4PwOEeWkK6hum4lQXg">The stereotype name can be displayed by choosing the depth. I consists on choosing the size of the qualified name of the stereotype.
+
full = all the qualified name
+
0= only the name of stereotype
+
-1= the name of its parent + the name of the stereotype
+
-2=the name of its great-parent+ the name of its parent + the name of the stereotype</span><br>
+
<span id="_udO38fwOEeWkK6hum4lQXg">Using Css:
+
Label[type=StereotypeLabel]{
+
depth:"-1";
+
}
+
By using the property view:
+
1. Select the element.
+
2. Select the appearance Tab
+
3. Select the name depth and choose the size</span><br>
+
<br>
+
[[Image:depth.png|Select the depth the applied stereotype name]]
+
<br>''Select the depth the applied stereotype name''<br>
+
<br>
+
====<span id="_udRUMfwOEeWkK6hum4lQXg">Remove display of stereotype properties</span>====
+
======<span id="_udRUMfwOEeWkK6hum4lQXg">Remove display of stereotype properties</span>======
+
<span id="_udSiUfwOEeWkK6hum4lQXg">  - traces to [[#_uZvfEPwOEeWkK6hum4lQXg|Remove display of applied stereotype ]]</span><br>
+
<span id="_udTwcfwOEeWkK6hum4lQXg">The display of stereotype can be removed by selection or by unapply stereotype or profile container</span><br>
+
====<span id="_udU-kPwOEeWkK6hum4lQXg">Update the display of applied stereotype properties</span>====
+
======<span id="_udU-kPwOEeWkK6hum4lQXg">Update the display of applied stereotype properties</span>======
+
<span id="_udVlofwOEeWkK6hum4lQXg">  - traces to [[#_uZwtMPwOEeWkK6hum4lQXg|Update display]]</span><br>
+
<span id="_udWzwfwOEeWkK6hum4lQXg">When the value associated to the property of stereotype has been modified, the display must be modified.</span><br>
+
<span id="_udYB4fwOEeWkK6hum4lQXg">It is possible to edit value of stereotype property by double click on the property in the diagram.
+
Important: the property must be writable and Real are not yet editable. </span><br>
+
<br>
+
[[Image:PropertyEdition.png|Property of applied stereotype edition]]
+
<br>''Property of applied stereotype edition''<br>
+
<br>
+
=====<span id="_udaeIfwOEeWkK6hum4lQXg">How to</span>=====
+
<span id="_udbsQPwOEeWkK6hum4lQXg">It is possible to edit property of applied stereotype by using the property view:
+
1. Select your element
+
2. Select the Profile tab
+
3. Expand the stereotype
+
4. Select the property
+
5. Edit at right the property of the stereotype</span><br>
+
<br>
+
[[Image:PropertyEdition_PV.png|Property edition for applied stereotypes in the property view]]
+
<br>''Property edition for applied stereotypes in the property view''<br>
+
<br>
+

Latest revision as of 10:34, 26 November 2020

Papyrus stereotype display (2020-09)

Copyright © Eclipse Foundation, Inc. All Rights Reserved.