Papyrus Banner

Papyrus stereotype display

  1. Papyrus stereotype display
    1. Display applied stereotype name
      1. Display applied stereotype name
      2. How to
    2. Display stereotype properties
      1. Display stereotype properties
    3. As "brace"
      1. As "brace"
      2. How to
    4. As "compartment"
      1. As "compartment"
      2. How to
    5. As "Comment"
      1. As "Comment"
    6. Choose properties to display
      1. Choose properties to display
      2. How to
    7. Choose QN depth
      1. Choose QN depth
    8. Remove display of stereotype properties
      1. Remove display of stereotype properties
    9. Update the display of applied stereotype properties
      1. Update the display of applied stereotype properties
      2. How to

Display applied stereotype name

Display applied 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 a profile

Apply the stereotype

Apply the stereotype

Resulted applied stereotype

Resulted applied stereotype

Display stereotype properties

Display stereotype properties

It is possible to display properties of stereotypes as "comment", as "compartment", as "brace"

As "brace"

As "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

Sequence of actions to display in brace

Properties of stereotypes displayed in brace

Properties of stereotypes displayed in brace

As "compartment"

As "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

Sequence of actions to display in compartment

Properties of stereotypes displayed in compartment

Properties of stereotypes displayed in compartment

As "Comment"

As "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

Sequence of actions to display in comment

Properties of stereotype displayed in comment

Properties of stereotype displayed in comment

Choose properties to display

Choose 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

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 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

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

Select the depth the applied stereotype name

Remove display of stereotype properties

Remove display of stereotype properties

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

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

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

Property edition for applied stereotypes in the property view