Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » loading templates from another package(how to load templates from another package)
loading templates from another package [message #719194] Fri, 26 August 2011 06:58 Go to next message
vrm  is currently offline vrm
Messages: 31
Registered: June 2011
Member
I'm not able to load templates that reside in another package.FOr instance,say I have template1.egl in package 'A' and template2.egl in package 'B' ; template1 loads template2.So in template1.egl I have the below code :

var t:Template = TemplateFactory.load("B/template2.egl");

but this doesn't work.It doesn't seem to resolve a relative path.
Re: loading templates from another package [message #719310 is a reply to message #719194] Fri, 26 August 2011 12:45 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Vrm,

Could this be related to this bug? https://bugs.eclipse.org/bugs/show_bug.cgi?id=355820

There's a workaround in the bug report. Could you try adding the workaround (an operation) to your templates, invoking the operation at the top of your templates, and let me know whether that fixes the problem?

Cheers,
Louis.
Re: loading templates from another package [message #719318 is a reply to message #719194] Fri, 26 August 2011 11:38 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen Zschaler
Messages: 228
Registered: July 2009
Senior Member
Hi vrm,

I believe Epsilon does not know about packages (I assume you are
referring to the Java packages in an Eclipse Java project's source
folders). IIRC, it would attempt to resolve your path as relative to the
Eclipse workspace, so it would look for a project named B and a template
file in the root folder of that project.

Cheers,

Steffen

On 26/08/2011 11:58, vrm wrote:
> I'm not able to load templates that reside in another package.FOr
> instance,say I have template1.egl in package 'A' and template2.egl in
> package 'B' ; template1 loads template2.So in template1.egl I have the
> below code :
>
> var t:Template = TemplateFactory.load("B/template2.egl");
>
> but this doesn't work.It doesn't seem to resolve a relative path.
Re: loading templates from another package [message #719345 is a reply to message #719310] Fri, 26 August 2011 14:44 Go to previous messageGo to next message
vrm  is currently offline vrm
Messages: 31
Registered: June 2011
Member
HI Loius,
Yes,it is related to the bug ~355820 ; I tried the workaround but with no luck;
I added the operation definition as suggested in the workaround and had a call to it before I loaded any templates.
Re: loading templates from another package [message #722916 is a reply to message #719345] Wed, 07 September 2011 03:53 Go to previous message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Vrm,

I'm sorry to hear that the workaround didn't fix the issue. Perhaps this is a different problem. Could you send a minimal example that I can use to investigate the problem?

Here are some tips on what to send: http://www.eclipse.org/gmt/epsilon/doc/articles/minimal-examples/

Cheers,
Louis.
Previous Topic:how to read contents from .genmodel(ecore) using EGL
Next Topic:Using Epsilon in Java
Goto Forum:
  


Current Time: Wed Aug 20 22:35:28 EDT 2014

Powered by FUDForum. Page generated in 0.11462 seconds