Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [ETL] Generated model can't be read or modified(Cross-references between models seem invalid in the editor)
[ETL] Generated model can't be read or modified [message #1065509] Wed, 26 June 2013 08:54 Go to next message
Gaëtan Pruvost is currently offline Gaëtan PruvostFriend
Messages: 19
Registered: June 2013
Junior Member
Hi,

I am currently experimenting with epsilon, so excuse me if this is a noob question...

I have a toy project in which I have two meta-models called MMA and MMB.
MMB is designed to provide additionnal data to MMA without subclassing existing concepts (for performance reasons we want to avoid copying the input model).

The basic approach is to have concept B from MMB thats relate to a concept A from MMA by a "ref" property. I've created an ETL module that creates B instances to wrap every A instances.

Now the problem is: when I open the generated model file (with either exeed or emf editor), the cross-reference is empty. When I open the file as text, the cross-reference is here (it seems valid XMI) but the editor fails to show it or even modify it...
I've been strugling on that for a couple of days, I can find workarounds to not have this design but no real solution to the problem... Am I doing anything wrong in the meta-model definition or in the rules?

I attached the zip containing a simplified minimal version of my problem. ma.xmi is the source model and mb is the generated one.

Thanks in advance

[EDIT] My eclipse version is Eclipse modelling "Juno Service Release 2". In fact is the one downloaded from the epsilon website.
  • Attachment: tests.zip
    (Size: 3.10KB, Downloaded 27 times)

[Updated on: Wed, 26 June 2013 08:57]

Report message to a moderator

Re: [ETL] Generated model can't be read or modified [message #1065515 is a reply to message #1065509] Wed, 26 June 2013 09:14 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 918
Registered: July 2009
Senior Member
Hi Gaëtan,

I'm afraid I can't reproduce this. If I register mma.ecore and mmb.ecore and then open mb.xmi using Exeed, references to ma.xmi seem to be working fine.

Cheers,
Dimitris
Re: [ETL] Generated model can't be read or modified [message #1065517 is a reply to message #1065515] Wed, 26 June 2013 09:45 Go to previous messageGo to next message
Gaëtan Pruvost is currently offline Gaëtan PruvostFriend
Messages: 19
Registered: June 2013
Junior Member
Ok, I started with a fresh new eclipse app (just restarted in the same workspace) and it worked...
Then:
a) I tried my original project (not the simplified one I sent) => it worked.
b) I registered the EPackeges of my original problem (I realized I had forgotten to do it) => The error reappeared.

Then I restarted the eclipse again, went through the same process and everything went ok. I could not reproduce the problem.
Looking at error log view, I get some message "Unhandled event loop exception" from "plugin org.eclipse.ui" when the problem occurs.

Conclusion:
It seems to be some kind of weird instability inside my eclipse, not related to epsilon...
I'll see how it behaves in the next few days.

Thanks for the quick reply.
Re: [ETL] Generated model can't be read or modified [message #1065518 is a reply to message #1065517] Wed, 26 June 2013 09:56 Go to previous messageGo to next message
Gaëtan Pruvost is currently offline Gaëtan PruvostFriend
Messages: 19
Registered: June 2013
Junior Member
BTW, this investigations raised 2 questions regarding epsilon:

- About the "Register EPackages":
Does it keep ecore files inside my workspace project registered after a reboot?
Do I need to re-register after a change in the model (it looks like not but just to be sure)?
Can I un-register an EPackage? How?


- About XMI serialization:
I see that Epsilon serialization relies heavily on XPath elements referencing (instead of xmi:id). While this is perfectly valid, it seems to be discouraged (see link below, point 7):
<kttp://>java.dzone.com/articles/10-common-emf-mistakes
I'm no EMF expert so I don't know what's the best thing to do, certainly having Ids everywhere will pollute the model (especially when using HUTN).

But in the cases where it would be usefull, is there any way to force Epsilon using Ids when saving a model?

Best regards
Re: [ETL] Generated model can't be read or modified [message #1065528 is a reply to message #1065518] Wed, 26 June 2013 11:16 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 918
Registered: July 2009
Senior Member
Hi Gaëtan,

Please see comments below.

> - About the "Register EPackages":
> Does it keep ecore files inside my workspace project registered after a reboot?

Yes

> Do I need to re-register after a change in the model (it looks like not but just to be sure)?

No

> Can I un-register an EPackage? How?

Yes. You can do this through Preferences->Epsilon->EMF Registry (you may need to restart your Eclipse after removing an Ecore model from the list)

> - About XMI serialization:
> I see that Epsilon serialization relies heavily on XPath elements referencing (instead of xmi:id). While this is
> perfectly valid, it seems to be discouraged (see link below, point 7):
> <kttp://>java.dzone.com/articles/10-common-emf-mistakes
> I'm no EMF expert so I don't know what's the best thing to do, certainly having Ids everywhere will pollute the
> model (especially when using HUTN).

It really depends on the use case.

> But in the cases where it would be usefull, is there any way to force Epsilon using Ids when saving a model?

Yes. If the name of your model in the launch configuration is X, the following line should do the trick

X.resource.useXmiIds = true;

Cheers,
Dimitris
Re: [ETL] Generated model can't be read or modified [message #1065538 is a reply to message #1065528] Wed, 26 June 2013 12:10 Go to previous message
Gaëtan Pruvost is currently offline Gaëtan PruvostFriend
Messages: 19
Registered: June 2013
Junior Member
Thanks a lot dimitris!

BR,
Gaëtan
Previous Topic:[ETL] Specify metamodels in transformation for content assist/validation
Next Topic:How do I add derived (cached) EOL operations to my EMF model?
Goto Forum:
  


Current Time: Fri Dec 19 02:15:23 GMT 2014

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

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