Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Force mdt.uml2 to disable generation of new xmi:id
Force mdt.uml2 to disable generation of new xmi:id [message #476426] Thu, 25 October 2007 11:14 Go to next message
Reinhard Jeschull is currently offline Reinhard JeschullFriend
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 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
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 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
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?
Previous Topic:Profile2EPackageConverter
Next Topic:EPackage to Profile mapping
Goto Forum:
  


Current Time: Tue Sep 24 09:00:38 GMT 2024

Powered by FUDForum. Page generated in 0.03820 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top