| Summary: | After a copy/paste, (patchable) inconsistency in references | ||
|---|---|---|---|
| Product: | [SOA] JWT | Reporter: | Marc Dutoo <marc.dutoo> |
| Component: | WE | Assignee: | Project Inbox <jwt.we-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | christian.saad |
| Version: | 1.0.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Marc Dutoo
I've just tried it using the official 0.7.0 release and it's the same behaviour. More information : when opening the file again after having saved it, the copy-pasted action now references other, new Role(Reference)s and Application(Reference)s (but not other linked Actions) that have been created by the consistency checking mechanism, however their LayoutData were not copy-pasted so those new elements are displayed on the top left of the diagram. Having tried with 0.6.0, references were not copied at all when copy-pasting, meaning solution 2. Thanks for describing & analyzing this bug. I hoped that the copy&paste issues were finally resolved :( Basically the idea was (and from my understandig still is) to add all edges (activity&reference) which exist *between* the selected objects to the copy&paste set. I'll have a look at it although I'm not sure if it would be safe to commit this to Helios. Thanks for this information, so at least it's not my Aspects copy/paste code that is at fault :) If you want to copy all edges _between_ nodes, then I've got the solution (thanks to my Aspects copy/paste experience) : Write your own JWTInitializeCopyCommand (hook it classically in JWT's DefaultCommandProvider or ModelElementItemProviderAdapter) that extends InitializeCopyCommandWithAspects (and not InitializeCopyCommand in order not to lose Aspects copy/paste), and override getReferencesToCopy() so as to not return anymore (performedBy) EReferences that target a Role that has no copy (i.e. copyHelper.getCopy(owner.getPerformedBy() == null). Actually, I could do it on my own without breaking too much sweat. Would you be OK with that ? Regards, Marc Due to limited time I implemented a simple solution, which I hope will do the trick. I added a CrossReference detection to WEPasteFromClipboardCommand. All external references which point to elements outside the clipboard are unset before pasting, except References and ActivityLinks. View elements' containedIn is reset to the current target Activity. C&P inside one activity seems fine but there are some strange problems when copying/pasting between different activities. But I think in interest of this this should be moved to 1.1.0 This last problem has now his own bugzilla : #348400 Problems when copying/pasting between different activities so closing this one, since everything else has been OK since then. |