Force mdt.uml2 to disable generation of new xmi:id [message #476426] |
Thu, 25 October 2007 11:14 |
Reinhard Jeschull Messages: 10 Registered: July 2009 |
Junior Member |
|
|
Hi,
I am reading XMIs with the XMIResourceFactoryImpl and save them to .uml
via UMLResourceFactoryImpl. That works perfect, but there is one problem:
After saving them to .uml, all xmi:ids has changed, so that applied
stereotypes (stored in XMI) refer _sometimes_ to more than one element
(for example a stereotype that is applied to a class is after converting
it also applied to an ecore:EClass from the profile). The reason is,
that the elements suddenly have the same xmi:id.
The generated .uml seems to be loaded correctly with the FactoryImpl,
but the UML model viewer having problem with the stereotypes now.
Instead of showing a class like <<MyStereotype>><Class>TestClass, the
stereotype isn't displayed and a MyStereotype-Element (symbol is a star)
is at the bottom of the file. If it's neccessary to find the problem, I
will upload some pictures or xmi-files.
So, is there a way to keep the IDs from the XMI file?
|
|
|
Re: Force mdt.uml2 to disable generation of new xmi:id [message #476428 is a reply to message #476426] |
Thu, 25 October 2007 14:03 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Reinhard,
The UML resource implementation is a UUID-based resource implementation. If
you want the XMI identifiers to be preserved when moving elements from
another kind of resource to a UML resource, I suspect that the source
resource will also need to be UUID-based, i.e. the useUUIDs() method needs
to be overridden in the source resource implementation to return 'true'.
Kenn
If you want XMI identifiers to be preserved when moving objects from one
resource to another, both resources need to be UUID-based
"Reinhard Jeschull" <rjeschu@fh-landshut.de> wrote in message
news:ffptqs$vkf$1@build.eclipse.org...
> Hi,
> I am reading XMIs with the XMIResourceFactoryImpl and save them to .uml
> via UMLResourceFactoryImpl. That works perfect, but there is one problem:
> After saving them to .uml, all xmi:ids has changed, so that applied
> stereotypes (stored in XMI) refer _sometimes_ to more than one element
> (for example a stereotype that is applied to a class is after converting
> it also applied to an ecore:EClass from the profile). The reason is, that
> the elements suddenly have the same xmi:id.
>
> The generated .uml seems to be loaded correctly with the FactoryImpl, but
> the UML model viewer having problem with the stereotypes now. Instead of
> showing a class like <<MyStereotype>><Class>TestClass, the stereotype
> isn't displayed and a MyStereotype-Element (symbol is a star) is at the
> bottom of the file. If it's neccessary to find the problem, I will upload
> some pictures or xmi-files.
>
> So, is there a way to keep the IDs from the XMI file?
|
|
|
Re: Force mdt.uml2 to disable generation of new xmi:id [message #625306 is a reply to message #476426] |
Thu, 25 October 2007 14:03 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Reinhard,
The UML resource implementation is a UUID-based resource implementation. If
you want the XMI identifiers to be preserved when moving elements from
another kind of resource to a UML resource, I suspect that the source
resource will also need to be UUID-based, i.e. the useUUIDs() method needs
to be overridden in the source resource implementation to return 'true'.
Kenn
If you want XMI identifiers to be preserved when moving objects from one
resource to another, both resources need to be UUID-based
"Reinhard Jeschull" <rjeschu@fh-landshut.de> wrote in message
news:ffptqs$vkf$1@build.eclipse.org...
> Hi,
> I am reading XMIs with the XMIResourceFactoryImpl and save them to .uml
> via UMLResourceFactoryImpl. That works perfect, but there is one problem:
> After saving them to .uml, all xmi:ids has changed, so that applied
> stereotypes (stored in XMI) refer _sometimes_ to more than one element
> (for example a stereotype that is applied to a class is after converting
> it also applied to an ecore:EClass from the profile). The reason is, that
> the elements suddenly have the same xmi:id.
>
> The generated .uml seems to be loaded correctly with the FactoryImpl, but
> the UML model viewer having problem with the stereotypes now. Instead of
> showing a class like <<MyStereotype>><Class>TestClass, the stereotype
> isn't displayed and a MyStereotype-Element (symbol is a star) is at the
> bottom of the file. If it's neccessary to find the problem, I will upload
> some pictures or xmi-files.
>
> So, is there a way to keep the IDs from the XMI file?
|
|
|
Powered by
FUDForum. Page generated in 0.03820 seconds