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 02:50 Go to next message
AJ Ben is currently offline AJ Ben
Messages: 22
Registered: June 2012
Junior 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 02:50]

Report message to a moderator

Re: Problem serializing EData [message #923771 is a reply to message #923747] Wed, 26 September 2012 03:21 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25910
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 11:04 Go to previous message
AJ Ben is currently offline AJ Ben
Messages: 22
Registered: June 2012
Junior 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: Wed Jul 23 04:09:05 EDT 2014

Powered by FUDForum. Page generated in 0.02672 seconds