Starting from version 6.4, Papyrus supports the definition of properties view by using EEF technology. The Eclipse Extended Editing Framework (EEF) is a presentation framework for the Eclipse Modeling Framework. It allows user to create rich user interfaces to edit EMF models.
EEF Properties view display same properties view to user than by using Papyrus Properties View. Same tabs and same sections will be retrieve in EEF properties View. The only difference between the two Properties View is the framework used to configure them. Indeed EEF technology is completely independent of XWT technology (technology used in Papyrus properties view).
The EEF Properties View can be configured by editing the viewpoint specification model (VSM) available in org.eclipse.papyrus.sirius.properties.uml/description/umlProperties.odesign. Fore more details about configuration, developer can see documentation about Sirius Properties view in Help content (Sirius>Sirius Specifier Manual>Properties View).
Given the fact that some controls displayed in properties are very specific for some element, some specific widget have been created. In this way, complex Properties view will match exactly with the need of specifiers. The next part will detail all these new controls (general controls usable with EEF (Text, Checkbox, Radio, Select, List, Hyperlink, Button, Reference, ...) are described in the EEF documentation: EEF > Language > Widgets)
In order to edit mono-valued and multi-valued references with some specific behaviors, an advanced widget has been created. This "Papyrus Reference" advanced widget is an implementation of the Sirius "Reference" Widget. Compared to the existing Sirius widget, this widget brings some new evolutions by overriding some user behaviors:
This "Papyrus Reference" advanced widget has several properties used to configure its behavior. Some of these properties are the same as those of the existing reference widget (see documentation Sirius > Sirius Specifier Manual > Properties View>Properties View description > Reference). Three properties have been added to the Papyrus Reference:
The Input Content Papyrus Reference Widget is similar to the Papyrus Reference Widget used with multi-valued references. It allows to manage the content displayed in the table by using an additional property:
With the Reference Name Expression, these two properties are required to allow the widget to work properly. Even if the content is replaced by the service called by the Input Content Expression, it is required to use an existing feature in the Reference Name Expression. For example, the reference used to set new created object in container. See documentation in Sirius > Sirius Specifier Manual > Properties View> Properties View description > Reference for further information about the Reference Name Expression.
An advanced control has been created, to meet the specific need of having a set of elements grouped in a container laid out with a border. The "Container Border" advanced control is an implementation of the Sirius "Container" Control.
The definition of "container Border" control follows the rules described for the Sirius "Container" Control with the exception of adding a property. Indeed for the "container Border" control, you can define :
Note that the Label Expression may be an empty String if it is not set or if specified by the expression, in which case the border will not be labeled.
The "Language Expression" Widget has been specifically created to manage "language" and "body" features of "BodyOwner" UML elements such as OpaqueExpression, OpaqueAction, OpaqueBehavior and FunctionBehavior.
This Widget displays, on the left part, the list of languages associated to their "body", on the right part, which is a text editor.
Inspired by the reference widget, the left part of the Language Expression Widget provides the same buttons as the Papyrus Reference one: Up, Down, Browse, Add, Remove and Edit buttons. See the related user documentation for more information about the behavior of these buttons.
According to the selected language, the body editor is updated. For example, for the OCL language, a Xtext editor is displayed and for the JAVA language, a kind of multi-string editor is displayed.
A language expression can be added in a group or a container. The definition of the language expression widget follows different rules to configure it:
These general rules are more described in documentation Sirius > Sirius Specifier Manual > Properties View > Properties View Description.
The "Profile Application" Widget has been created to display all Profiles and Profile Applications of a Package in the "Profile" tab.
It displays the list of all Profiles and Profile Applications in a table, Profile Applications are suffixed with "(profile application)". The Profile Application Widget provides 4 buttons to manage Profiles.: Apply profile, Remove, Apply registered profiles and Reapply profile. The Externalize and Internalize actions are available with a right click on a Package of the Model Explorer > Model refactor > Externalize/Internalize Profile Applications.
The definition of the Profile Application Widget follows different rules to configure it:
These general rules are more described in documentation Sirius > Sirius Specifier Manual > Properties View > Properties View Description.
The "Multiplicity" Widget is a standard EEF Text Widget which uses specific services in the VSM to force the user to type a valid data format in order to set the lower and upper bounds of the Multiplicity Element with a LiteralInteger and a LiteralUnlimitedNatural with the specified values.
The "Stereotype Application" widget has been created to display all applied stereotypes on UML elements in the "Profile" tab. In the VSM, you can add a "Stereotype Application" widget under a Property group.
The definition of the stereotype application widget follows different rules to configure it:
These general rules are more described in documentation Sirius > Sirius Specifier Manual > Properties View > Properties View Description.
When modifying certain model properties with the EEF Properties views, "conflicts" may occur, especially when the user types a value in a Text Widget.
For example in the Multiplicity Widget if the user types a String like * or 5..5, the displayed String will be updated with 0..* and 5 respectively. These conflicts are handled by EEF with the default mode ASK_USER to display a popup that allows the user to choose the value to use. The preference org.eclipse.eef.ide.ui.internal.preferences.EEFPreferences.TEXT_CONFLICT_RESOLUTION_MODE allows to modify this choice if needed. In Papyrus, the value to display during conflicts is always the value used in the model. The EEF preference has been modified to use the USE_MODEL_VERSION mode to directly update the displayed value rather than letting the user choose the value to display.