Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327638 - [Property View] Some properties do not appear in the Advanced tab of Papyrus Properties view
Summary: [Property View] Some properties do not appear in the Advanced tab of Papyrus ...
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.8.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Camille Letavernier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-13 05:04 EDT by Vincent Hémery CLA
Modified: 2014-03-25 15:35 EDT (History)
1 user (show)

See Also:


Attachments
UML file using these properties (802 bytes, application/octet-stream)
2010-10-13 05:07 EDT, Vincent Hémery CLA
no flags Details
DI file for model using these properties (925 bytes, application/octet-stream)
2010-10-13 05:08 EDT, Vincent Hémery CLA
no flags Details
Notation file for model using these properties (3.53 KB, application/octet-stream)
2010-10-13 05:09 EDT, Vincent Hémery CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Hémery CLA 2010-10-13 05:04:46 EDT
Some UML properties are not visible, in the properties view, nor in UML tab, nor in the Advanced tab with "Show Advanced Properties" action enabled.

This is the case of :
org.eclipse.uml2.uml.Behavior.getPreconditions()
and 
org.eclipse.uml2.uml.Behavior.getPostconditions()

These properties shall be visible for an Activity or for an Interaction, which inherit it from Behavior.
These properties subset the
org.eclipse.uml2.uml.Namespace.getOwnedRules()
property, which is visible.

When we try to create such elements in the Model Explorer view, they can only be created as  owned rules, like if these properties didn't exist.

When opening the UML file with the UML editor, these properties do not appear either, though the objects can be created with a right click action on the Activity representing node.

When opening the UML file with the Reflexive Acceleo editor, these properties are correctly shown in the Properties view.

These properties are usefull for the activity diagram, in which their representation has been implemented (used to work with old Properties view).
Currently, we can create them only with the tooltip creation action on the activity, whereas we expected to manage them through the Properties view.
Comment 1 Vincent Hémery CLA 2010-10-13 05:07:40 EDT
Created attachment 180744 [details]
UML file using these properties
Comment 2 Vincent Hémery CLA 2010-10-13 05:08:12 EDT
Created attachment 180745 [details]
DI file for model using these properties
Comment 3 Vincent Hémery CLA 2010-10-13 05:09:09 EDT
Created attachment 180746 [details]
Notation file for model using these properties

Files for Papyrus diagram and model using these properties has been added to illustrate the bug.
Comment 4 Camille Letavernier CLA 2011-08-02 05:58:37 EDT
These properties are not "containment" properties, which explains why they cannot be created with the "New child" feature.

So, to create a new "Precondition" or "Postcondition", there are two steps :

- Create it as a new "ownedRule"
- Add it as a "precondition" or "postcondition" of the Behavior

I will see how to do that from the property view (Maybe for SR1).
Comment 5 Camille Letavernier CLA 2011-08-04 05:04:51 EDT
The same goes for a guard in a transition, in the State Machine Diagram :

- The guard is a non-containment reference (i.e. it cannot be created directly from the property view)
- The constraint must be added as a ownedRule in the guard (guard subsets ownedRule)

Currently, when a transition's guard is set, the constraint is automatically moved to the transition's ownedRules.

The same case probably occurs at some other places, I'll think to a generic way of handling these cases from the property view.
Comment 6 Camille Letavernier CLA 2011-08-04 10:06:43 EDT
Done in r5194 (Branch 0.8.X)
Merge to the trunk in r5196

Changes :

- It is now possible to add new elements in the following features :

Behavior#precondition
Behavior#postcondition

Operation#bodyCondition
Operation#precondition
Operation#postcondition

ProtocolTransition#preCondition
ProtocolTransition#postCondition

Transition#guard

When doing so, the object will actually be created in the element#ownedRule, and referenced from the selected feature.

- The Activity and Interaction property view have been changed to display the pre- and post-condition properties

The other views have not been changed.


Problems :

When removing a Constraint from one of the listed features, the object is still located in the ownedRules, and is not actually deleted. This may lead to a pollution of the model (You have to manually delete it from the ownedRule). It could be nice to have some kind of advice to delete the Constraint from the ownedRule when it is not used anymore (However, this is probably not the responsibility of the Property View).

Moreover, when removing a Pre- or Post- condition from the property view, the diagram is not correctly updated (The constraint is still visible in the activity). Once again, I'm not sure the problem comes from the property view.
Comment 7 Camille Letavernier CLA 2014-03-25 15:35:37 EDT
This task can be closed.

Specific subtasks for issues described in Comment #6 might be reopened if needed