Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Papyrus/UserGuide/Papyrus stereotype display
Papyrus stereotype display
Contents
- 1 Papyrus stereotype display
Display applied stereotype name
Display applied stereotype name
- traces to Apply a stereotype, Drop from the model explorer, Display the name of the stereotype , Display each applied stereotype name differently, Display stereotype name
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.
How to
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.
Apply a profile
Apply the stereotype
Resulted applied stereotype
Display stereotype properties
Display stereotype properties
- traces to Stereotype application properties dipslay
It is possible to display properties of stereotypes as "comment", as "compartment", as "brace"
As "brace"
As "brace"
- traces to Display Requirement as a "brace"
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.
How to
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
Sequence of actions to display in brace
Properties of stereotypes displayed in brace
As "compartment"
As "compartment"
- traces to Display Requirement as a "compartment"
Properties of applied stereotype can be displayed as a compartment. This compartment contains all labels that are properties of the applied stereotype.
How to
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
Sequence of actions to display in compartment
Properties of stereotypes displayed in compartment
As "Comment"
As "Comment"
- traces to Display Requirement as a "comment"
Properties of applied stereotype can be displayed as a comment. This comment representation that contains all labels that are properties of the applied stereotype.
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
Sequence of actions to display in comment
Properties of stereotype displayed in comment
Choose properties to display
Choose properties to display
- traces to Use CSS file, Use property view, Choice on Stereotype properties to display
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.
How to
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.
Select properties by using the property view
By using CSS file:
Compartment[type=StereotypeCompartment]{ visible:true; } Compartment[type=StereotypeCompartment]>[property="derived"]{ visible:false; } Compartment[type=StereotypeCompartment]>[property="derivedFrom"]{ visible:false; }
The compartment is displayed and the property derived and derivedFrom are not displayed
Result by using the selection by CSS
The following CSS rules are implemented by default for all the Diagrams:
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; }
Choose QN depth
Choose QN depth
- traces to Qualified name depth
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
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
Select the depth the applied stereotype name
Remove display of stereotype properties
Remove display of stereotype properties
- traces to Remove display of applied stereotype
The display of stereotype can be removed by selection or by unapply stereotype or profile container
Update the display of applied stereotype properties
Update the display of applied stereotype properties
- traces to Update display
When the value associated to the property of stereotype has been modified, the display must be modified.
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.
Property of applied stereotype edition
How to
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
Property edition for applied stereotypes in the property view