Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Problem with plugin and egl files
Problem with plugin and egl files [message #1717472] Mon, 14 December 2015 09:26 Go to next message
Luca Gherardi is currently offline Luca GherardiFriend
Messages: 62
Registered: November 2010
Member
Hi all,

I developed an Eclipse plugin that is using Epsilon to generate a text file starting from an EMF model.

I have 2 egl files. One is the main file, which is called when I push a button. Let's call it A.egl. The other file is called by the main file via TemplateFactory.load(xyz.egl). Let's call it A1.egl.

When I launch the transformation eclipse fails in loading the file A1.egl. The error tells me in which folder A.egl is stored, and actually A1.egl is not there.

I have a second transformation that uses the same file structure (B.egl and B1.egl).

When I checked for the files in the folder that stores A.egl, B.egl was not there. It appeared only after running it's transformation for the first time. However B1.egl is still not there.

Please note that this happens only when I install the plugin. If I run it from source there are not problems.

Any idea of what can be wrong?
Is there a way to force the egl files to be decompressed as soon as the plugin is installed?

Let me know if you need further information.
Thanks in advance.
Re: Problem with plugin and egl files [message #1717479 is a reply to message #1717472] Mon, 14 December 2015 10:17 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Luca,

I'm not sure I fully understand the problem you're encountering. Running EGL transformations from within plugins should work fine without needing to decompress the respective bundles (I suspect that this problem will go away if you parse your root EGL template using its URI - see [1] for an example).

Cheers,
Dimitris

[1] https://github.com/kolovos/pongo/blob/master/com.googlecode.pongo/src/com/googlecode/pongo/PongoGenerator.java
Re: Problem with plugin and egl files [message #1717515 is a reply to message #1717479] Mon, 14 December 2015 14:07 Go to previous messageGo to next message
Luca Gherardi is currently offline Luca GherardiFriend
Messages: 62
Registered: November 2010
Member
Hi Dimitris,

We are actually already passing the URI to the model parser.

I guess that the problem is that when the EGL module executes A.egl, it cannot load A1.egl because this is not in the same folder as A.egl (I don't know why they are not in the same folder).
A.egl is contained in a folder that is created, I suppose, when I install the plugin from the update site.

This is how A.egl looks like:

var myTemplate := TemplateFactory.load('A1.egl');
myTemplate.populate('myModel', myModel);
myTemplate.generate(output.xml);


Now, as I said before, I noticed after installing the plugin, if I run A.egl but not B.egl, then A.egl is present in the folder but B.egl doesn't.
Only when I run B.egl for the first time the file B.egl appears in the same folder where A.egl lives.
That's what made me thought that this files are somehow copied to this folder only on the first usage.
Re: Problem with plugin and egl files [message #1717670 is a reply to message #1717515] Tue, 15 December 2015 16:11 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Luca,

Could you please provide a minimal example [1] I can use to reproduce this locally?

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/
Previous Topic:Disable printing of model information in console
Next Topic:EVL: Method-call issues
Goto Forum:
  


Current Time: Fri Apr 19 10:34:07 GMT 2024

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

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

Back to the top