|
Re: Use Texo and EMF genmodel together [message #1060113 is a reply to message #1060110] |
Thu, 23 May 2013 07:35 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Ludwig,
Hmm, can you show more of the stacktrace, this part does not show which class can not be found. Are you generating the
EMF model and the texo model classes in different plugins/projects (that is safer I think).
I noticed another post of you on the ecoretools forum. I don't watch that forum, it is better to the use the EMFT forum
for Texo questions:
http://www.eclipse.org/forums/index.php/f/19/
but will reply to your post on the ecoretools forum shortly.
gr. Martin
On 05/23/2013 09:22 AM, Ludwig Moser wrote:
> I got two packages (ecores).
> one for my data model and one for my controller.
> the data model gets generated with TEXO, and the controller shall be generated with EMF genmodel.
> all fine till here (generating works fine and after managing the includes no errors are shown but in the xxxPackage class.
> i was able to resolve the errors (at least none are shown in problems dialog.)
>
> when i finally run the code i get the following error:
>
> java.lang.NoClassDefFoundError: Could not initialize class controller.ControllerPackage$Literals
>
> any ideas why?
> NOTE: there are no references from the controller to the data model itself (only other direction)
> so the controller should not care about the data model! (actually i did not expect any problems with the controller but
> some with the datamodel, which could be tricky due inclusion of an EMF package in a generated TEXO package (it seems
> they get initialized different)
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
|
Re: Use Texo and EMF genmodel together [message #1060155 is a reply to message #1060148] |
Thu, 23 May 2013 11:08 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Ludwig,
I read EMF and EMFT.
These classes are skipped as Texo generates parameterized Map declarations in the java classes, so there is no need for
a separate java class to represent a map entry.
gr. Martin
On 05/23/2013 12:28 PM, Ludwig Moser wrote:
> so my problem now is, that i tried to resolve the errors and now nothing is working anymore :(
> i put everything into one ecore again and try to generate it with texo, but it skips me some eclasses (which are a construct to represent a hashmap - this is my main problem here, as texo does not generate function, and now it even skips generating those classes)
>
> here a crop of my ecore, the selected classes are ignored(not generated) by texo
>
>
> PS: in which part of the forum do you read texo threads? EMF / EMFT / EMF Tools
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
|
Re: Use Texo and EMF genmodel together [message #1060317 is a reply to message #1060305] |
Fri, 24 May 2013 06:48 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Ludwig,
Texo (in general java with standard ORM's) doesn't support listening to changes to objects/lists etc. You can listen to
changes when persisting data (there are several types of JPA listener implementations for that).
EMF generated code on the other hand allows you to register/listen to changes directly in objects. This makes sense as
the EMF objects are used in the UI layer to update views/screens when the underlying model changes.
Texo objects are not running in the UI layer so there instant notifications have no/less value. On the persistence layer
it often has more functional sense to listen to persistence events (onsave, ondelete, aftercommit). These events are
more on transaction level and are fired by the ORM and not by the objects themselves.
Hope my short explaination helps a bit..
gr. Martin
On 05/24/2013 08:22 AM, Ludwig Moser wrote:
> but its an simple Map, not an EMap, which would report changes
> or do i miss something at this point? can i listen for changes in a normal (LinkedHashMap) map?
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.03191 seconds