| Summary: | [Class Diagram] Refactor the creation / move / drag and drop behavior of the ContainmentLink | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Papyrus | Reporter: | Yann Tanguy <yann.tanguy> | ||||||
| Component: | Core | Assignee: | Tatiana Fesenko <tatiana.fesenko> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | agnes.lanusse, cedric.brun, Patrick.Tessier, sebastien.gerard | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 290684 | ||||||||
| Attachments: |
|
||||||||
|
Description
Yann Tanguy
*** Bug 317997 has been marked as a duplicate of this bug. *** *** Bug 316433 has been marked as a duplicate of this bug. *** *** Bug 314255 has been marked as a duplicate of this bug. *** *** Bug 310596 has been marked as a duplicate of this bug. *** *** Bug 300666 has been marked as a duplicate of this bug. *** *** Bug 297418 has been marked as a duplicate of this bug. *** Created attachment 173089 [details]
Initial refactoring of ContainmentLinkReorientCommand
The factoring not also makes the code more readable and easy to maintain, but allows to reorient target of the link properly even if the target is contained by other elements.
(In reply to comment #0) > ...Creation with the palette tool > 1. Prevent containment cycles: > - forbid creation of the link from an element to itself > - forbid the creation from an element to any element from its owning > hierarchy > 2. Change the model to reflect the ContainmentLink information > - creation from A to B results in A moved into B in the model > - creation from A to B results in simply showing the link in the diagram if I've rewritten corresponding CreateLink and ReorientTarget commands in order to support this functionality. Circular and self dependencies are prohibited now. While Containment Link Package->Package, Package->Class, Class->Class for fine now, including inner elements, what was not supported before. Reorient target also works fine now. Several additional bugs were fixed, e.g. Model to Model containment link doesn't change structure in a domain model or Trying to reorient link target to another link or ContainmentCircle caused an exception - fixed now. 4. Delete Command: When the user deletes the source of the containing link from the model its target ia actually also deleted. But current implementation only deletes the link itself, link targte is still displayed even though it no longer exists. It causes multiple NPEs from different places - diagram editor, properties view and so on. The expected behaviour is to delete target view after source delete as target element doesn't exist. (In reply to comment #9) > 4. Delete Command: > When the user deletes the source of the containing link from the model its > target ia actually also deleted. But current implementation only deletes the > link itself, link targte is still displayed even though it no longer exists. It > causes multiple NPEs from different places - diagram editor, properties view > and so on. > The expected behaviour is to delete target view after source delete as target > element doesn't exist. Delete is implemented if source Package/Class is deleted. Or when the containment circle is deleted. In that case views for contained elements are deleted recursively. The user is asked with the dialog if he really wants to delete these elements (now implemented for Containment Circle only), this operation is undoaable. Created attachment 174143 [details]
mylyn/context/zip
impacted classes
add a modification for the drop from the model explorer, now it is impossible to drop a element if the target is not a diagram or not the semantic owner Fixed in Helios |