Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Flexmi and load resources
Flexmi and load resources [message #1861594] Fri, 20 October 2023 13:39 Go to next message
Ludovico Iovino is currently offline Ludovico IovinoFriend
Messages: 33
Registered: July 2019
Member
Hello everyone, do you know if there is a way to express the corresponding syntax of "load resource" in an emf model described with flexmi?

What I do with emf model editor is:
-load resource and I load another "emf model" so I can select an instance of the loaded model.

Is there a way to do it in a flexmi file?

Re: Flexmi and load resources [message #1861596 is a reply to message #1861594] Fri, 20 October 2023 14:41 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2134
Registered: July 2009
Location: York, UK
Senior Member

Hi Ludovico,

Yes, this is possible. Please see the import processing instruction, which also works for non-Flexmi models (I'll update the docs shortly). I've also pushed a minimal example that demonstrates this but you'll need to update to the latest interim version of Epsilon for the Flexmi editor to work with importing non-Flexmi models.

Thanks,
Dimitris
Re: Flexmi and load resources [message #1861597 is a reply to message #1861596] Fri, 20 October 2023 18:27 Go to previous messageGo to next message
Ludovico Iovino is currently offline Ludovico IovinoFriend
Messages: 33
Registered: July 2019
Member
Oh totally missed that! :D thanks a lot
Re: Flexmi and load resources [message #1861606 is a reply to message #1861597] Sun, 22 October 2023 09:14 Go to previous messageGo to next message
Ludovico Iovino is currently offline Ludovico IovinoFriend
Messages: 33
Registered: July 2019
Member
Dear Dimitris, I'm processing flexmi models from standalone java code but it seems that the editor resolves the crossreferences between the model and the imported one. Instead if I launch a EVL script from standalone code I can't resolve cross references. Is there any instruction I should set in my java code?
I have already set mymodel.setExpand(true); but it is still unresolved. Moreover I have passed the referenced model as additional emf model to the evl script. Any idea?
Re: Flexmi and load resources [message #1861607 is a reply to message #1861606] Sun, 22 October 2023 10:48 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2134
Registered: July 2009
Location: York, UK
Senior Member

Hi Ludovico,

Could you please share a minimal example I can use to reproduce the behaviour you're encountering?

Thanks,
Dimitris
Re: Flexmi and load resources [message #1861611 is a reply to message #1861607] Sun, 22 October 2023 15:53 Go to previous messageGo to next message
Ludovico Iovino is currently offline Ludovico IovinoFriend
Messages: 33
Registered: July 2019
Member
Sure. Basically I'm reusing EpsilonLiveFunction class since I'm executing that code as a service, but also running the main locally does not work. If you execute the validate.evl with runtimeconfiguration you'll see that the console prints the "implements" list. If you execute it from Java it is empty, while the model myA refers to an imported flexmi file.
Thanks for the help!

[Updated on: Sun, 22 October 2023 16:49]

Report message to a moderator

Re: Flexmi and load resources [message #1861618 is a reply to message #1861611] Mon, 23 October 2023 11:59 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2134
Registered: July 2009
Location: York, UK
Senior Member

Hi Ludovico,

The Flexmi parser tries to resolve the relative ?import: ra.flexmi import against the artificial "flexmi.flexmi" URI in your getInMemoryFlexmiModel() method and therefore fails.

On an unrelated note, as you are parsing the Emfatic text twice (once for each model), this produces two different copies of the same EPackage (metamodel), which is likely to cause other issues down the line.

Thanks,
Dimitris
Re: Flexmi and load resources [message #1861619 is a reply to message #1861618] Mon, 23 October 2023 13:05 Go to previous message
Ludovico Iovino is currently offline Ludovico IovinoFriend
Messages: 33
Registered: July 2019
Member
You're right about the metamodel. Actually they were 2 separated metamodels that i decided to merge, so I can reuse the first loaded one.
Concerning the first problem, I need to import an existing flexmi on the server side. So the first flexmi is passed as string but the second one must be loaded when the serviceImpl is called. I'm getting confused :d
Previous Topic:Java and epsilon ecl syncronizathion
Goto Forum:
  


Current Time: Sat Nov 11 05:56:43 GMT 2023

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

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

Back to the top