|Re: [EMF Compare] UML: Added Element with Stereotyp [message #975098 is a reply to message #974940]
||Wed, 07 November 2012 15:44
| Ed Willink
Registered: July 2009
The XMI structure for stereotype applications is really wierd; rather
the the normal hierarchy of elements with cross-references, there are a
bunch of top level elements at the end that contain the extra
information. This is easily overlooked by simple tools using the tree
On 07/11/2012 14:06, Johannes Kowald wrote:
> first, i want to explain what i´m doing:
> 1) I compare two UML2 models with EMF Compare (not 2.0) via source
> code and i´m ignoring all kind of IDs. 2) I´m doing the exact same
> thing with the UI of EMF Compare
> 3) Both ways detect the same differences (jeah!), but the UI seems to
> have more information about the elements added
> My question is: Regarding to the attached screenshot: How does the UI
> know, that the added "Usage" has the stereotypes "<<call>>" and
> "<<secrecy>>" attached to it? If I take a look at the given attributes
> and values, none of them gives me this information. Even a check for
> possible sub-elements (code) is not successful.
> If the evolved UML model has only a new stereotype attached to it, the
> stereotype appears as an own DiffElement (kind=addition) in the list
> of differences. Why are there no added stereotypes as independent
> DiffElements connected to the added "Usage"?
> Thanks in anticipation,
> Johannes Kowald
> (sorry for my 'bumpy' english)
|Re: [EMF Compare] UML: Added Element with Stereotyp [message #987368 is a reply to message #976222]
||Mon, 26 November 2012 10:23
| Johannes Kowald
Registered: November 2012
first of all: I am using the UML2 package in the project. The Match- and DiffEngine are using the UmlCompare stuff.
I still got a problem with the UML Stereotypes in the DiffModel. Following Situation:
1) I got a class in both UML models (i want to compare) with the same name (ignoring xmi-ids they are matched to each other)
2) I attach two stereotypes from different profiles (e.g. "secret" from "testprofile1" and "secret" from "testprofile2") to the class in the modified model.
3) Both stereotypes appear as Additions in the DiffModel with references (getLeftElement) to objects of the type DynamicEObjectImpl.
Problem: From this DynamicEObjectImpl objects i can´t get any informations about the profile, the stereotype are belonging to.
As a workaround I tried the solution to match the given DiffElements with their meta-informations (like eClass, Class, qualifiedName or something like this) to the list of stereotypes of the parent uml-element (getParent() -> getAppliedStereotypes()) but this seems to fail. Et al I can´t get any qualifiedName from the DiffElement or the DynamicEObjectImpl which fits to the qualifiedName of the applied stereotypes of the parent uml-element.
I hope, i got no "tunnel vision".
Thanks in anticipation,
(Sorry again for my bumpy english)
I found the solution a few minutes after i posted the above question (as always). With the help of the UMLUtil.getStereotype it is easy to get the needed information.
[Updated on: Mon, 26 November 2012 11:18]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01921 seconds