| Summary: | Stereotypes and their values are not copied in UML Editor | ||
|---|---|---|---|
| Product: | [Modeling] MDT.UML2 | Reporter: | Stefan Holzknecht <s.holzknecht> |
| Component: | Core | Assignee: | Kenn Hussey <Kenn.Hussey> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | borlander, bruck.james, francois.temp1, Kenn.Hussey, kutter, nyssen, tatiana.fesenko, unger |
| Version: | 2.1.0 | Keywords: | plan |
| Target Milestone: | M7 | Flags: | Kenn.Hussey:
kepler+
|
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | Community Support | ||
|
Description
Stefan Holzknecht
This is not a Releng bug. It's too late now for this feature to make it into the 2.2 release. :( The copy command would need to be overridden/extended so that stereotype applications are handled properly. This is similar to bug 281326 and can perhaps be explored in Keppler. I have done some further analysis and prototyping for this issue. As it turns out, the commands for copy, cut, and paste will all need to be specialized in the context of the UML editor. I will implement a solution wherein stereotype applications for the copied/cut elements are pasted to the target resource iff the same version of the associated profile is applied in the resulting context. This means that the specific version of the containing profile(s) must be applied either to a package in the hierarchy of the elements being copied/cut or to a package in the hierarchy of the target to which the elements are being pasted. I agree, that if another version of the same profile is applied, we should be careful.
However, if the same profile has not yet been applied, it would simplify things a lot for non-specialists, if the copy/past command would not only copy the applications of the stereotypes and their tags, but as well the application of the profile.
Does the following:
> This means that the specific version of the containing profile(s) must
> be applied either to a package in the hierarchy of the elements being
> copied/cut or to a package in the hierarchy of the target to which the
> elements are being pasted.
Mean that you would apply the profile to the target, if you had it applied in the hierarchy of the elements being copied/cut? If yes, to which package would it be applied, to the least enclosing, or to the root?
Another question: if we have in source and target context two versions of the same profile applied, and if the stereotype is so simple that it can be recognized as being the same in both versions: would it not be great, to have it copied over anyhow?
(In reply to comment #5) > However, if the same profile has not yet been applied, it would simplify things > a lot for non-specialists, if the copy/past command would not only copy the > applications of the stereotypes and their tags, but as well the application of > the profile. I agree that it seems simpler (on the surface), but having thought in detail about it, it's not so simple. Consider, for example, the fact that the modeler may wish to not have the profile applied in the new context or may wish to have it applied to a specific package (by convention). Another complication is required stereotypes - automatically applying the profile could result in a number of applications of required stereotypes as a (potentially undesirable) side-effect. > Does the following: > > This means that the specific version of the containing profile(s) must > > be applied either to a package in the hierarchy of the elements being > > copied/cut or to a package in the hierarchy of the target to which the > > elements are being pasted. > > Mean that you would apply the profile to the target, if you had it applied in > the hierarchy of the elements being copied/cut? If yes, to which package would > it be applied, to the least enclosing, or to the root? No, it means that either the hierarchy of elements being copied/cut must contain the needed profile application (e.g., perhaps you are copying/cutting and pasting a package with all of its contents and the needed profile is applied to that package) or some package in the hierarchy into which you are pasting the elements must have the need profile applied. If neither of these is true, the stereotype applications from that profile will not be pasted. > Another question: if we have in source and target context two versions of the > same profile applied, and if the stereotype is so simple that it can be > recognized as being the same in both versions: would it not be great, to have it > copied over anyhow? This is another example of how complicated things can get - the modeler might wish to apply a newer version of a profile in a narrower context or instead upgrade to a newer version of the profile in the target context. Even worse, you could be copying stereotype applications from an older version of a profile for which a newer version is applied in the target context. Much better, IMHO, to give the modeler full control over which versions of which profiles are applied where in the target context; the contract provided by the cut/copy/paste commands will be that any stereotype applications which are still valid in the target context will be preserved. The solution described in comment #4 has been committed/pushed to the 'master' branch in git. An integration build (for UML2 4.1) containing the changes is now available. |