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.
Difference between revisions of "Papyrus/Mars Work Description/Improvments/Stereotype support"
(→Architecture) |
(→Architecture) |
||
Line 90: | Line 90: | ||
=== Architecture === | === Architecture === | ||
Here is the general overview of the Stereotypes architecture with EAnnotation. | Here is the general overview of the Stereotypes architecture with EAnnotation. | ||
− | [[File:Global Macro EAnnotation.JPG| | + | |
+ | [[File:Global Macro EAnnotation.JPG|1200px]] | ||
Here is the class diagram of the Stereotype EAnnotation concept: | Here is the class diagram of the Stereotype EAnnotation concept: | ||
− | [[File:EAnnotation Class Diagram Stereotype.JPG| | + | |
+ | [[File:EAnnotation Class Diagram Stereotype.JPG|1200px]] | ||
=== Observations === | === Observations === |
Revision as of 13:28, 9 January 2015
Contents
Enhancement of the support for the stereotypes in Papyrus
This page presents the improvments that will be pushed in the Mars version of Papyrus regarding the stereotypes support in the tool.
Introduction
The starting point of this study is due to concomitant issues around the stereotype display:
- The first whished improvement is to display the stereotypes when dragged and dropped from the model explorer.
- The second whish would be to use the Named Styles instead of EAnnotation in order to be aligned with the Papyrus point of view and be based on GMF layer.
- The third point is the user interface to display the Stereotype that doesn’t fulfil the user expectation in terms of intuitiveness.
State of art
Concepts in place
The Stereotype feature contains two types of display, which are more or less independent.
- The stereotype name label
- Can be displayed or hidden
- With a short name or a Qualified Name
- The stereotype properties
- Can be displayed or hidden
- Can be shown in a compartment, as a comment or in braces
On top of that, there are several actions taking part in the stereotype display:
- When displaying or hiding an item (stereotype Label or property label) from the appearance property view.
- When a new stereotype is applied or unapplied from the profile tab into the property view.
Those different cases should be part of the solution. But as there are quite independent, they can be treated as such.
Conception
In Papyrus, Stereotypes are stored into UML model. But the information related to manner to display stereotypes is stored through the EAnnotation. EAnnotation is an EMF concept that is attached to an object of type EModelElement. The EAnnotation details is a Map of type EMap<String,String>. In the case of “Stereotype”, the EAnnotation name is “Stereotype_Annotation”, the related map contains the following list of properties and values:
KEY (String) | VALUE (String) | Description |
---|---|---|
Stereotype_Presentation_Kind | TextIconStereotype | The kind of presentation for stereotype |
IconStereotype | ||
ImageStereotype | ||
HorizontalStereo | ||
VerticalStereo | ||
StereotypeList | Block, Allocated | The list of stereotype to display |
StereotypeWithQualifiedNameList | SysML::Allocations::Allocated, SysML::Blocks::Block | The list of stereotype to display with Qualified Name |
PropStereoDisplay | SysML::Blocks::Block.isEncapsulated | List of properties to display |
StereotypePropertyLocation | Compartment | Location of Stereotype Properties |
In Brace | ||
Comment |
Property View
The profile and stereotypes applied are available under the tab “Profile” of the property view of the diagram or of the object. All the information about the display of those stereotypes is available under the “Appearance” tab.
- What information should be displayed (Text, icon, image, text and Icon)
- How the stereotypes should be aligned (Horizontal or vertical )
- Location of the stereotype information to be displayed (in a specific compartment, as a comment, or between bracket )
- The selection tree of the applied stereotypes with their properties
- Pair of buttons to display either short stereotype name, or the whole qualified name.
Architecture
Here is the general overview of the Stereotypes architecture with EAnnotation.
Here is the class diagram of the Stereotype EAnnotation concept:
Observations
Several observations can be done from this conception:
- EAnnotation is difficult to maintain, it is string based only, and a lot of classes, constants and methods are required to put EAnnotation in place.
- EAnnotation is not well designed for a CSS compatibility. It is then difficult to have a good customization.
- The user interface into the “Appearance” Tab is not clear. The two buttons to display qualified name and short name are ambiguous.
- The property view is directly in charge of creating Commands to manage the EAnnotation, instead of separated responsibilities between graphical interface, user actions, and command creations.
For those reasons, the entire Stereotype display mechanism must be improved.
Requirements ( Draft )
Req ID | Category | Description |
---|---|---|
STO_01 | Default display | The stereotypes are display by default (during the creation, when DnD, when applied). |
STO_02 | New Stereotype | The stereotypes displayed should be automatically updated when applied stereotypes list changes. |
STO_03 | Qualified Name | Each Stereotype can be either displayed with a short name or with the Qualified Name. |
STO_04 | Qualified Name | The displayed qualified name depth can be defined for each stereotype. |
STO_05 | Location | Properties can be either displayed in a compartment, in a comment, or between braces. |
STO_06 | Location | The user should be able to choose the location of each stereotype's property (In compartment, in braces, as a comment). |
STO_07 | Hide | Each stereotype and property can be displayed or hidden independantly. |
STO_08 | CSS | Visibility, qualified name depth and location can be defined by CSS. |
STO_09 | CSS | A CSS file can be added for each Stereotype to manage its display. |
Solutions
Named Styles
to be edited
Label for Each Stereotype
to be edited
Tasks and bugs
Bugzilla
The bugzilla items tracking progress of this improvments are: