| Summary: | [SysML Block Definition Diagram] Forbidden Association creation involving Actor is not detected before creation | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Papyrus | Reporter: | Yann Tanguy <yann.tanguy> | ||||
| Component: | Core | Assignee: | Remi Schnekenburger <rschnekenburger> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | mathieu.velten | ||||
| Version: | 0.8.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Yann Tanguy
Re-orient probably suffers from the same problem. This forbid the creation of an association in the bdd diagram between an actor and any element. I don't really understand why the creation is aborted if we can't add the end to the source/target in add*InModel but I am not an UML master. Is there a reason ? the end is already owned by the association by default so I don't see the point, if it fails it stay on the association which seems correct to me. I already change the code (remove the throws), I can commit if no objection. (In reply to comment #2) > This forbid the creation of an association in the bdd diagram between an actor > and any element. > > I don't really understand why the creation is aborted if we can't add the end to > the source/target in add*InModel but I am not an UML master. Is there a reason ? > the end is already owned by the association by default so I don't see the point, > if it fails it stay on the association which seems correct to me. > > I already change the code (remove the throws), I can commit if no objection. Can you attach your patch, I'll review it this afternoon ? patch attached. another remark (unrelated) : the code handling Association is purely UML. Why is it not in the uml.service plugin ? Moreover most of the code is copy/paste from AssociationEditHelperAdvice. I understand that it should be registered for the sysml element types but it could be done without copying the code, by just referencing the classes from the uml.service plugin into the sysml plugin.xml. Because of that the specific code handling the different type of assocations (none/composite/shared) seems to be only in sysml while it also apply to uml. Created attachment 204865 [details]
patch
(In reply to comment #5) > Created attachment 204865 [details] > patch The created association is incorrect. The tool (matching the element you have patched) is supposed to create an Association navigable in both direction. In SysML the Association navigability is defined by the fact that the ending classifier owns the memberEnd of the Association. In this case, the Association is created but one of its end is owned by the Association instead of being owned by the Actor, meaning that it is not navigable in both direction. The problem with Actor is that one cannot add feature on such Classifier, as a result it is not possible to create SysML association with Actor as a source and navigable on toward the opposite end. (In reply to comment #4) > patch attached. > > another remark (unrelated) : the code handling Association is purely UML. Why is > it not in the uml.service plugin ? Moreover most of the code is copy/paste from > AssociationEditHelperAdvice. > > I understand that it should be registered for the sysml element types but it > could be done without copying the code, by just referencing the classes from the > uml.service plugin into the sysml plugin.xml. Because of that the specific code > handling the different type of assocations (none/composite/shared) seems to be > only in sysml while it also apply to uml. By the way Association in UML and SysML are different : - navigability is not defined the same way in both languages - no n-ary association in SysML The distinction between UML and SysML is done with an eAnnotation added on each kind of creation. The use of this eAnnotation is to provide property view with different behavior for each or to allow / forbid Association drop in diagram. As an example, I dont want that an Association created in a Class diagram which may be incorrect from a SysML point of view can be dropped in an IBD (this should be done via some kind of explicit refactor action). The work in service types around Association has been done for SysML diagrams (IBD, BDD) and tested / validated on these. I guess some code could be reuse for an equivalent UML implementation and use in UML diagrams but will probably by more complicated (to deal with n-ary assoc, ends owned by assoc...). In case equivalent Association type (none, shared...) for UML are needed, I'd prefer keeping the code separated to limitate possible impact of UML implementation on SysML association, and to avoid the task of re-validating SysML association unless there is a clear benefit for this. OK thanks, I thought Association was handle the same way in UML and SysML, it is a lot clearer now. I really don't understand why they didn't use the usual navigable feature of the memberEnd instead of this mess... (In reply to comment #8) > OK thanks, I thought Association was handle the same way in UML and SysML, it is > a lot clearer now. > I really don't understand why they didn't use the usual navigable feature of the > memberEnd instead of this mess... I dont understand either, the result is two language (UML & SysML) that really look compatible but are not completely. Very problematic in my opinion for a tool like Papyrus that attempts to provide UML and SysML diagrams shared as views on a same model... I hope the two specifications will be re-aligned in future versions. Merged in trunk (0.9) : r7279. Fixed in r7274 (0.8) and r7279 (0.9). |