Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » One model + EGL; multiple targets
One model + EGL; multiple targets [message #8255] Thu, 08 January 2009 18:07 Go to next message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Hia there,

I was wondering whether anyone has any suggestions for my following
problem. Given a model (from someone else) that can contain an arbitrary
number of instances of the same meta class (e.g., x1, x2 and x3 are in the
model, and are instances of meta class X), I would like to print values
based on each of these instances (which I can find in the model), to
separate files -- for example, to x1.txt, x2.txt and x3.txt.

Since text needs to be printed, EGL seemed the sensible choice. The
difficulty I have is how to use EGL, when one model has been loaded, to
print to several target files... Do you know if this is possible, or
indeed, whether this approach is sensible? Any help would be very much
appreciated.

Thanks!
Re: One model + EGL; multiple targets [message #8288 is a reply to message #8255] Thu, 08 January 2009 18:23 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

This is feasible. In the following example when the driver.egl template
is executed it calls delegate.egl 10 times, each time with a different
value for parameter foo, and consequently generates 10 txt files.

----------

driver.egl:

[%
for (i in Sequence{1..10}) {
var delegate : Template;
-- Pass parameters to the template
delegate := TemplateFactory.load('delegate.egl');
delegate.populate('foo', i);
delegate.store(i+'.txt', true);
}
%]

delegate.egl:

[%=foo%]

----------

A more complete example is available in
http://dev.eclipse.org/viewsvn/index.cgi/trunk/examples/org. eclipse.epsilon.examples.egldoc/?root=Modeling_EPSILON
where EGL is used to transform an ECore model into javadoc-like HTML.

Cheers,
Dimitris

Edward Turner wrote:
> Hia there,
>
> I was wondering whether anyone has any suggestions for my following
> problem. Given a model (from someone else) that can contain an arbitrary
> number of instances of the same meta class (e.g., x1, x2 and x3 are in
> the model, and are instances of meta class X), I would like to print
> values based on each of these instances (which I can find in the model),
> to separate files -- for example, to x1.txt, x2.txt and x3.txt.
> Since text needs to be printed, EGL seemed the sensible choice. The
> difficulty I have is how to use EGL, when one model has been loaded, to
> print to several target files... Do you know if this is possible, or
> indeed, whether this approach is sensible? Any help would be very much
> appreciated.
>
> Thanks!
>
Re: One model + EGL; multiple targets [message #8320 is a reply to message #8288] Fri, 09 January 2009 14:42 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Ahh great -- thanks Dimitris.

Sorry, I hadn't seen the documentation for this (I'd mainly been looking
in the Epsilon book). For anyone else, and a reminder to me, there's handy
info at:

http://www.springerlink.com/index/h182m536v0471545.pdf
http://www.eclipse.org/gmt/epsilon/cinema/EglVariables.htm
(look out for TemplateFactory)

Also, something I wasn't 100% sure about, but which was confirmed through
a little test. (This seems obvious now, but will say anyway)... Given
something like:

driver.egl:

var t : Template := TemplateFactory.load('x.egl');
t.populate('obj', SomeObject);
...

In x.egl: one can refer to the SomeObject object via the parameter
reference obj, and it can reach any other object associated with
SomeObject, by navigating the various associations from obj.

Ta,
Edd


Dimitrios Kolovos wrote:

> Hi Edd,

> This is feasible. In the following example when the driver.egl template
> is executed it calls delegate.egl 10 times, each time with a different
> value for parameter foo, and consequently generates 10 txt files.

> ----------

> driver.egl:

> [%
> for (i in Sequence{1..10}) {
> var delegate : Template;
> -- Pass parameters to the template
> delegate := TemplateFactory.load('delegate.egl');
> delegate.populate('foo', i);
> delegate.store(i+'.txt', true);
> }
> %]

> delegate.egl:

> [%=foo%]

> ----------

> A more complete example is available in
>
http://dev.eclipse.org/viewsvn/index.cgi/trunk/examples/org. eclipse.epsilon.examples.egldoc/?root=Modeling_EPSILON
> where EGL is used to transform an ECore model into javadoc-like HTML.

> Cheers,
> Dimitris

> Edward Turner wrote:
>> Hia there,
>>
>> I was wondering whether anyone has any suggestions for my following
>> problem. Given a model (from someone else) that can contain an arbitrary
>> number of instances of the same meta class (e.g., x1, x2 and x3 are in
>> the model, and are instances of meta class X), I would like to print
>> values based on each of these instances (which I can find in the model),
>> to separate files -- for example, to x1.txt, x2.txt and x3.txt.
>> Since text needs to be printed, EGL seemed the sensible choice. The
>> difficulty I have is how to use EGL, when one model has been loaded, to
>> print to several target files... Do you know if this is possible, or
>> indeed, whether this approach is sensible? Any help would be very much
>> appreciated.
>>
>> Thanks!
>>
Re: One model + EGL; multiple targets [message #8352 is a reply to message #8320] Fri, 09 January 2009 15:24 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

Glad this helped! I was planning to fill in the EGL section of the book
but at some point it slipped my mind. I'll do that shortly.

Cheers,
Dimitris

Edward Turner wrote:
> Ahh great -- thanks Dimitris.
>
> Sorry, I hadn't seen the documentation for this (I'd mainly been looking
> in the Epsilon book). For anyone else, and a reminder to me, there's
> handy info at:
>
> http://www.springerlink.com/index/h182m536v0471545.pdf
> http://www.eclipse.org/gmt/epsilon/cinema/EglVariables.htm
> (look out for TemplateFactory)
>
> Also, something I wasn't 100% sure about, but which was confirmed
> through a little test. (This seems obvious now, but will say anyway)...
> Given something like:
>
> driver.egl:
>
> var t : Template := TemplateFactory.load('x.egl');
> t.populate('obj', SomeObject);
> ..
>
> In x.egl: one can refer to the SomeObject object via the parameter
> reference obj, and it can reach any other object associated with
> SomeObject, by navigating the various associations from obj.
>
> Ta,
> Edd
>
>
> Dimitrios Kolovos wrote:
>
>> Hi Edd,
>
>> This is feasible. In the following example when the driver.egl
>> template is executed it calls delegate.egl 10 times, each time with a
>> different value for parameter foo, and consequently generates 10 txt
>> files.
>
>> ----------
>
>> driver.egl:
>
>> [%
>> for (i in Sequence{1..10}) {
>> var delegate : Template;
>> -- Pass parameters to the template
>> delegate := TemplateFactory.load('delegate.egl');
>> delegate.populate('foo', i);
>> delegate.store(i+'.txt', true);
>> }
>> %]
>
>> delegate.egl:
>
>> [%=foo%]
>
>> ----------
>
>> A more complete example is available in
> http://dev.eclipse.org/viewsvn/index.cgi/trunk/examples/org. eclipse.epsilon.examples.egldoc/?root=Modeling_EPSILON
>
>> where EGL is used to transform an ECore model into javadoc-like HTML.
>
>> Cheers,
>> Dimitris
>
>> Edward Turner wrote:
>>> Hia there,
>>>
>>> I was wondering whether anyone has any suggestions for my following
>>> problem. Given a model (from someone else) that can contain an
>>> arbitrary number of instances of the same meta class (e.g., x1, x2
>>> and x3 are in the model, and are instances of meta class X), I would
>>> like to print values based on each of these instances (which I can
>>> find in the model), to separate files -- for example, to x1.txt,
>>> x2.txt and x3.txt.
>>> Since text needs to be printed, EGL seemed the sensible choice. The
>>> difficulty I have is how to use EGL, when one model has been loaded,
>>> to print to several target files... Do you know if this is possible,
>>> or indeed, whether this approach is sensible? Any help would be very
>>> much appreciated.
>>>
>>> Thanks!
>>>
>
Re: One model + EGL; multiple targets [message #8384 is a reply to message #8288] Fri, 09 January 2009 16:42 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Just a quick follow up q,

Given a driver egl script, such as the one you defined, when running this
via an Ant task (and not a launch configuration) it leads to the error:

[Driver.egl] Internal error: java.lang.IllegalArgumentException: URI is
not absolute
[Driver.egl] at java.net.URI.toURL[URI.java:1080]
[Driver.egl] at
org.eclipse.epsilon.egl.EglModule.parse[EglModule.java:97]
[Driver.egl] at
org.eclipse.epsilon.egl.types.EglTemplate.<init>[EglTemplate.java:48]
[Driver.egl] at
org.eclipse.epsilon.egl.types.EglFileGeneratingTemplate.<init >[EglFileGeneratingTemplate.java:50]
[Driver.egl] at
org.eclipse.epsilon.egl.template.FileGeneratingTemplateFacto ry.load[FileGeneratingTemplateFactory.java:51]
...

.. when the Ant task is as follows:

<epsilon.egl src="Driver.egl">
<model ref="X"/>
</epsilon.egl>

(and I've tried adding a target attribute to the epsilon.egl task, even
though I don't really want to specify the target here -- it is determined
by the egl script. Either way, I got the error).

I was wondering whether this was because of some conflict when internally
setting the target files for the egl?? If this is a bug I can submit a
report.

Ta again,

Edd
Re: One model + EGL; multiple targets [message #8412 is a reply to message #8384] Fri, 09 January 2009 17:57 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

It seems to be a bug indeed. Could you please file a bug report? I'll
look into it tomorrow morning.

Dimitris

Edward Turner wrote:
> Just a quick follow up q,
>
> Given a driver egl script, such as the one you defined, when running
> this via an Ant task (and not a launch configuration) it leads to the
> error:
>
> [Driver.egl] Internal error: java.lang.IllegalArgumentException: URI is
> not absolute
> [Driver.egl] at java.net.URI.toURL[URI.java:1080]
> [Driver.egl] at
> org.eclipse.epsilon.egl.EglModule.parse[EglModule.java:97]
> [Driver.egl] at
> org.eclipse.epsilon.egl.types.EglTemplate.<init>[EglTemplate.java:48]
> [Driver.egl] at
> org.eclipse.epsilon.egl.types.EglFileGeneratingTemplate.<init >[EglFileGeneratingTemplate.java:50]
>
> [Driver.egl] at
> org.eclipse.epsilon.egl.template.FileGeneratingTemplateFacto ry.load[FileGeneratingTemplateFactory.java:51]
>
> ...
>
> . when the Ant task is as follows:
>
> <epsilon.egl src="Driver.egl">
> <model ref="X"/>
> </epsilon.egl>
>
> (and I've tried adding a target attribute to the epsilon.egl task, even
> though I don't really want to specify the target here -- it is
> determined by the egl script. Either way, I got the error).
>
> I was wondering whether this was because of some conflict when
> internally setting the target files for the egl?? If this is a bug I can
> submit a report.
>
> Ta again,
>
> Edd
>
Re: One model + EGL; multiple targets [message #8442 is a reply to message #8412] Fri, 09 January 2009 18:10 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

I (think) I've fixed it. Please update the org.eclipse.epsilon.workflow
project to pick up the fix.

Cheers,
Dimitris

Dimitrios Kolovos wrote:
> Hi Edd,
>
> It seems to be a bug indeed. Could you please file a bug report? I'll
> look into it tomorrow morning.
>
> Dimitris
>
> Edward Turner wrote:
>> Just a quick follow up q,
>>
>> Given a driver egl script, such as the one you defined, when running
>> this via an Ant task (and not a launch configuration) it leads to the
>> error:
>>
>> [Driver.egl] Internal error: java.lang.IllegalArgumentException: URI
>> is not absolute
>> [Driver.egl] at java.net.URI.toURL[URI.java:1080]
>> [Driver.egl] at
>> org.eclipse.epsilon.egl.EglModule.parse[EglModule.java:97]
>> [Driver.egl] at
>> org.eclipse.epsilon.egl.types.EglTemplate.<init>[EglTemplate.java:48]
>> [Driver.egl] at
>> org.eclipse.epsilon.egl.types.EglFileGeneratingTemplate.<init >[EglFileGeneratingTemplate.java:50]
>>
>> [Driver.egl] at
>> org.eclipse.epsilon.egl.template.FileGeneratingTemplateFacto ry.load[FileGeneratingTemplateFactory.java:51]
>>
>> ...
>>
>> . when the Ant task is as follows:
>>
>> <epsilon.egl src="Driver.egl">
>> <model ref="X"/>
>> </epsilon.egl>
>>
>> (and I've tried adding a target attribute to the epsilon.egl task,
>> even though I don't really want to specify the target here -- it is
>> determined by the egl script. Either way, I got the error).
>>
>> I was wondering whether this was because of some conflict when
>> internally setting the target files for the egl?? If this is a bug I
>> can submit a report.
>>
>> Ta again,
>>
>> Edd
>>
Re: One model + EGL; multiple targets [message #8472 is a reply to message #8442] Mon, 12 January 2009 13:09 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Hi Dimitris,

Yes, that's great -- all seems fine and dandy now! (and I've submitted a
bug report so it's recorded)

Ta,
Edd

Dimitrios Kolovos wrote:

> Hi Edd,

> I (think) I've fixed it. Please update the org.eclipse.epsilon.workflow
> project to pick up the fix.

> Cheers,
> Dimitris

> Dimitrios Kolovos wrote:
>> Hi Edd,
>>
>> It seems to be a bug indeed. Could you please file a bug report? I'll
>> look into it tomorrow morning.
>>
>> Dimitris
>>
>> Edward Turner wrote:
>>> Just a quick follow up q,
>>>
>>> Given a driver egl script, such as the one you defined, when running
>>> this via an Ant task (and not a launch configuration) it leads to the
>>> error:
>>>
>>> [Driver.egl] Internal error: java.lang.IllegalArgumentException: URI
>>> is not absolute
>>> [Driver.egl] at java.net.URI.toURL[URI.java:1080]
>>> [Driver.egl] at
>>> org.eclipse.epsilon.egl.EglModule.parse[EglModule.java:97]
>>> [Driver.egl] at
>>> org.eclipse.epsilon.egl.types.EglTemplate.<init>[EglTemplate.java:48]
>>> [Driver.egl] at
>>>
org.eclipse.epsilon.egl.types.EglFileGeneratingTemplate.<init >[EglFileGeneratingTemplate.java:50]
>>>
>>> [Driver.egl] at
>>>
org.eclipse.epsilon.egl.template.FileGeneratingTemplateFacto ry.load[FileGeneratingTemplateFactory.java:51]
>>>
>>> ...
>>>
>>> . when the Ant task is as follows:
>>>
>>> <epsilon.egl src="Driver.egl">
>>> <model ref="X"/>
>>> </epsilon.egl>
>>>
>>> (and I've tried adding a target attribute to the epsilon.egl task,
>>> even though I don't really want to specify the target here -- it is
>>> determined by the egl script. Either way, I got the error).
>>>
>>> I was wondering whether this was because of some conflict when
>>> internally setting the target files for the egl?? If this is a bug I
>>> can submit a report.
>>>
>>> Ta again,
>>>
>>> Edd
>>>
Re: One model + EGL; multiple targets [message #8502 is a reply to message #8472] Mon, 12 January 2009 13:11 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Great! Just for the record the related bug is
https://bugs.eclipse.org/bugs/show_bug.cgi?id=260702

Cheers,
Dimitris

Edward Turner wrote:
> Hi Dimitris,
>
> Yes, that's great -- all seems fine and dandy now! (and I've submitted a
> bug report so it's recorded)
>
> Ta,
> Edd
>
> Dimitrios Kolovos wrote:
>
>> Hi Edd,
>
>> I (think) I've fixed it. Please update the
>> org.eclipse.epsilon.workflow project to pick up the fix.
>
>> Cheers,
>> Dimitris
>
>> Dimitrios Kolovos wrote:
>>> Hi Edd,
>>>
>>> It seems to be a bug indeed. Could you please file a bug report? I'll
>>> look into it tomorrow morning.
>>>
>>> Dimitris
>>>
>>> Edward Turner wrote:
>>>> Just a quick follow up q,
>>>>
>>>> Given a driver egl script, such as the one you defined, when running
>>>> this via an Ant task (and not a launch configuration) it leads to
>>>> the error:
>>>>
>>>> [Driver.egl] Internal error: java.lang.IllegalArgumentException:
>>>> URI is not absolute
>>>> [Driver.egl] at java.net.URI.toURL[URI.java:1080]
>>>> [Driver.egl] at
>>>> org.eclipse.epsilon.egl.EglModule.parse[EglModule.java:97]
>>>> [Driver.egl] at
>>>> org.eclipse.epsilon.egl.types.EglTemplate.<init>[EglTemplate.java:48]
>>>> [Driver.egl] at
> org.eclipse.epsilon.egl.types.EglFileGeneratingTemplate.<init >[EglFileGeneratingTemplate.java:50]
>
>>>>
>>>> [Driver.egl] at
> org.eclipse.epsilon.egl.template.FileGeneratingTemplateFacto ry.load[FileGeneratingTemplateFactory.java:51]
>
>>>>
>>>> ...
>>>>
>>>> . when the Ant task is as follows:
>>>>
>>>> <epsilon.egl src="Driver.egl">
>>>> <model ref="X"/>
>>>> </epsilon.egl>
>>>>
>>>> (and I've tried adding a target attribute to the epsilon.egl task,
>>>> even though I don't really want to specify the target here -- it is
>>>> determined by the egl script. Either way, I got the error).
>>>>
>>>> I was wondering whether this was because of some conflict when
>>>> internally setting the target files for the egl?? If this is a bug I
>>>> can submit a report.
>>>>
>>>> Ta again,
>>>>
>>>> Edd
>>>>
>
Re: One model + EGL; multiple targets [message #563646 is a reply to message #8255] Thu, 08 January 2009 18:23 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

This is feasible. In the following example when the driver.egl template
is executed it calls delegate.egl 10 times, each time with a different
value for parameter foo, and consequently generates 10 txt files.

----------

driver.egl:

[%
for (i in Sequence{1..10}) {
var delegate : Template;
-- Pass parameters to the template
delegate := TemplateFactory.load('delegate.egl');
delegate.populate('foo', i);
delegate.store(i+'.txt', true);
}
%]

delegate.egl:

[%=foo%]

----------

A more complete example is available in
http://dev.eclipse.org/viewsvn/index.cgi/trunk/examples/org. eclipse.epsilon.examples.egldoc/?root=Modeling_EPSILON
where EGL is used to transform an ECore model into javadoc-like HTML.

Cheers,
Dimitris

Edward Turner wrote:
> Hia there,
>
> I was wondering whether anyone has any suggestions for my following
> problem. Given a model (from someone else) that can contain an arbitrary
> number of instances of the same meta class (e.g., x1, x2 and x3 are in
> the model, and are instances of meta class X), I would like to print
> values based on each of these instances (which I can find in the model),
> to separate files -- for example, to x1.txt, x2.txt and x3.txt.
> Since text needs to be printed, EGL seemed the sensible choice. The
> difficulty I have is how to use EGL, when one model has been loaded, to
> print to several target files... Do you know if this is possible, or
> indeed, whether this approach is sensible? Any help would be very much
> appreciated.
>
> Thanks!
>
Re: One model + EGL; multiple targets [message #563667 is a reply to message #8288] Fri, 09 January 2009 14:42 Go to previous message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Ahh great -- thanks Dimitris.

Sorry, I hadn't seen the documentation for this (I'd mainly been looking
in the Epsilon book). For anyone else, and a reminder to me, there's handy
info at:

http://www.springerlink.com/index/h182m536v0471545.pdf
http://www.eclipse.org/gmt/epsilon/cinema/EglVariables.htm
(look out for TemplateFactory)

Also, something I wasn't 100% sure about, but which was confirmed through
a little test. (This seems obvious now, but will say anyway)... Given
something like:

driver.egl:

var t : Template := TemplateFactory.load('x.egl');
t.populate('obj', SomeObject);
...

In x.egl: one can refer to the SomeObject object via the parameter
reference obj, and it can reach any other object associated with
SomeObject, by navigating the various associations from obj.

Ta,
Edd


Dimitrios Kolovos wrote:

> Hi Edd,

> This is feasible. In the following example when the driver.egl template
> is executed it calls delegate.egl 10 times, each time with a different
> value for parameter foo, and consequently generates 10 txt files.

> ----------

> driver.egl:

> [%
> for (i in Sequence{1..10}) {
> var delegate : Template;
> -- Pass parameters to the template
> delegate := TemplateFactory.load('delegate.egl');
> delegate.populate('foo', i);
> delegate.store(i+'.txt', true);
> }
> %]

> delegate.egl:

> [%=foo%]

> ----------

> A more complete example is available in
>
http://dev.eclipse.org/viewsvn/index.cgi/trunk/examples/org. eclipse.epsilon.examples.egldoc/?root=Modeling_EPSILON
> where EGL is used to transform an ECore model into javadoc-like HTML.

> Cheers,
> Dimitris

> Edward Turner wrote:
>> Hia there,
>>
>> I was wondering whether anyone has any suggestions for my following
>> problem. Given a model (from someone else) that can contain an arbitrary
>> number of instances of the same meta class (e.g., x1, x2 and x3 are in
>> the model, and are instances of meta class X), I would like to print
>> values based on each of these instances (which I can find in the model),
>> to separate files -- for example, to x1.txt, x2.txt and x3.txt.
>> Since text needs to be printed, EGL seemed the sensible choice. The
>> difficulty I have is how to use EGL, when one model has been loaded, to
>> print to several target files... Do you know if this is possible, or
>> indeed, whether this approach is sensible? Any help would be very much
>> appreciated.
>>
>> Thanks!
>>
Re: One model + EGL; multiple targets [message #563691 is a reply to message #8320] Fri, 09 January 2009 15:24 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

Glad this helped! I was planning to fill in the EGL section of the book
but at some point it slipped my mind. I'll do that shortly.

Cheers,
Dimitris

Edward Turner wrote:
> Ahh great -- thanks Dimitris.
>
> Sorry, I hadn't seen the documentation for this (I'd mainly been looking
> in the Epsilon book). For anyone else, and a reminder to me, there's
> handy info at:
>
> http://www.springerlink.com/index/h182m536v0471545.pdf
> http://www.eclipse.org/gmt/epsilon/cinema/EglVariables.htm
> (look out for TemplateFactory)
>
> Also, something I wasn't 100% sure about, but which was confirmed
> through a little test. (This seems obvious now, but will say anyway)...
> Given something like:
>
> driver.egl:
>
> var t : Template := TemplateFactory.load('x.egl');
> t.populate('obj', SomeObject);
> ..
>
> In x.egl: one can refer to the SomeObject object via the parameter
> reference obj, and it can reach any other object associated with
> SomeObject, by navigating the various associations from obj.
>
> Ta,
> Edd
>
>
> Dimitrios Kolovos wrote:
>
>> Hi Edd,
>
>> This is feasible. In the following example when the driver.egl
>> template is executed it calls delegate.egl 10 times, each time with a
>> different value for parameter foo, and consequently generates 10 txt
>> files.
>
>> ----------
>
>> driver.egl:
>
>> [%
>> for (i in Sequence{1..10}) {
>> var delegate : Template;
>> -- Pass parameters to the template
>> delegate := TemplateFactory.load('delegate.egl');
>> delegate.populate('foo', i);
>> delegate.store(i+'.txt', true);
>> }
>> %]
>
>> delegate.egl:
>
>> [%=foo%]
>
>> ----------
>
>> A more complete example is available in
> http://dev.eclipse.org/viewsvn/index.cgi/trunk/examples/org. eclipse.epsilon.examples.egldoc/?root=Modeling_EPSILON
>
>> where EGL is used to transform an ECore model into javadoc-like HTML.
>
>> Cheers,
>> Dimitris
>
>> Edward Turner wrote:
>>> Hia there,
>>>
>>> I was wondering whether anyone has any suggestions for my following
>>> problem. Given a model (from someone else) that can contain an
>>> arbitrary number of instances of the same meta class (e.g., x1, x2
>>> and x3 are in the model, and are instances of meta class X), I would
>>> like to print values based on each of these instances (which I can
>>> find in the model), to separate files -- for example, to x1.txt,
>>> x2.txt and x3.txt.
>>> Since text needs to be printed, EGL seemed the sensible choice. The
>>> difficulty I have is how to use EGL, when one model has been loaded,
>>> to print to several target files... Do you know if this is possible,
>>> or indeed, whether this approach is sensible? Any help would be very
>>> much appreciated.
>>>
>>> Thanks!
>>>
>
Re: One model + EGL; multiple targets [message #563706 is a reply to message #8288] Fri, 09 January 2009 16:42 Go to previous message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Just a quick follow up q,

Given a driver egl script, such as the one you defined, when running this
via an Ant task (and not a launch configuration) it leads to the error:

[Driver.egl] Internal error: java.lang.IllegalArgumentException: URI is
not absolute
[Driver.egl] at java.net.URI.toURL[URI.java:1080]
[Driver.egl] at
org.eclipse.epsilon.egl.EglModule.parse[EglModule.java:97]
[Driver.egl] at
org.eclipse.epsilon.egl.types.EglTemplate.<init>[EglTemplate.java:48]
[Driver.egl] at
org.eclipse.epsilon.egl.types.EglFileGeneratingTemplate.<init >[EglFileGeneratingTemplate.java:50]
[Driver.egl] at
org.eclipse.epsilon.egl.template.FileGeneratingTemplateFacto ry.load[FileGeneratingTemplateFactory.java:51]
...

.. when the Ant task is as follows:

<epsilon.egl src="Driver.egl">
<model ref="X"/>
</epsilon.egl>

(and I've tried adding a target attribute to the epsilon.egl task, even
though I don't really want to specify the target here -- it is determined
by the egl script. Either way, I got the error).

I was wondering whether this was because of some conflict when internally
setting the target files for the egl?? If this is a bug I can submit a
report.

Ta again,

Edd
Re: One model + EGL; multiple targets [message #563728 is a reply to message #8384] Fri, 09 January 2009 17:57 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

It seems to be a bug indeed. Could you please file a bug report? I'll
look into it tomorrow morning.

Dimitris

Edward Turner wrote:
> Just a quick follow up q,
>
> Given a driver egl script, such as the one you defined, when running
> this via an Ant task (and not a launch configuration) it leads to the
> error:
>
> [Driver.egl] Internal error: java.lang.IllegalArgumentException: URI is
> not absolute
> [Driver.egl] at java.net.URI.toURL[URI.java:1080]
> [Driver.egl] at
> org.eclipse.epsilon.egl.EglModule.parse[EglModule.java:97]
> [Driver.egl] at
> org.eclipse.epsilon.egl.types.EglTemplate.<init>[EglTemplate.java:48]
> [Driver.egl] at
> org.eclipse.epsilon.egl.types.EglFileGeneratingTemplate.<init >[EglFileGeneratingTemplate.java:50]
>
> [Driver.egl] at
> org.eclipse.epsilon.egl.template.FileGeneratingTemplateFacto ry.load[FileGeneratingTemplateFactory.java:51]
>
> ...
>
> . when the Ant task is as follows:
>
> <epsilon.egl src="Driver.egl">
> <model ref="X"/>
> </epsilon.egl>
>
> (and I've tried adding a target attribute to the epsilon.egl task, even
> though I don't really want to specify the target here -- it is
> determined by the egl script. Either way, I got the error).
>
> I was wondering whether this was because of some conflict when
> internally setting the target files for the egl?? If this is a bug I can
> submit a report.
>
> Ta again,
>
> Edd
>
Re: One model + EGL; multiple targets [message #563749 is a reply to message #8412] Fri, 09 January 2009 18:10 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

I (think) I've fixed it. Please update the org.eclipse.epsilon.workflow
project to pick up the fix.

Cheers,
Dimitris

Dimitrios Kolovos wrote:
> Hi Edd,
>
> It seems to be a bug indeed. Could you please file a bug report? I'll
> look into it tomorrow morning.
>
> Dimitris
>
> Edward Turner wrote:
>> Just a quick follow up q,
>>
>> Given a driver egl script, such as the one you defined, when running
>> this via an Ant task (and not a launch configuration) it leads to the
>> error:
>>
>> [Driver.egl] Internal error: java.lang.IllegalArgumentException: URI
>> is not absolute
>> [Driver.egl] at java.net.URI.toURL[URI.java:1080]
>> [Driver.egl] at
>> org.eclipse.epsilon.egl.EglModule.parse[EglModule.java:97]
>> [Driver.egl] at
>> org.eclipse.epsilon.egl.types.EglTemplate.<init>[EglTemplate.java:48]
>> [Driver.egl] at
>> org.eclipse.epsilon.egl.types.EglFileGeneratingTemplate.<init >[EglFileGeneratingTemplate.java:50]
>>
>> [Driver.egl] at
>> org.eclipse.epsilon.egl.template.FileGeneratingTemplateFacto ry.load[FileGeneratingTemplateFactory.java:51]
>>
>> ...
>>
>> . when the Ant task is as follows:
>>
>> <epsilon.egl src="Driver.egl">
>> <model ref="X"/>
>> </epsilon.egl>
>>
>> (and I've tried adding a target attribute to the epsilon.egl task,
>> even though I don't really want to specify the target here -- it is
>> determined by the egl script. Either way, I got the error).
>>
>> I was wondering whether this was because of some conflict when
>> internally setting the target files for the egl?? If this is a bug I
>> can submit a report.
>>
>> Ta again,
>>
>> Edd
>>
Re: One model + EGL; multiple targets [message #563757 is a reply to message #8442] Mon, 12 January 2009 13:09 Go to previous message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Hi Dimitris,

Yes, that's great -- all seems fine and dandy now! (and I've submitted a
bug report so it's recorded)

Ta,
Edd

Dimitrios Kolovos wrote:

> Hi Edd,

> I (think) I've fixed it. Please update the org.eclipse.epsilon.workflow
> project to pick up the fix.

> Cheers,
> Dimitris

> Dimitrios Kolovos wrote:
>> Hi Edd,
>>
>> It seems to be a bug indeed. Could you please file a bug report? I'll
>> look into it tomorrow morning.
>>
>> Dimitris
>>
>> Edward Turner wrote:
>>> Just a quick follow up q,
>>>
>>> Given a driver egl script, such as the one you defined, when running
>>> this via an Ant task (and not a launch configuration) it leads to the
>>> error:
>>>
>>> [Driver.egl] Internal error: java.lang.IllegalArgumentException: URI
>>> is not absolute
>>> [Driver.egl] at java.net.URI.toURL[URI.java:1080]
>>> [Driver.egl] at
>>> org.eclipse.epsilon.egl.EglModule.parse[EglModule.java:97]
>>> [Driver.egl] at
>>> org.eclipse.epsilon.egl.types.EglTemplate.<init>[EglTemplate.java:48]
>>> [Driver.egl] at
>>>
org.eclipse.epsilon.egl.types.EglFileGeneratingTemplate.<init >[EglFileGeneratingTemplate.java:50]
>>>
>>> [Driver.egl] at
>>>
org.eclipse.epsilon.egl.template.FileGeneratingTemplateFacto ry.load[FileGeneratingTemplateFactory.java:51]
>>>
>>> ...
>>>
>>> . when the Ant task is as follows:
>>>
>>> <epsilon.egl src="Driver.egl">
>>> <model ref="X"/>
>>> </epsilon.egl>
>>>
>>> (and I've tried adding a target attribute to the epsilon.egl task,
>>> even though I don't really want to specify the target here -- it is
>>> determined by the egl script. Either way, I got the error).
>>>
>>> I was wondering whether this was because of some conflict when
>>> internally setting the target files for the egl?? If this is a bug I
>>> can submit a report.
>>>
>>> Ta again,
>>>
>>> Edd
>>>
Re: One model + EGL; multiple targets [message #563780 is a reply to message #8472] Mon, 12 January 2009 13:11 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Great! Just for the record the related bug is
https://bugs.eclipse.org/bugs/show_bug.cgi?id=260702

Cheers,
Dimitris

Edward Turner wrote:
> Hi Dimitris,
>
> Yes, that's great -- all seems fine and dandy now! (and I've submitted a
> bug report so it's recorded)
>
> Ta,
> Edd
>
> Dimitrios Kolovos wrote:
>
>> Hi Edd,
>
>> I (think) I've fixed it. Please update the
>> org.eclipse.epsilon.workflow project to pick up the fix.
>
>> Cheers,
>> Dimitris
>
>> Dimitrios Kolovos wrote:
>>> Hi Edd,
>>>
>>> It seems to be a bug indeed. Could you please file a bug report? I'll
>>> look into it tomorrow morning.
>>>
>>> Dimitris
>>>
>>> Edward Turner wrote:
>>>> Just a quick follow up q,
>>>>
>>>> Given a driver egl script, such as the one you defined, when running
>>>> this via an Ant task (and not a launch configuration) it leads to
>>>> the error:
>>>>
>>>> [Driver.egl] Internal error: java.lang.IllegalArgumentException:
>>>> URI is not absolute
>>>> [Driver.egl] at java.net.URI.toURL[URI.java:1080]
>>>> [Driver.egl] at
>>>> org.eclipse.epsilon.egl.EglModule.parse[EglModule.java:97]
>>>> [Driver.egl] at
>>>> org.eclipse.epsilon.egl.types.EglTemplate.<init>[EglTemplate.java:48]
>>>> [Driver.egl] at
> org.eclipse.epsilon.egl.types.EglFileGeneratingTemplate.<init >[EglFileGeneratingTemplate.java:50]
>
>>>>
>>>> [Driver.egl] at
> org.eclipse.epsilon.egl.template.FileGeneratingTemplateFacto ry.load[FileGeneratingTemplateFactory.java:51]
>
>>>>
>>>> ...
>>>>
>>>> . when the Ant task is as follows:
>>>>
>>>> <epsilon.egl src="Driver.egl">
>>>> <model ref="X"/>
>>>> </epsilon.egl>
>>>>
>>>> (and I've tried adding a target attribute to the epsilon.egl task,
>>>> even though I don't really want to specify the target here -- it is
>>>> determined by the egl script. Either way, I got the error).
>>>>
>>>> I was wondering whether this was because of some conflict when
>>>> internally setting the target files for the egl?? If this is a bug I
>>>> can submit a report.
>>>>
>>>> Ta again,
>>>>
>>>> Edd
>>>>
>
Previous Topic:One model + EGL; multiple targets
Next Topic:[Epsilon] Compare an enumeration value with a string in EVL
Goto Forum:
  


Current Time: Thu Apr 25 21:05:52 GMT 2024

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

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

Back to the top