Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Problem serializing EDataType
Problem serializing EDataType [message #923747] Wed, 26 September 2012 06:50 Go to next message
Al B is currently offline Al B
Messages: 42
Registered: June 2012
Member
I created an ecore mode from scratch via the Ecore Model Editor and generated the model, edit, and editor code using the genmodel.

However, if I use the generated editor to create features, the eTypes are always changed to "ecore:EClass" when I save the resource.

I need this (which I am now forced to add manually):

<eType xsi:type="ecore:EDataType" href="platform:/plugin/org.eclipse.xyz/model/thrusterConfig.ecore#//ThrusterSet"/>

But when I save the resource with the generated editor, then it is changed to this:

<eType xsi:type="ecore:EClass" href="platform:/plugin/org.eclipse.xyz/model/thrusterConfig.ecore#//ThrusterSet"/>


Any suggestion will be greatly appreciated!

[Updated on: Wed, 26 September 2012 06:50]

Report message to a moderator

Re: Problem serializing EData [message #923771 is a reply to message #923747] Wed, 26 September 2012 07:21 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26064
Registered: July 2009
Senior Member
AJ,

Comments below.

On 26/09/2012 8:50 AM, AJ Ben wrote:
> I created an ecore mode from scratch via the Ecore Model Editor and
> generated the model, edit, and editor code using the genmodel.
>
> However, if I use the generated editor to create features, the eTypes
> are always changed to "ecore:EClass" when I save the resource.
Sorry I don't understand how the generated editor can be changing your
Ecore model... I imagine your generated editor edits your instances,
not Ecore models...
>
> I need this (which I am now forced to add manually):
>
> <eType xsi:type="ecore:EDataType"
> href="platform:/plugin/org.eclipse.xyz/model/thrusterConfig.ecore#//ThrusterSet"/>
>
> But when I save the resource with the generated editor, then it is
> changed to this:
>
> <eType xsi:type="ecore:EClass"
> href="platform:/plugin/org.eclipse.xyz/model/thrusterConfig.ecore#//ThrusterSet"/>
So is Thruster an EClass or an EDataType? Is this contained within an
EAttribute or an EReference? Is your thrusterConfig model free of
validation errors? I.e., you don't have more than one classifier with
the same name?
>
>
> Any suggestion will be greatly appreciated!
Re: Problem serializing EData [message #924152 is a reply to message #923771] Wed, 26 September 2012 15:04 Go to previous message
Al B is currently offline Al B
Messages: 42
Registered: June 2012
Member
Ed,

You actually resolved my problem with your last comment/questions (I.e., A classifier with the same name). Thanks again. Cheers!

Previous Topic:Why MetamodelPackage.Literals.Type_Attribute...
Next Topic:How to set EMF Model validation preferences through pluginCustomization ini file
Goto Forum:
  


Current Time: Tue Sep 23 10:30:41 GMT 2014

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

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