How can i set xmi id in Ecore editor? [message #406205] |
Thu, 04 January 2007 14:35 |
Eclipse User |
|
|
|
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 |
Marcelo Paternostro 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
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03426 seconds