Community
Participate
Working Groups
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.
Created attachment 180744 [details] UML file using these properties
Created attachment 180745 [details] DI file for model using these properties
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.
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).
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.
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.
This task can be closed. Specific subtasks for issues described in Comment #6 might be reopened if needed