Home » Modeling » Epsilon » Re: Passing parameters to Epsilon programs
Re: Passing parameters to Epsilon programs [message #9537] |
Wed, 28 January 2009 16:41 |
Dimitrios Kolovos Messages: 1776 Registered: July 2009 |
Senior Member |
|
|
I'm bringing this back to the newsgroup now that it's up again (see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=262780) and changing the
subject since the topic has changed since the first post.
With regard to your question, from ANT you can use the parameter tag. e.g:
<project default="main">
<target name="main">
<epsilon.eol>
message.println();
<parameter name="message" value="Hello World"/>
</epsilon.eol>
</target>
</project>
Regarding the Eclipse-based development tools, we have implemented an
additional tab (called "Parameters") in the launch configuration but
haven't committed it yet as it is currently undergoing testing. I'll
hopefully commit it within the next couple of days to the SVN and it
will be available in the upcoming 0.8.4 version which will be released
next week. As a temporary workaround, you can use an additional model
that specifies the parameter values.
Cheers,
Dimitris
-- Original post --
Hi,
Well for now I'm developping a metamodel for the symfony project to let
us create symfony projects and applications. The metamodel is quite good
and for now I'm on the php5 meta model, this is because symfony is a
php5 framework, I'd like to make this metamodel extends php5 metamodel.
www.symfony-project.org for more infos about symfony (and Doctrine, ORM,
too, metamodeled too).
So, the php5 generator is here to train me with epsilon (I've made
generators using oaw, acceleo and now epsilon), as it is easier than
doctrine or symfony.
Before taking too much of your time, I'll go review the cinematics and
get really involved in what I see =)
For your question, can you tell me how to do this from the eclipse dev
tools and from the ant ?
>From standalone I can see from svn but did not tried yet.
Thanks !!
Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
On Wed, Jan 28, 2009 at 4:53 PM, Dimitris Kolovos <dskolovos@gmail.com>
wrote:
Hi Stephane,
There seems to be something wrong with the newsgroup at the moment
hence the private reply.
There are different ways to do this depending on whether you use
EOL via the Eclipse development tools, in a standalone Java application
or from ANT. Which of the three options are you interested in? If you
could give me a brief overview of what you are trying to achieve I'll
hopefully be able to help much more.
Cheers,
Dimitris
Stephane wrote:
Thanks !
If you can just tell me how can I pass parameters to an eol
program ?
So I can make the output path parametrable :)
Thanks !!
|
|
|
Re: Passing parameters to Epsilon programs [message #9560 is a reply to message #9537] |
Wed, 28 January 2009 18:15 |
Dimitrios Kolovos Messages: 1776 Registered: July 2009 |
Senior Member |
|
|
Hi Stephane,
See comments below
Stephane wrote:
>Re,
> After reviewing the cinematics, I have some questions about EGL :
>
> First, in the run configuration, clicking the Browse Workspace button
> doesn't gives me anything, in Templates and in Models.
> In Templates I can't select the .egl file so I have to enter manually
> the path
> In Models I can't select my .model file so I have to enter the path
> manually too.
You have to start typing the name of your model/template in the dialog
to start seeing matching workspace resources
> For now, I feel pretty stupid as I don't really see how I can
boostrap > the development of my generator.
There are a couple of minor errors/omissions in model.egl but it's
otherwise pretty good for a first try! See the corrected code below:
model.egl
-------------
[%
var m : Model := Model.allInstances().at(0);
var n : String := m.name;
for( class in Class.allInstances()){
var t : Template := TemplateFactory.load('class.egl');
t.populate('class', class); -- missing
t.process();
t.store(class.getGenFilename());
}
operation Class getGenFilename () : String {
return self.name + '.class.php'; -- was: return (missing
self.)name + ".class.php";
}
%]
class.egl is fine.
> My metamodel starts with a Model eclass, I suppose it is same here.
> So I create a model.egl with this content
> [%
>
> var m : Model := Model.allInstances().at(0);
> var n : String := m.name;
>
>
> for( class in Class.allInstances()){
> var t : Template := TemplateFactory.load('class.egl');
> t.process();
> t.store(class.getGenFilename());
> }
>
> operation Class getGenFilename () : String {
> return name + ".class.php";
> }
> %]
>
> and class.egl contents
>
> <?php
> [%=class.name%]
> ?>
>
>
> But this doesn't work =)
>
> Thanks for your help !!!!
Dimitris Kolovos wrote:
> I'm bringing this back to the newsgroup now that it's up again (see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=262780) and changing the
> subject since the topic has changed since the first post.
>
> With regard to your question, from ANT you can use the parameter tag. e.g:
>
> <project default="main">
> <target name="main">
> <epsilon.eol>
> message.println();
> <parameter name="message" value="Hello World"/>
> </epsilon.eol>
> </target>
> </project>
>
> Regarding the Eclipse-based development tools, we have implemented an
> additional tab (called "Parameters") in the launch configuration but
> haven't committed it yet as it is currently undergoing testing. I'll
> hopefully commit it within the next couple of days to the SVN and it
> will be available in the upcoming 0.8.4 version which will be released
> next week. As a temporary workaround, you can use an additional model
> that specifies the parameter values.
>
> Cheers,
> Dimitris
>
> -- Original post --
>
> Hi,
>
> Well for now I'm developping a metamodel for the symfony project to let
> us create symfony projects and applications. The metamodel is quite good
> and for now I'm on the php5 meta model, this is because symfony is a
> php5 framework, I'd like to make this metamodel extends php5 metamodel.
> www.symfony-project.org for more infos about symfony (and Doctrine, ORM,
> too, metamodeled too).
>
> So, the php5 generator is here to train me with epsilon (I've made
> generators using oaw, acceleo and now epsilon), as it is easier than
> doctrine or symfony.
>
> Before taking too much of your time, I'll go review the cinematics and
> get really involved in what I see =)
>
> For your question, can you tell me how to do this from the eclipse dev
> tools and from the ant ?
> >From standalone I can see from svn but did not tried yet.
>
> Thanks !!
>
>
> Before Printing, Think about Your Environmental Responsibility!
> Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>
>
> On Wed, Jan 28, 2009 at 4:53 PM, Dimitris Kolovos <dskolovos@gmail.com>
> wrote:
>
> Hi Stephane,
>
> There seems to be something wrong with the newsgroup at the moment
> hence the private reply.
>
> There are different ways to do this depending on whether you use EOL
> via the Eclipse development tools, in a standalone Java application or
> from ANT. Which of the three options are you interested in? If you could
> give me a brief overview of what you are trying to achieve I'll
> hopefully be able to help much more.
>
> Cheers,
> Dimitris
>
> Stephane wrote:
>
> Thanks !
>
> If you can just tell me how can I pass parameters to an eol
> program ?
>
> So I can make the output path parametrable :)
>
> Thanks !!
|
|
|
Re: Passing parameters to Epsilon programs [message #564153 is a reply to message #9537] |
Wed, 28 January 2009 18:15 |
Dimitrios Kolovos Messages: 1776 Registered: July 2009 |
Senior Member |
|
|
Hi Stephane,
See comments below
Stephane wrote:
>Re,
> After reviewing the cinematics, I have some questions about EGL :
>
> First, in the run configuration, clicking the Browse Workspace button
> doesn't gives me anything, in Templates and in Models.
> In Templates I can't select the .egl file so I have to enter manually
> the path
> In Models I can't select my .model file so I have to enter the path
> manually too.
You have to start typing the name of your model/template in the dialog
to start seeing matching workspace resources
> For now, I feel pretty stupid as I don't really see how I can
boostrap > the development of my generator.
There are a couple of minor errors/omissions in model.egl but it's
otherwise pretty good for a first try! See the corrected code below:
model.egl
-------------
[%
var m : Model := Model.allInstances().at(0);
var n : String := m.name;
for( class in Class.allInstances()){
var t : Template := TemplateFactory.load('class.egl');
t.populate('class', class); -- missing
t.process();
t.store(class.getGenFilename());
}
operation Class getGenFilename () : String {
return self.name + '.class.php'; -- was: return (missing
self.)name + ".class.php";
}
%]
class.egl is fine.
> My metamodel starts with a Model eclass, I suppose it is same here.
> So I create a model.egl with this content
> [%
>
> var m : Model := Model.allInstances().at(0);
> var n : String := m.name;
>
>
> for( class in Class.allInstances()){
> var t : Template := TemplateFactory.load('class.egl');
> t.process();
> t.store(class.getGenFilename());
> }
>
> operation Class getGenFilename () : String {
> return name + ".class.php";
> }
> %]
>
> and class.egl contents
>
> <?php
> [%=class.name%]
> ?>
>
>
> But this doesn't work =)
>
> Thanks for your help !!!!
Dimitris Kolovos wrote:
> I'm bringing this back to the newsgroup now that it's up again (see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=262780) and changing the
> subject since the topic has changed since the first post.
>
> With regard to your question, from ANT you can use the parameter tag. e.g:
>
> <project default="main">
> <target name="main">
> <epsilon.eol>
> message.println();
> <parameter name="message" value="Hello World"/>
> </epsilon.eol>
> </target>
> </project>
>
> Regarding the Eclipse-based development tools, we have implemented an
> additional tab (called "Parameters") in the launch configuration but
> haven't committed it yet as it is currently undergoing testing. I'll
> hopefully commit it within the next couple of days to the SVN and it
> will be available in the upcoming 0.8.4 version which will be released
> next week. As a temporary workaround, you can use an additional model
> that specifies the parameter values.
>
> Cheers,
> Dimitris
>
> -- Original post --
>
> Hi,
>
> Well for now I'm developping a metamodel for the symfony project to let
> us create symfony projects and applications. The metamodel is quite good
> and for now I'm on the php5 meta model, this is because symfony is a
> php5 framework, I'd like to make this metamodel extends php5 metamodel.
> www.symfony-project.org for more infos about symfony (and Doctrine, ORM,
> too, metamodeled too).
>
> So, the php5 generator is here to train me with epsilon (I've made
> generators using oaw, acceleo and now epsilon), as it is easier than
> doctrine or symfony.
>
> Before taking too much of your time, I'll go review the cinematics and
> get really involved in what I see =)
>
> For your question, can you tell me how to do this from the eclipse dev
> tools and from the ant ?
> >From standalone I can see from svn but did not tried yet.
>
> Thanks !!
>
>
> Before Printing, Think about Your Environmental Responsibility!
> Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>
>
> On Wed, Jan 28, 2009 at 4:53 PM, Dimitris Kolovos <dskolovos@gmail.com>
> wrote:
>
> Hi Stephane,
>
> There seems to be something wrong with the newsgroup at the moment
> hence the private reply.
>
> There are different ways to do this depending on whether you use EOL
> via the Eclipse development tools, in a standalone Java application or
> from ANT. Which of the three options are you interested in? If you could
> give me a brief overview of what you are trying to achieve I'll
> hopefully be able to help much more.
>
> Cheers,
> Dimitris
>
> Stephane wrote:
>
> Thanks !
>
> If you can just tell me how can I pass parameters to an eol
> program ?
>
> So I can make the output path parametrable :)
>
> Thanks !!
|
|
|
Goto Forum:
Current Time: Sun Dec 22 06:26:55 GMT 2024
Powered by FUDForum. Page generated in 0.05129 seconds
|