Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How can i set xmi id in Ecore editor?
How can i set xmi id in Ecore editor? [message #406205] Thu, 04 January 2007 14:35 Go to next message
Eclipse UserFriend
Originally posted by: wg12977.yahoo.de

Hi
I use Ecore Model Wizard of EMF to create a Model, but after i do that, in
the Ecore model file, there is no xmi id, how can i set that, i need these
ids für AMW,without this id will amw not work.

Thanks

wg
Re: How can i set xmi id in Ecore editor? [message #406214 is a reply to message #406205] Thu, 04 January 2007 18:17 Go to previous messageGo to next message
Marcelo Paternostro is currently offline Marcelo PaternostroFriend
Messages: 602
Registered: July 2009
Senior Member
Hi,

There is no support to set the xmi:id directly in the editor. You would
need to customize the generated code to add this.

Another alternative, applicable only if the ids can be either a random
unique value or computed from the object's attributes, is to create a
customized XMIResource. For the "random unique value" all you would
need to do is to override the method "useUUIDs()" to return true. For
the "computed from attributes" case you would need to override
attachedHelper(EObject) to call setID(EObject, String) in order to set
the xmi:id of the specified object.

Cheers,
Marcelo

wg wrote:
> Hi
> I use Ecore Model Wizard of EMF to create a Model, but after i do that,
> in the Ecore model file, there is no xmi id, how can i set that, i need
> these ids für AMW,without this id will amw not work.
>
> Thanks
>
> wg
>
>
Re: How can i set xmi id in Ecore editor? [message #406216 is a reply to message #406205] Thu, 04 January 2007 22:43 Go to previous message
Eclipse UserFriend
Originally posted by: stevehorne.gmail.com

This thread:
http://www.eclipsezone.com/eclipse/forums/m92065945.html#920 65945

Contains some additional info on how I got this to work...
Previous Topic:[EMF Generics] nested collections
Next Topic:How to create genmodel with 2 dependencies?
Goto Forum:
  


Current Time: Thu Apr 25 09:29:58 GMT 2024

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

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

Back to the top