| Summary: | [Control Mode] Controlling a package leaves the stereotypes applied to the package in the parent files | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Papyrus | Reporter: | Alain Le Guennec <alain.leguennec> | ||||
| Component: | Core | Assignee: | Project Inbox <mdt-papyrus-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cletavernier, eclipse-bugzilla | ||||
| Version: | 0.9.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=389495 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Alain Le Guennec
Created attachment 220108 [details]
Patch to fix the issue.
Note that ideally, the method relocateStereotypeApplication(Element, EObject) now provided in this patch to implement stereotype application relocation should follow the same hookable strategy as stereotype application creation does, as implemented in class org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper.
Unfortunately, as mentionned within comments in the patch, the method getContainmentList() of StereotypeApplicationHelper is not public, so I cannot call it without overriding the whole StereotypeApplicationHelper (which I did in my own version, but seemed a bit overkill for Papyrus, all the more since overriding the StereotypeApplicationHelper via the dedicated System property must be done very carefully in an OSGi environment where bundle activation order is hard to predict).
Maybe the best solution would be to move the "relocateStereotypeApplication" method within UML2's StereotypeApplicationHelper class altogether, properly using getContainmentList to determine the new destination location of the stereotype application.
Kenn, if you are listening, what would you think about that?
Anyway, the usual disclaimer:
(1) I, Alain LE GUENNEC, wrote 100% of the code I've provided.
(2) This code contains no cryptography
(3) I have the right to contribute the code to Eclipse.
(4) I contribute the content under the EPL.
Commited in R8953 on trunk and branch. Comment on attachment 220108 [details]
Patch to fix the issue.
Committed in R8953
|