Re: In my model, Class not found or is abstract [message #540814] |
Thu, 17 June 2010 12:33 |
|
This is a multi-part message in MIME format.
--------------000605090900040001000302
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Hi Maxime,
If I understand correctly, this is more of an EMF question than it is an
M2T question, I added the emf newsgroup to the to: list of this answer.
Laurent Goubet
Obeo
Maxime Lecourt wrote:
> Hi,
>
> I made a metamodel, where Items is my container EClass.
>
> part of the metamodel :
> <?xml version="1.0" encoding="UTF-8"?>
> <ecore:EPackage xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="hla"
> nsURI="http://hla/1.0" nsPrefix="hla">
> <eClassifiers xsi:type="ecore:EClass" name="Items">
> <eStructuralFeatures xsi:type="ecore:EReference" name="entities"
> upperBound="-1"
> eType="#//HEntity" derived="true" containment="true"/>
> </eClassifiers>
>
> So after that I wanted to define a model
> <?xml version="1.0" encoding="UTF-8"?>
> <hla:Items xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:metamodel="http://www.example.org/metamodel"
> xsi:schemaLocation="http://www.example.org/metamodel metamodel/hla.ecore">
> </hla:Items>
>
>
> But I get "Class 'Items' is not found or is abstract". The most
> surprising is that it worked for a while.
--------------000605090900040001000302
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------000605090900040001000302--
|
|
|
|
|
|
Re: In my model, Class not found or is abstract [message #541086 is a reply to message #540814] |
Fri, 18 June 2010 09:45 |
MaximeLecourt Messages: 108 Registered: February 2010 Location: France |
Senior Member |
|
|
From the EMF documentation, there is a tutorial, that would generate a .genmodel file, java files, and finally a library file.
Isn't there a way to generate an empty model file directly from an ecore metamodel, that I can fill with my instances ?
The EMF 2003 book seem's JAVA oriented mostly, there are examples about how to generate JAVA code, it states you can use a XMI serializer, but not how to use it.
One day I shall master M2T, but that day has yet to come...
|
|
|
Re: In my model, Class not found or is abstract [message #541179 is a reply to message #541086] |
Fri, 18 June 2010 14:31 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Maxime,
From the context menu of an EClass you can invoke Create Dynamic
Instance... Both versions of the book talk about the resource framework
and how to use it; the 2nd edition has twice as much content and hence a
lot more detail.
Maxime Lecourt wrote:
> From the EMF documentation, there is a tutorial, that would generate a
> .genmodel file, java files, and finally a library file.
>
> Isn't there a way to generate an empty model file directly from an
> ecore metamodel, that I can fill with my instances ?
>
> The EMF 2003 book seem's JAVA oriented mostly, there are examples
> about how to generate JAVA code, it states you can use a XMI
> serializer, but not how to use it.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03348 seconds