Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Eugenia: Starters/ideas to automate GMF generation?
Eugenia: Starters/ideas to automate GMF generation? [message #501713] Thu, 03 December 2009 15:07 Go to next message
Christoph Wienands is currently offline Christoph WienandsFriend
Messages: 55
Registered: July 2009
Member
Hey guys,

I'm getting kind of tired of repeatedly going through a whole list of steps to regenerate my GMF editor everytime I make a change to the EMF (generate ecore, reload genmodel, sync genmodel, generate code, generate edit, generate editor,... you get the idea). Not only is it a bit cumbersome (OK, nothing compared to the time savings through Eugenia) but often I forget a step (e.g. an EOL sync) and have to figure out what screwed up my editor.

I was thinking about a way to automate this. In a bug report I read something about Ant tasks for Eugenia but couldn't make much sense of it. While Ant tasks might work for the Eugenia steps, I would still have to automate the genmodel and gmf steps, like reloading the genmodel, generating the gmfgen, and the GMF diagram plug-in. The main problem I see with automating these steps is that they are dialog-based so I probably can't just call some GMF function.

I'm not expecting a full solution but lacking in-depth Eclipse knowledge, could someone give me a starter (which Eclipse mechanism to use, where to look up information, etc.) of how to automate all these non-dialog and dialog-based steps?

If I get it working, I will make the code available for possible integration into Eugenia.

Thanks a lot, Christoph
Re: Eugenia: Starters/ideas to automate GMF generation? [message #501742 is a reply to message #501713] Thu, 03 December 2009 16:23 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Christoph,

When developing Eugenia, we too wanted to make it work in one step
(right click .ecore -> generate everything) but couldn't figure out how
to do this. If memory serves, automating the EMF bits was possible (i.e.
reloading .genmodel and generating the EMF code) but for GMF there was
no visible API for automating the gmfmap->gmfgen and gmfgen->code steps.
Could you possibly post a question in the GMF newsgroup and see if
someone comes up with any ideas on how to do this?

Cheers,
Dimitris

Christoph Wienands wrote:
> Hey guys,
>
> I'm getting kind of tired of repeatedly going through a whole list of
> steps to regenerate my GMF editor everytime I make a change to the EMF
> (generate ecore, reload genmodel, sync genmodel, generate code, generate
> edit, generate editor,... you get the idea). Not only is it a bit
> cumbersome (OK, nothing compared to the time savings through Eugenia)
> but often I forget a step (e.g. an EOL sync) and have to figure out what
> screwed up my editor.
>
> I was thinking about a way to automate this. In a bug report I read
> something about Ant tasks for Eugenia but couldn't make much sense of
> it. While Ant tasks might work for the Eugenia steps, I would still have
> to automate the genmodel and gmf steps, like reloading the genmodel,
> generating the gmfgen, and the GMF diagram plug-in. The main problem I
> see with automating these steps is that they are dialog-based so I
> probably can't just call some GMF function.
>
> I'm not expecting a full solution but lacking in-depth Eclipse
> knowledge, could someone give me a starter (which Eclipse mechanism to
> use, where to look up information, etc.) of how to automate all these
> non-dialog and dialog-based steps?
>
> If I get it working, I will make the code available for possible
> integration into Eugenia.
>
> Thanks a lot, Christoph


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Eugenia: Starters/ideas to automate GMF generation? [message #501825 is a reply to message #501742] Thu, 03 December 2009 23:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nyoescape.gmail.com

This is a multi-part message in MIME format.
--------------080208040805090908080404
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Hi all,

> When developing Eugenia, we too wanted to make it work in one step
> (right click .ecore -> generate everything) but couldn't figure out how
> to do this. If memory serves, automating the EMF bits was possible (i.e.
> reloading .genmodel and generating the EMF code) but for GMF there was
> no visible API for automating the gmfmap->gmfgen and gmfgen->code steps.
> Could you possibly post a question in the GMF newsgroup and see if
> someone comes up with any ideas on how to do this?

Actually, I went through this last summer, but I've been too busy with
other things to actually post about it. BTW, there seems to be an
official GMF Ant task in the works for this sort of things. See:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=282331

Anyway, I cooked up two tasks to convert an Emfatic description into its
..ecore file, and to produce the .gmfgen model from the .gmftool,
..gmfgraph and .gmfmap models. I just poked around the code and took what
I needed to produce the models. I've attached a ZIP file with a plugin
project you can try out. Comments are welcome :-).

If you need the .gmfgen -> code part, you can use the GMF Ant tasks made
by Ecliptical Software, which I believe to be under the EPL. Here's the
update site:

http://www.eclipticalsoftware.com/updates/site.xml

I've also attached a simplified version of Ant buildfile I use to
generate my code from scratch. The full version munges a bit the Emfatic
textual description using some Ant filters. It's still a bit rough
around the edges, but basically, you could add it to your Eclipse
project like this:

- Add the generate-code.xml Ant script as a custom Ant builder, using
the "default" target (which ends up generating the GMF code). This
way, every time you build the project, everything will be cleaned up
and regenerated from scratch.

- Customize the variables in the "Basic project info" section to
the values you like.

- Add these files to the model/ directory in your project:
* yourmodel.emf (Emfatic textual description)
* Optionally, model/ECore2GMF.eol (same as that used in EuGENia)
* Optionally, model/FixGenModel.eol (same as that used in EuGENia)
* Optionally, model/FixGMFGen.eol (same as that used in EuGENia)
* Optionally, model/copyright.txt (copyright info, like in EuGENia)

- Optionally, you can add dynamic templates to touch up some of the
code that is generated during the GMF*->GMFGen transformation to
the templates-gmfgraph/ directory in your project. BTW, I found it
a bit confusing that some code gets generated even before the
final GMFGen->code step, but that's how it is.

- If you want to use dynamic templates for the GMFGen->code
transformation, you'll need to tweak your FixGMFGen.eol script. If
you want, I can send you a sample.

The Ant buildfile basically does this, in sequence:

- refreshes all the files under the project, if inside Eclipse (I have
the bad habit of poking around with Eclipse, Emacs and/or Git at the
same time :-D)
- produces the ECore model from the Emfatic description, and
registers it (useful for the following EOL invocations)
- generates and fixes the EMF .genmodel with EuGENia's built-in EOL
script and our own (if existing)
- generates the code for the EMF model, edit, editor and test plugins
- generates and fixes the GMF files, like before
- generates and fixes the GMFGen model
- produces the GMF code

Again, it's still a bit rough around the edges, but I'd love to hear any
comments you might have on it. Perhaps I should make this into a blog
post somewhere :-D.

Cheers,
Antonio

--------------080208040805090908080404
Content-Type: application/zip;
name="ant-tasks.zip"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="ant-tasks.zip"

UEsDBAoAAAAAAAa8gzsAAAAAAAAAAAAAAAAUAAAAZXMudWNhLm1vZGV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y9QSwECAAAKAAAACAAGvIM7kdVKL84CAACTBgAAUgAAAAAAAAAA AAAAAABDDgAA
ZXMudWNhLm1vZGVsaW5nLmFudC9zcmMvZXMvdWNhL21vZGVsaW5nL2FudC9l bWZhdGljL0Vt
ZmF0aWNFY29yZUdlbmVyYXRvclRhc2suamF2YVBLAQIAAAoAAAAAAAa8gzsA AAAAAAAAAAAA
AAAzAAAAAAAAAAAAEAAAAIERAABlcy51Y2EubW9kZWxpbmcuYW50L3NyYy9l cy91Y2EvbW9k
ZWxpbmcvYW50L2dtZmdlbi9QSwECAAAKAAAACAAGvIM7dCXl1b4FAAB9EgAA TgAAAAAAAAAA
AAAAAADSEQAAZXMudWNhLm1vZGVsaW5nLmFudC9zcmMvZXMvdWNhL21vZGVs aW5nL2FudC9n
bWZnZW4vR2VuZXJhdGVGcm9tR21mbWFwVGFzay5qYXZhUEsFBgAAAAAZABkA awgAAPwXAAAA
AA==
--------------080208040805090908080404
Content-Type: text/xml;
name="generate-code.xml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="generate-code.xml"

<?xml version="1.0" encoding="UTF-8"?>
<project name="serviceProcess" default="default">
<description>
<![CDATA[
This Ant buildfile attempts to mimic the basic Eugenia workflow
included in the documentation. It consists of: generating the
ECore model from the Emfatic source file, generating the .genmodel
file, customizing it with the global and user-defined EOL scripts,
generating the EMF code, deriving the GMF models from the ECore
file, deriving the GMFGen model from these, customizing it, and
finally generating the source code from it.

It depends on the es.uca.modeling.ant and ca.ecliptical.gmf.ant
plugins to do its work. The Ecliptical update site is at [1].

Currently, there's one known issue: the edit and editor projects,
when created from scratch, do not have the required Java and PDE
natures assigned to them. For the first nature, see [2]. For the
second, right-click on the project and use "Configure > Convert
to Plugin Projects...". Another option is generating the projects
the first time through the GUI, and then "Refactor > Move" them
to the locations in the *Project.location properties. Nevertheless,
this bug might be fixed by EMF 2.6 [3].

[1]: http://www.eclipticalsoftware.com/updates/site.xml
[2]: http://enarion.net/programming/tools/eclipse/changing-genera l-project-to-java-project/
[3]: http://www.eclipse.org/forums/index.php?t=msg&th=152228
]]>
</description>

<!-- PROPERTIES ####################################################### -->

<!-- Basic project info -->
<property name="project.name" value="ServiceProcess" />
<property name="model.dir" value="model" />
<property name="model.basename" value="serviceprocess" />
<property name="templates.dir" value="templates"/>
<property name="templates.gmfgraph.dir" value="templates-gmfgraph"/>

<!-- File locations -->
<property name="copyright.location" value="${model.dir}/copyright.txt" />
<property name="emfatic.location" value="${model.dir}/${model.basename}.emf" />
<property name="ecore.location" value="${model.dir}/${model.basename}.ecore" />
<property name="genmodel.location" value="${model.dir}/${model.basename}.genmodel" />
<property name="gmfgen.location" value="${model.dir}/${model.basename}.gmfgen" />
<property name="gmfgraph.location" value="${model.dir}/${model.basename}.gmfgraph" />
<property name="gmfmap.location" value="${model.dir}/${model.basename}.gmfmap" />
<property name="gmftool.location" value="${model.dir}/${model.basename}.gmftool" />

<!-- Project locations -->
<!-- For some reason, to create the edit and editor projects, we need to
pass some special arguments to emf.Ecore2Java, and place them in paths
different to their expected placement: (workspace)/(project name).
Otherwise, Eclipse will complain that their paths overlaps with
themselves, which strikes me as very odd. Perhaps it's being created
several times, or something like that? -->
<property name="modelProject.location" location="${basedir}" />
<property name="editProject.location" location="${basedir}/../generated/${project.name}.edit" />
<property name="editorProject.location" location="${basedir}/../generated/${project.name}.editor" />
<property name="testsProject.location" location="${basedir}/../generated/${project.name}.tests" />
<property name="diagramProject.location" location="${basedir}/../${project.name}.diagram" />

<!-- EPackage URIs -->
<property name="ecore.nsuri" value="http://www.eclipse.org/emf/2002/Ecore" />
<property name="genmodel.nsuri" value="http://www.eclipse.org/emf/2002/GenModel" />
<property name="gmfgraph.nsuri" value="http://www.eclipse.org/gmf/2006/GraphicalDefinition" />
<property name="gmftool.nsuri" value="http://www.eclipse.org/gmf/2005/ToolDefinition" />
<property name="gmfmap.nsuri" value="http://www.eclipse.org/gmf/2008/mappings" />
<property name="gmfgen.nsuri" value="http://www.eclipse.org/gmf/2009/GenModel" />

<!-- Epsilon URLs -->
<property name="epsilon.ecore2gmf.uri" value=" platform:/plugin/org.eclipse.epsilon.eugenia/transformations /ECore2GMF.eol " />
<property name="epsilon.fixgenmodel.uri" value=" platform:/plugin/org.eclipse.epsilon.eugenia/transformations /FixGenModel.eol " />
<property name="epsilon.fixgengmf.uri" value=" platform:/plugin/org.eclipse.epsilon.eugenia/transformations /FixGMFGen.eol " />

<property name="epsilon.ecore2gmf.local" value="${model.dir}/ECore2GMF.eol" />
<property name="epsilon.fixgenmodel.local" value="${model.dir}/FixGenModel.eol" />
<property name="epsilon.fixgmfgen.local" value="${model.dir}/FixGMFGen.eol" />

<available property="epsilon.ecore2gmf.local.exists" file="${epsilon.ecore2gmf.local}" />
<available property="epsilon.fixgenmodel.local.exists" file="${epsilon.fixgenmodel.local}" />
<available property="epsilon.fixgmfgen.local.exists" file="${epsilon.fixgmfgen.local}" />

<!--
Copyright text: try loading the copyright text. If it doesn't exist,
use the empty string.
-->
<loadfile srcFile="${copyright.location}" property="copyright.contents" quiet="true" />
<property name="copyright.contents" value="" />

<!-- MAIN BODY ######################################################## -->

<target name="init">
<tstamp />
</target>
<target name="refreshEmfatic" if="eclipse.application">
<echo>Refreshing the project directory under Eclipse</echo>
<eclipse.refreshLocal resource="/${project.name}" depth="infinite"/>
</target>
<target name="generateECore" depends="refreshEmfatic">
<echo>Generating ${ecore.location} file from Emfatic source ${emfatic.location}</echo>
<emfatic.generate src="${emfatic.location}" />
</target>
<target name="registerECore" depends="generateECore">
<echo>Registering ${ecore.location} file permanently</echo>
<epsilon.emf.register file="${ecore.location}" permanently="true"/>
</target>
<target name="generateGenModel" depends="registerECore">
<echo>Generating initial ${genmodel.location} file</echo>
<emf.Ecore2Java model="${ecore.location}" genmodel="${genmodel.location}" modelproject="${modelProject.location}" modelProjectFragmentPath="src" modelPluginID="${project.name}" generateJavaCode="false" validateModel="true">
<arg line="-editProject ${editProject.location} src" />
<arg line="-editorProject ${editorProject.location} src" />
<arg line="-testsProject ${testsProject.location} src" />
</emf.Ecore2Java>
</target>
<target name="defaultFixGenModel" depends="generateGenModel">
<echo>Fixing ${genmodel.location} (default EOL script) </echo>
<epsilon.emf.loadModel name="ECore" modelFile="${ecore.location}" metamodeluri="${ecore.nsuri}" read="true" store="false" />
<epsilon.emf.loadModel name="GenModel" modelFile="${genmodel.location}" metamodeluri="${genmodel.nsuri}" read="true" store="true" />
<epsilon.eol uri="${epsilon.fixgenmodel.uri}">
<parameter name="copyright" value="${copyright.contents}" />
<model ref="ECore" as="ECore" />
<model ref="GenModel" as="GenModel" />
</epsilon.eol>
</target>
<target name="customFixGenModel" depends="defaultFixGenModel" if="epsilon.fixgenmodel.local.exists">
<echo>Fixing ${genmodel.location} (user-defined EOL script)</echo>
<epsilon.eol src="${epsilon.fixgenmodel.local}">
<parameter name="copyright" value="${copyright.contents}" />
<model ref="ECore" as="ECore" />
<model ref="GenModel" as="GenModel" />
</epsilon.eol>
</target>
<target name="saveGenModel" depends="customFixGenModel">
<epsilon.disposeModel model="GenModel" />
</target>
<target name="generateEMFCode" depends="customFixGenModel">
<echo>Generating EMF edit and editor code</echo>
<emf.Ecore2Java model="${ecore.location}" genmodel="${genmodel.location}" reconcileGenModel="keep" modelproject="${modelProject.location}" modelProjectFragmentPath="src" modelPluginID="${project.name}" jdkLevel="5.0" validateModel="true" autoBuild="true">
<arg line="-editProject ${editProject.location} src" />
<arg line="-editorProject ${editorProject.location} src" />
<arg line="-testsProject ${testsProject.location} src" />
</emf.Ecore2Java>
</target>
<target name="generateGMFFiles" depends="generateEMFCode">
<echo>Generating GMF models</echo>
<epsilon.emf.loadModel name="GmfGraph" modelFile="${gmfgraph.location}" metamodeluri="${gmfgraph.nsuri}" read="false" store="true" />
<epsilon.emf.loadModel name="GmfTool" modelFile="${gmftool.location}" metamodeluri="${gmftool.nsuri}" read="false" store="true" />
<epsilon.emf.loadModel name="GmfMap" modelFile="${gmfmap.location}" metamodeluri="${gmfmap.nsuri}" read="false" store="true" />

<epsilon.eol uri="${epsilon.ecore2gmf.uri}">
<model ref="ECore" as="ECore" />
<model ref="GmfGraph" as="GmfGraph" />
<model ref="GmfTool" as="GmfTool" />
<model ref="GmfMap" as="GmfMap" />
</epsilon.eol>
</target>
<target name="customFixGMFFiles" depends="generateGMFFiles" if="epsilon.ecore2gmf.local.exists">
<echo>Customizing GMF models</echo>
<epsilon.eol src="${epsilon.ecore2gmf.local}">
<model ref="ECore" as="ECore" />
<model ref="GmfGraph" as="GmfGraph" />
<model ref="GmfTool" as="GmfTool" />
<model ref="GmfMap" as="GmfMap" />
</epsilon.eol>
</target>
<target name="saveGMFFiles" depends="customFixGMFFiles">
<epsilon.disposeModel model="GmfGraph" />
<epsilon.disposeModel model="GmfTool" />
<epsilon.disposeModel model="GmfMap" />
</target>
<target name="generateGMFGenModel" depends="saveGMFFiles">
<echo>Generating and synchronizing GMFGen model ${gmfgen.location} from GMFMap model</echo>
<gmfgen.fromGmfmap projectName="${project.name}" destFile="${gmfgen.location}" genModel="${genmodel.location}" mapModel="${gmfmap.location}" templatesDir="${templates.gmfgraph.dir}"/>
<epsilon.emf.loadModel name="GmfGen" modelFile="${gmfgen.location}" metamodeluri="${gmfgen.nsuri}" read="true" store="true" />
<epsilon.eol uri="${epsilon.fixgengmf.uri}">
<parameter name="copyright" value="${copyright.contents}" />
<model ref="ECore" as="ECore" />
<model ref="GmfGen" as="GmfGen" />
</epsilon.eol>
</target>
<target name="customFixGMFGenModel" depends="generateGMFGenModel" if="epsilon.fixgmfgen.local.exists">
<echo>Customizing GMFGen model ${gmfgen.location}</echo>
<epsilon.eol src="${epsilon.fixgmfgen.local}">
<parameter name="copyright" value="${copyright.contents}" />
<model ref="ECore" as="ECore" />
<model ref="GmfGen" as="GmfGen" />
</epsilon.eol>
</target>
<target name="saveGMFGenModel" depends="customFixGMFGenModel">
<epsilon.disposeModel model="GmfGen"/>
</target>
<target name="generateDiagramCode" depends="saveGMFGenModel"
xmlns:gmf="http://ecliptical.ca/gmf/ant">
<echo>Generating diagram project in ${diagramProject.location}</echo>
<gmf:GenerateDiagramCode gmfgenpath="${project.name}/${gmfgen.location}"/>
</target>

<!-- Default target -->
<target name="default" depends="generateDiagramCode"/>

<target name="clean">
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${modelProject.location}" includes="src/**/*"/>
<fileset dir="${modelProject.location}" includes="bin/**/*"/>
<fileset dir="${modelProject.location}" includes="${genmodel.location}"/>
<fileset dir="${modelProject.location}" includes="${gmfmap.location}"/>
<fileset dir="${modelProject.location}" includes="${gmftool.location}"/>
<fileset dir="${modelProject.location}" includes="${gmfgraph.location}"/>
<fileset dir="${modelProject.location}" includes="${gmfgen.location}"/>
<fileset dir="${modelProject.location}" includes="${ecore.location}"/>
<fileset dir="${modelProject.location}" includes="${emfatic.location}"/>
<fileset dir="${editProject.location}" includes="src/**/*"/>
<fileset dir="${editProject.location}" includes="bin/**/*"/>
<fileset dir="${editorProject.location}" includes="src/**/*"/>
<fileset dir="${editorProject.location}" includes="bin/**/*"/>
<fileset dir="${testsProject.location}" includes="src/**/*"/>
<fileset dir="${testsProject.location}" includes="bin/**/*"/>
<fileset dir="${diagramProject.location}" includes="src/**/*"/>
<fileset dir="${diagramProject.location}" includes="bin/**/*"/>
</delete>
</target>
</project>

--------------080208040805090908080404--
Re: Eugenia: Starters/ideas to automate GMF generation? [message #501826 is a reply to message #501825] Thu, 03 December 2009 23:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nyoescape.gmail.com

Hi again,

Ugh, remind me not to write long mails in a hurry at midnight. Let me
correct a few things.

> - Add the generate-code.xml Ant script as a custom Ant builder, using
> the "default" target (which ends up generating the GMF code). This
> way, every time you build the project, everything will be cleaned up
> and regenerated from scratch.

Careful with this. I've tried to only remove what's strictly required,
but it might be a little trigger-happy for your taste. I prefer to have
as few files under version control as possible.

> - Add these files to the model/ directory in your project:
> * yourmodel.emf (Emfatic textual description)
> * Optionally, model/ECore2GMF.eol (same as that used in EuGENia)
> * Optionally, model/FixGenModel.eol (same as that used in EuGENia)
> * Optionally, model/FixGMFGen.eol (same as that used in EuGENia)
> * Optionally, model/copyright.txt (copyright info, like in EuGENia)

Replace with:

- Add these files to the model/ directory in your project:
* yourmodel.emf (Emfatic textual description)
* Optionally, ECore2GMF.eol (same as that used in EuGENia)
* Optionally, FixGenModel.eol (same as that used in EuGENia)
* Optionally, FixGMFGen.eol (same as that used in EuGENia)
* Optionally, copyright.txt (copyright info, like in EuGENia)

Well, that's it for today. Hope it helps :-).

Cheers,
Antonio
Re: Eugenia: Starters/ideas to automate GMF generation? [message #502038 is a reply to message #501742] Fri, 04 December 2009 21:07 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
Just to add to this briefly: The EMF generation bit is not problematic:
EMF has a class called Generator that does all of this and, IIRC, comes
with its own main method and all.

Steffen

Dimitris Kolovos wrote:
> Hi Christoph,
>
> When developing Eugenia, we too wanted to make it work in one step
> (right click .ecore -> generate everything) but couldn't figure out how
> to do this. If memory serves, automating the EMF bits was possible (i.e.
> reloading .genmodel and generating the EMF code) but for GMF there was
> no visible API for automating the gmfmap->gmfgen and gmfgen->code steps.
> Could you possibly post a question in the GMF newsgroup and see if
> someone comes up with any ideas on how to do this?
>
> Cheers,
> Dimitris
>
> Christoph Wienands wrote:
>
>> Hey guys,
>>
>> I'm getting kind of tired of repeatedly going through a whole list of
>> steps to regenerate my GMF editor everytime I make a change to the EMF
>> (generate ecore, reload genmodel, sync genmodel, generate code, generate
>> edit, generate editor,... you get the idea). Not only is it a bit
>> cumbersome (OK, nothing compared to the time savings through Eugenia)
>> but often I forget a step (e.g. an EOL sync) and have to figure out what
>> screwed up my editor.
>>
>> I was thinking about a way to automate this. In a bug report I read
>> something about Ant tasks for Eugenia but couldn't make much sense of
>> it. While Ant tasks might work for the Eugenia steps, I would still have
>> to automate the genmodel and gmf steps, like reloading the genmodel,
>> generating the gmfgen, and the GMF diagram plug-in. The main problem I
>> see with automating these steps is that they are dialog-based so I
>> probably can't just call some GMF function.
>>
>> I'm not expecting a full solution but lacking in-depth Eclipse
>> knowledge, could someone give me a starter (which Eclipse mechanism to
>> use, where to look up information, etc.) of how to automate all these
>> non-dialog and dialog-based steps?
>>
>> If I get it working, I will make the code available for possible
>> integration into Eugenia.
>>
>> Thanks a lot, Christoph
>>
>
>
>
Re: Eugenia: Starters/ideas to automate GMF generation? [message #502089 is a reply to message #502038] Sat, 05 December 2009 14:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nyoescape.gmail.com

Hi Steffen,

Steffen Zschaler wrote:
> Just to add to this briefly: The EMF generation bit is not problematic:
> EMF has a class called Generator that does all of this and, IIRC, comes
> with its own main method and all.

That's nice to know, thanks :-). Are the generated projects set up just
like those created from the ECore editor context menu entries?

On August I ran into some problems with the EMF Ant tasks because they
didn't generate the projects in the exact same way. They weren't
completely set up and had to be placed in a subdirectory of the
workspace (workspace/generated/X.model, workspace/generated/X.edit, and
so on). I think they might have fixed some of these issues by now, but I
haven't checked yet.

Thanks,
Antonio
Re: Eugenia: Starters/ideas to automate GMF generation? [message #502233 is a reply to message #502089] Mon, 07 December 2009 10:46 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
I think, the projects should be set up the same way as I believe this is
the same code that is run from the IDE.

Steffen

Antonio García Domínguez wrote:
> Hi Steffen,
>
> Steffen Zschaler wrote:
>
>> Just to add to this briefly: The EMF generation bit is not problematic:
>> EMF has a class called Generator that does all of this and, IIRC, comes
>> with its own main method and all.
>>
>
> That's nice to know, thanks :-). Are the generated projects set up just
> like those created from the ECore editor context menu entries?
>
> On August I ran into some problems with the EMF Ant tasks because they
> didn't generate the projects in the exact same way. They weren't
> completely set up and had to be placed in a subdirectory of the
> workspace (workspace/generated/X.model, workspace/generated/X.edit, and
> so on). I think they might have fixed some of these issues by now, but I
> haven't checked yet.
>
> Thanks,
> Antonio
>
Re: Eugenia: Starters/ideas to automate GMF generation? [message #536651 is a reply to message #501825] Sat, 29 May 2010 10:10 Go to previous messageGo to next message
Endre Balogh is currently offline Endre BaloghFriend
Messages: 38
Registered: May 2010
Member
Hi Antonio,
I just started to browse the Epsilon forums myself looking to automatize the process of diagram generation.
I came across your ANT script, but I can't make it work. It dies when trying to generate the .ecore file from the .emf file, with the following message:
Problem: failed to create task or type emfatic.generate
It doesn't seem to recognize any of these tasks, as I removed this part, and then it died with this:
Problem: failed to create task or type epsilon.emf.register
I installed the required plugins from here
Ecliptical - http://www.eclipticalsoftware.com/updates/site.xml
and here
Ant tasks for GMF - http://neptuno.uca.es/~agarcia/sodmt-updates/site.xml
Well actually, I installed every plugin from these sites, hoping it would make it work - probably not a wise choice, I will revert my eclipse to a previous state Smile.
I also have the latest version of modeling tools and epsilon (just checked for updates from eclipse).
Did I miss any requirements?

Cheers,
Endre
Re: Eugenia: Starters/ideas to automate GMF generation? [message #538125 is a reply to message #536651] Sat, 05 June 2010 12:11 Go to previous messageGo to next message
Endre Balogh is currently offline Endre BaloghFriend
Messages: 38
Registered: May 2010
Member
I found some topics on the forum about using epsilon with ant, and started fiddling with the build script again.
The tasks that begin with epsilon, e.g.epsilon.eol, epsilon.emf.register now work, however others, such as gmfgen.fromGmfmap and emfatic.generate do not.
Does anybody know what can be done for Ant to recognize these tasks?

Cheers,
Endre
Re: Eugenia: Starters/ideas to automate GMF generation? [message #538189 is a reply to message #538125] Sun, 06 June 2010 09:05 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Endre,

These appear to be tasks written by Antonio, so it's probably worth
dropping him an email to speed things up.

Cheers,
Dimitris

On 05/06/2010 15:11, Endre Balogh wrote:
> I found some topics on the forum about using epsilon with ant, and
> started fiddling with the build script again. The tasks that begin with
> epsilon, e.g.epsilon.eol, epsilon.emf.register now work, however others,
> such as gmfgen.fromGmfmap and emfatic.generate do not.
> Does anybody know what can be done for Ant to recognize these tasks?
>
> Cheers,
> Endre
Re: Eugenia: Starters/ideas to automate GMF generation? [message #538205 is a reply to message #538189] Sun, 06 June 2010 11:32 Go to previous messageGo to next message
Endre Balogh is currently offline Endre BaloghFriend
Messages: 38
Registered: May 2010
Member
Hi Dimitris,

Thanks for the suggestion, I will write him about it.

Cheers,
Endre
Re: Eugenia: Starters/ideas to automate GMF generation? [message #583376 is a reply to message #501713] Thu, 03 December 2009 16:23 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Christoph,

When developing Eugenia, we too wanted to make it work in one step
(right click .ecore -> generate everything) but couldn't figure out how
to do this. If memory serves, automating the EMF bits was possible (i.e.
reloading .genmodel and generating the EMF code) but for GMF there was
no visible API for automating the gmfmap->gmfgen and gmfgen->code steps.
Could you possibly post a question in the GMF newsgroup and see if
someone comes up with any ideas on how to do this?

Cheers,
Dimitris

Christoph Wienands wrote:
> Hey guys,
>
> I'm getting kind of tired of repeatedly going through a whole list of
> steps to regenerate my GMF editor everytime I make a change to the EMF
> (generate ecore, reload genmodel, sync genmodel, generate code, generate
> edit, generate editor,... you get the idea). Not only is it a bit
> cumbersome (OK, nothing compared to the time savings through Eugenia)
> but often I forget a step (e.g. an EOL sync) and have to figure out what
> screwed up my editor.
>
> I was thinking about a way to automate this. In a bug report I read
> something about Ant tasks for Eugenia but couldn't make much sense of
> it. While Ant tasks might work for the Eugenia steps, I would still have
> to automate the genmodel and gmf steps, like reloading the genmodel,
> generating the gmfgen, and the GMF diagram plug-in. The main problem I
> see with automating these steps is that they are dialog-based so I
> probably can't just call some GMF function.
>
> I'm not expecting a full solution but lacking in-depth Eclipse
> knowledge, could someone give me a starter (which Eclipse mechanism to
> use, where to look up information, etc.) of how to automate all these
> non-dialog and dialog-based steps?
>
> If I get it working, I will make the code available for possible
> integration into Eugenia.
>
> Thanks a lot, Christoph


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Eugenia: Starters/ideas to automate GMF generation? [message #583388 is a reply to message #501742] Thu, 03 December 2009 23:07 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

This is a multi-part message in MIME format.
--------------080208040805090908080404
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Hi all,

> When developing Eugenia, we too wanted to make it work in one step
> (right click .ecore -> generate everything) but couldn't figure out how
> to do this. If memory serves, automating the EMF bits was possible (i.e.
> reloading .genmodel and generating the EMF code) but for GMF there was
> no visible API for automating the gmfmap->gmfgen and gmfgen->code steps.
> Could you possibly post a question in the GMF newsgroup and see if
> someone comes up with any ideas on how to do this?

Actually, I went through this last summer, but I've been too busy with
other things to actually post about it. BTW, there seems to be an
official GMF Ant task in the works for this sort of things. See:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=282331

Anyway, I cooked up two tasks to convert an Emfatic description into its
..ecore file, and to produce the .gmfgen model from the .gmftool,
..gmfgraph and .gmfmap models. I just poked around the code and took what
I needed to produce the models. I've attached a ZIP file with a plugin
project you can try out. Comments are welcome :-).

If you need the .gmfgen -> code part, you can use the GMF Ant tasks made
by Ecliptical Software, which I believe to be under the EPL. Here's the
update site:

http://www.eclipticalsoftware.com/updates/site.xml

I've also attached a simplified version of Ant buildfile I use to
generate my code from scratch. The full version munges a bit the Emfatic
textual description using some Ant filters. It's still a bit rough
around the edges, but basically, you could add it to your Eclipse
project like this:

- Add the generate-code.xml Ant script as a custom Ant builder, using
the "default" target (which ends up generating the GMF code). This
way, every time you build the project, everything will be cleaned up
and regenerated from scratch.

- Customize the variables in the "Basic project info" section to
the values you like.

- Add these files to the model/ directory in your project:
* yourmodel.emf (Emfatic textual description)
* Optionally, model/ECore2GMF.eol (same as that used in EuGENia)
* Optionally, model/FixGenModel.eol (same as that used in EuGENia)
* Optionally, model/FixGMFGen.eol (same as that used in EuGENia)
* Optionally, model/copyright.txt (copyright info, like in EuGENia)

- Optionally, you can add dynamic templates to touch up some of the
code that is generated during the GMF*->GMFGen transformation to
the templates-gmfgraph/ directory in your project. BTW, I found it
a bit confusing that some code gets generated even before the
final GMFGen->code step, but that's how it is.

- If you want to use dynamic templates for the GMFGen->code
transformation, you'll need to tweak your FixGMFGen.eol script. If
you want, I can send you a sample.

The Ant buildfile basically does this, in sequence:

- refreshes all the files under the project, if inside Eclipse (I have
the bad habit of poking around with Eclipse, Emacs and/or Git at the
same time :-D)
- produces the ECore model from the Emfatic description, and
registers it (useful for the following EOL invocations)
- generates and fixes the EMF .genmodel with EuGENia's built-in EOL
script and our own (if existing)
- generates the code for the EMF model, edit, editor and test plugins
- generates and fixes the GMF files, like before
- generates and fixes the GMFGen model
- produces the GMF code

Again, it's still a bit rough around the edges, but I'd love to hear any
comments you might have on it. Perhaps I should make this into a blog
post somewhere :-D.

Cheers,
Antonio

--------------080208040805090908080404
Content-Type: application/zip;
name="ant-tasks.zip"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="ant-tasks.zip"

UEsDBAoAAAAAAAa8gzsAAAAAAAAAAAAAAAAUAAAAZXMudWNhLm1vZGVsaW5n LmFudC9QSwME
CgAAAAgABryDO/Pcq4jNAAAAbwEAAB4AAABlcy51Y2EubW9kZWxpbmcuYW50 Ly5jbGFzc3Bh
dGiVkMFKAzEQhs/2KZbcO2sLgofdFpEVWrCWduu1pMmwHY2TOEmKfXtdsFQE hd7mH775+Jlq
+vHmigNKJM+1GsG1KpCNt8RdrTbtw/BWTSeDyjgdY9BpPxlcnQNykmPxSmxr ZTyrol/WyksH
aByFiPBiEzid2ey/jDBfNdv7p0V7N1s0q/I3R5xQWDuwuMsdZPq+RIF10my1 2OfH9hiwnI/X
zXAEN6q8tE+wCMYLguB7JkG7dLkjjv+YopiTqR//Bn1OIacTuyPu2ar88btP UEsDBAoAAAAA
AAa8gzsAAAAAAAAAAAAAAAAq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vZGVs aW5nL2FudC9n
bWZnZW4vR2VuZXJhdGVGcm9tR21mbWFwVGFzay5qYXZhUEsFBgAAAAAZABkA awgAAPwXAAAA
AA==
--------------080208040805090908080404
Content-Type: text/xml;
name="generate-code.xml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="generate-code.xml"

<?xml version="1.0" encoding="UTF-8"?>
<project name="serviceProcess" default="default">
<description>
<![CDATA[
This Ant buildfile attempts to mimic the basic Eugenia workflow
included in the documentation. It consists of: generating the
ECore model from the Emfatic source file, generating the .genmodel
file, customizing it with the global and user-defined EOL scripts,
generating the EMF code, deriving the GMF models from the ECore
file, deriving the GMFGen model from these, customizing it, and
finally generating the source code from it.

It depends on the es.uca.modeling.ant and ca.ecliptical.gmf.ant
plugins to do its work. The Ecliptical update site is at [1].

Currently, there's one known issue: the edit and editor projects,
when created from scratch, do not have the required Java and PDE
natures assigned to them. For the first nature, see [2]. For the
second, right-click on the project and use "Configure > Convert
to Plugin Projects...". Another option is generating the projects
the first time through the GUI, and then "Refactor > Move" them
to the locations in the *Project.location properties. Nevertheless,
this bug might be fixed by EMF 2.6 [3].

[1]: http://www.eclipticalsoftware.com/updates/site.xml
[2]: http://enarion.net/programming/tools/eclipse/changing-genera l-project-to-java-project/
[3]: http://www.eclipse.org/forums/index.php?t=msg&th=152228
]]>
</description>

<!-- PROPERTIES ####################################################### -->

<!-- Basic project info -->
<property name="project.name" value="ServiceProcess" />
<property name="model.dir" value="model" />
<property name="model.basename" value="serviceprocess" />
<property name="templates.dir" value="templates"/>
<property name="templates.gmfgraph.dir" value="templates-gmfgraph"/>

<!-- File locations -->
<property name="copyright.location" value="${model.dir}/copyright.txt" />
<property name="emfatic.location" value="${model.dir}/${model.basename}.emf" />
<property name="ecore.location" value="${model.dir}/${model.basename}.ecore" />
<property name="genmodel.location" value="${model.dir}/${model.basename}.genmodel" />
<property name="gmfgen.location" value="${model.dir}/${model.basename}.gmfgen" />
<property name="gmfgraph.location" value="${model.dir}/${model.basename}.gmfgraph" />
<property name="gmfmap.location" value="${model.dir}/${model.basename}.gmfmap" />
<property name="gmftool.location" value="${model.dir}/${model.basename}.gmftool" />

<!-- Project locations -->
<!-- For some reason, to create the edit and editor projects, we need to
pass some special arguments to emf.Ecore2Java, and place them in paths
different to their expected placement: (workspace)/(project name).
Otherwise, Eclipse will complain that their paths overlaps with
themselves, which strikes me as very odd. Perhaps it's being created
several times, or something like that? -->
<property name="modelProject.location" location="${basedir}" />
<property name="editProject.location" location="${basedir}/../generated/${project.name}.edit" />
<property name="editorProject.location" location="${basedir}/../generated/${project.name}.editor" />
<property name="testsProject.location" location="${basedir}/../generated/${project.name}.tests" />
<property name="diagramProject.location" location="${basedir}/../${project.name}.diagram" />

<!-- EPackage URIs -->
<property name="ecore.nsuri" value="http://www.eclipse.org/emf/2002/Ecore" />
<property name="genmodel.nsuri" value="http://www.eclipse.org/emf/2002/GenModel" />
<property name="gmfgraph.nsuri" value="http://www.eclipse.org/gmf/2006/GraphicalDefinition" />
<property name="gmftool.nsuri" value="http://www.eclipse.org/gmf/2005/ToolDefinition" />
<property name="gmfmap.nsuri" value="http://www.eclipse.org/gmf/2008/mappings" />
<property name="gmfgen.nsuri" value="http://www.eclipse.org/gmf/2009/GenModel" />

<!-- Epsilon URLs -->
<property name="epsilon.ecore2gmf.uri" value=" platform:/plugin/org.eclipse.epsilon.eugenia/transformations /ECore2GMF.eol " />
<property name="epsilon.fixgenmodel.uri" value=" platform:/plugin/org.eclipse.epsilon.eugenia/transformations /FixGenModel.eol " />
<property name="epsilon.fixgengmf.uri" value=" platform:/plugin/org.eclipse.epsilon.eugenia/transformations /FixGMFGen.eol " />

<property name="epsilon.ecore2gmf.local" value="${model.dir}/ECore2GMF.eol" />
<property name="epsilon.fixgenmodel.local" value="${model.dir}/FixGenModel.eol" />
<property name="epsilon.fixgmfgen.local" value="${model.dir}/FixGMFGen.eol" />

<available property="epsilon.ecore2gmf.local.exists" file="${epsilon.ecore2gmf.local}" />
<available property="epsilon.fixgenmodel.local.exists" file="${epsilon.fixgenmodel.local}" />
<available property="epsilon.fixgmfgen.local.exists" file="${epsilon.fixgmfgen.local}" />

<!--
Copyright text: try loading the copyright text. If it doesn't exist,
use the empty string.
-->
<loadfile srcFile="${copyright.location}" property="copyright.contents" quiet="true" />
<property name="copyright.contents" value="" />

<!-- MAIN BODY ######################################################## -->

<target name="init">
<tstamp />
</target>
<target name="refreshEmfatic" if="eclipse.application">
<echo>Refreshing the project directory under Eclipse</echo>
<eclipse.refreshLocal resource="/${project.name}" depth="infinite"/>
</target>
<target name="generateECore" depends="refreshEmfatic">
<echo>Generating ${ecore.location} file from Emfatic source ${emfatic.location}</echo>
<emfatic.generate src="${emfatic.location}" />
</target>
<target name="registerECore" depends="generateECore">
<echo>Registering ${ecore.location} file permanently</echo>
<epsilon.emf.register file="${ecore.location}" permanently="true"/>
</target>
<target name="generateGenModel" depends="registerECore">
<echo>Generating initial ${genmodel.location} file</echo>
<emf.Ecore2Java model="${ecore.location}" genmodel="${genmodel.location}" modelproject="${modelProject.location}" modelProjectFragmentPath="src" modelPluginID="${project.name}" generateJavaCode="false" validateModel="true">
<arg line="-editProject ${editProject.location} src" />
<arg line="-editorProject ${editorProject.location} src" />
<arg line="-testsProject ${testsProject.location} src" />
</emf.Ecore2Java>
</target>
<target name="defaultFixGenModel" depends="generateGenModel">
<echo>Fixing ${genmodel.location} (default EOL script) </echo>
<epsilon.emf.loadModel name="ECore" modelFile="${ecore.location}" metamodeluri="${ecore.nsuri}" read="true" store="false" />
<epsilon.emf.loadModel name="GenModel" modelFile="${genmodel.location}" metamodeluri="${genmodel.nsuri}" read="true" store="true" />
<epsilon.eol uri="${epsilon.fixgenmodel.uri}">
<parameter name="copyright" value="${copyright.contents}" />
<model ref="ECore" as="ECore" />
<model ref="GenModel" as="GenModel" />
</epsilon.eol>
</target>
<target name="customFixGenModel" depends="defaultFixGenModel" if="epsilon.fixgenmodel.local.exists">
<echo>Fixing ${genmodel.location} (user-defined EOL script)</echo>
<epsilon.eol src="${epsilon.fixgenmodel.local}">
<parameter name="copyright" value="${copyright.contents}" />
<model ref="ECore" as="ECore" />
<model ref="GenModel" as="GenModel" />
</epsilon.eol>
</target>
<target name="saveGenModel" depends="customFixGenModel">
<epsilon.disposeModel model="GenModel" />
</target>
<target name="generateEMFCode" depends="customFixGenModel">
<echo>Generating EMF edit and editor code</echo>
<emf.Ecore2Java model="${ecore.location}" genmodel="${genmodel.location}" reconcileGenModel="keep" modelproject="${modelProject.location}" modelProjectFragmentPath="src" modelPluginID="${project.name}" jdkLevel="5.0" validateModel="true" autoBuild="true">
<arg line="-editProject ${editProject.location} src" />
<arg line="-editorProject ${editorProject.location} src" />
<arg line="-testsProject ${testsProject.location} src" />
</emf.Ecore2Java>
</target>
<target name="generateGMFFiles" depends="generateEMFCode">
<echo>Generating GMF models</echo>
<epsilon.emf.loadModel name="GmfGraph" modelFile="${gmfgraph.location}" metamodeluri="${gmfgraph.nsuri}" read="false" store="true" />
<epsilon.emf.loadModel name="GmfTool" modelFile="${gmftool.location}" metamodeluri="${gmftool.nsuri}" read="false" store="true" />
<epsilon.emf.loadModel name="GmfMap" modelFile="${gmfmap.location}" metamodeluri="${gmfmap.nsuri}" read="false" store="true" />

<epsilon.eol uri="${epsilon.ecore2gmf.uri}">
<model ref="ECore" as="ECore" />
<model ref="GmfGraph" as="GmfGraph" />
<model ref="GmfTool" as="GmfTool" />
<model ref="GmfMap" as="GmfMap" />
</epsilon.eol>
</target>
<target name="customFixGMFFiles" depends="generateGMFFiles" if="epsilon.ecore2gmf.local.exists">
<echo>Customizing GMF models</echo>
<epsilon.eol src="${epsilon.ecore2gmf.local}">
<model ref="ECore" as="ECore" />
<model ref="GmfGraph" as="GmfGraph" />
<model ref="GmfTool" as="GmfTool" />
<model ref="GmfMap" as="GmfMap" />
</epsilon.eol>
</target>
<target name="saveGMFFiles" depends="customFixGMFFiles">
<epsilon.disposeModel model="GmfGraph" />
<epsilon.disposeModel model="GmfTool" />
<epsilon.disposeModel model="GmfMap" />
</target>
<target name="generateGMFGenModel" depends="saveGMFFiles">
<echo>Generating and synchronizing GMFGen model ${gmfgen.location} from GMFMap model</echo>
<gmfgen.fromGmfmap projectName="${project.name}" destFile="${gmfgen.location}" genModel="${genmodel.location}" mapModel="${gmfmap.location}" templatesDir="${templates.gmfgraph.dir}"/>
<epsilon.emf.loadModel name="GmfGen" modelFile="${gmfgen.location}" metamodeluri="${gmfgen.nsuri}" read="true" store="true" />
<epsilon.eol uri="${epsilon.fixgengmf.uri}">
<parameter name="copyright" value="${copyright.contents}" />
<model ref="ECore" as="ECore" />
<model ref="GmfGen" as="GmfGen" />
</epsilon.eol>
</target>
<target name="customFixGMFGenModel" depends="generateGMFGenModel" if="epsilon.fixgmfgen.local.exists">
<echo>Customizing GMFGen model ${gmfgen.location}</echo>
<epsilon.eol src="${epsilon.fixgmfgen.local}">
<parameter name="copyright" value="${copyright.contents}" />
<model ref="ECore" as="ECore" />
<model ref="GmfGen" as="GmfGen" />
</epsilon.eol>
</target>
<target name="saveGMFGenModel" depends="customFixGMFGenModel">
<epsilon.disposeModel model="GmfGen"/>
</target>
<target name="generateDiagramCode" depends="saveGMFGenModel"
xmlns:gmf="http://ecliptical.ca/gmf/ant">
<echo>Generating diagram project in ${diagramProject.location}</echo>
<gmf:GenerateDiagramCode gmfgenpath="${project.name}/${gmfgen.location}"/>
</target>

<!-- Default target -->
<target name="default" depends="generateDiagramCode"/>

<target name="clean">
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${modelProject.location}" includes="src/**/*"/>
<fileset dir="${modelProject.location}" includes="bin/**/*"/>
<fileset dir="${modelProject.location}" includes="${genmodel.location}"/>
<fileset dir="${modelProject.location}" includes="${gmfmap.location}"/>
<fileset dir="${modelProject.location}" includes="${gmftool.location}"/>
<fileset dir="${modelProject.location}" includes="${gmfgraph.location}"/>
<fileset dir="${modelProject.location}" includes="${gmfgen.location}"/>
<fileset dir="${modelProject.location}" includes="${ecore.location}"/>
<fileset dir="${modelProject.location}" includes="${emfatic.location}"/>
<fileset dir="${editProject.location}" includes="src/**/*"/>
<fileset dir="${editProject.location}" includes="bin/**/*"/>
<fileset dir="${editorProject.location}" includes="src/**/*"/>
<fileset dir="${editorProject.location}" includes="bin/**/*"/>
<fileset dir="${testsProject.location}" includes="src/**/*"/>
<fileset dir="${testsProject.location}" includes="bin/**/*"/>
<fileset dir="${diagramProject.location}" includes="src/**/*"/>
<fileset dir="${diagramProject.location}" includes="bin/**/*"/>
</delete>
</target>
</project>

--------------080208040805090908080404--
Re: Eugenia: Starters/ideas to automate GMF generation? [message #583407 is a reply to message #501825] Thu, 03 December 2009 23:14 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Hi again,

Ugh, remind me not to write long mails in a hurry at midnight. Let me
correct a few things.

> - Add the generate-code.xml Ant script as a custom Ant builder, using
> the "default" target (which ends up generating the GMF code). This
> way, every time you build the project, everything will be cleaned up
> and regenerated from scratch.

Careful with this. I've tried to only remove what's strictly required,
but it might be a little trigger-happy for your taste. I prefer to have
as few files under version control as possible.

> - Add these files to the model/ directory in your project:
> * yourmodel.emf (Emfatic textual description)
> * Optionally, model/ECore2GMF.eol (same as that used in EuGENia)
> * Optionally, model/FixGenModel.eol (same as that used in EuGENia)
> * Optionally, model/FixGMFGen.eol (same as that used in EuGENia)
> * Optionally, model/copyright.txt (copyright info, like in EuGENia)

Replace with:

- Add these files to the model/ directory in your project:
* yourmodel.emf (Emfatic textual description)
* Optionally, ECore2GMF.eol (same as that used in EuGENia)
* Optionally, FixGenModel.eol (same as that used in EuGENia)
* Optionally, FixGMFGen.eol (same as that used in EuGENia)
* Optionally, copyright.txt (copyright info, like in EuGENia)

Well, that's it for today. Hope it helps :-).

Cheers,
Antonio
Re: Eugenia: Starters/ideas to automate GMF generation? [message #583472 is a reply to message #501742] Fri, 04 December 2009 21:07 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
Just to add to this briefly: The EMF generation bit is not problematic:
EMF has a class called Generator that does all of this and, IIRC, comes
with its own main method and all.

Steffen

Dimitris Kolovos wrote:
> Hi Christoph,
>
> When developing Eugenia, we too wanted to make it work in one step
> (right click .ecore -> generate everything) but couldn't figure out how
> to do this. If memory serves, automating the EMF bits was possible (i.e.
> reloading .genmodel and generating the EMF code) but for GMF there was
> no visible API for automating the gmfmap->gmfgen and gmfgen->code steps.
> Could you possibly post a question in the GMF newsgroup and see if
> someone comes up with any ideas on how to do this?
>
> Cheers,
> Dimitris
>
> Christoph Wienands wrote:
>
>> Hey guys,
>>
>> I'm getting kind of tired of repeatedly going through a whole list of
>> steps to regenerate my GMF editor everytime I make a change to the EMF
>> (generate ecore, reload genmodel, sync genmodel, generate code, generate
>> edit, generate editor,... you get the idea). Not only is it a bit
>> cumbersome (OK, nothing compared to the time savings through Eugenia)
>> but often I forget a step (e.g. an EOL sync) and have to figure out what
>> screwed up my editor.
>>
>> I was thinking about a way to automate this. In a bug report I read
>> something about Ant tasks for Eugenia but couldn't make much sense of
>> it. While Ant tasks might work for the Eugenia steps, I would still have
>> to automate the genmodel and gmf steps, like reloading the genmodel,
>> generating the gmfgen, and the GMF diagram plug-in. The main problem I
>> see with automating these steps is that they are dialog-based so I
>> probably can't just call some GMF function.
>>
>> I'm not expecting a full solution but lacking in-depth Eclipse
>> knowledge, could someone give me a starter (which Eclipse mechanism to
>> use, where to look up information, etc.) of how to automate all these
>> non-dialog and dialog-based steps?
>>
>> If I get it working, I will make the code available for possible
>> integration into Eugenia.
>>
>> Thanks a lot, Christoph
>>
>
>
>
Re: Eugenia: Starters/ideas to automate GMF generation? [message #583499 is a reply to message #502038] Sat, 05 December 2009 14:09 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Hi Steffen,

Steffen Zschaler wrote:
> Just to add to this briefly: The EMF generation bit is not problematic:
> EMF has a class called Generator that does all of this and, IIRC, comes
> with its own main method and all.

That's nice to know, thanks :-). Are the generated projects set up just
like those created from the ECore editor context menu entries?

On August I ran into some problems with the EMF Ant tasks because they
didn't generate the projects in the exact same way. They weren't
completely set up and had to be placed in a subdirectory of the
workspace (workspace/generated/X.model, workspace/generated/X.edit, and
so on). I think they might have fixed some of these issues by now, but I
haven't checked yet.

Thanks,
Antonio
Re: Eugenia: Starters/ideas to automate GMF generation? [message #583593 is a reply to message #502089] Mon, 07 December 2009 10:46 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
I think, the projects should be set up the same way as I believe this is
the same code that is run from the IDE.

Steffen

Antonio García Domínguez wrote:
> Hi Steffen,
>
> Steffen Zschaler wrote:
>
>> Just to add to this briefly: The EMF generation bit is not problematic:
>> EMF has a class called Generator that does all of this and, IIRC, comes
>> with its own main method and all.
>>
>
> That's nice to know, thanks :-). Are the generated projects set up just
> like those created from the ECore editor context menu entries?
>
> On August I ran into some problems with the EMF Ant tasks because they
> didn't generate the projects in the exact same way. They weren't
> completely set up and had to be placed in a subdirectory of the
> workspace (workspace/generated/X.model, workspace/generated/X.edit, and
> so on). I think they might have fixed some of these issues by now, but I
> haven't checked yet.
>
> Thanks,
> Antonio
>
Re: Eugenia: Starters/ideas to automate GMF generation? [message #589487 is a reply to message #501825] Sat, 29 May 2010 10:10 Go to previous messageGo to next message
Endre Balogh is currently offline Endre BaloghFriend
Messages: 38
Registered: May 2010
Member
Hi Antonio,
I just started to browse the Epsilon forums myself looking to automatize the process of diagram generation.
I came across your ANT script, but I can't make it work. It dies when trying to generate the .ecore file from the .emf file, with the following message:
Problem: failed to create task or type emfatic.generate
It doesn't seem to recognize any of these tasks, as I removed this part, and then it died with this:
Problem: failed to create task or type epsilon.emf.register
I installed the required plugins from here
Ecliptical - http://www.eclipticalsoftware.com/updates/site.xml
and here
Ant tasks for GMF - http://neptuno.uca.es/~agarcia/sodmt-updates/site.xml
Well actually, I installed every plugin from these sites, hoping it would make it work - probably not a wise choice, I will revert my eclipse to a previous state Smile.
I also have the latest version of modeling tools and epsilon (just checked for updates from eclipse).
Did I miss any requirements?

Cheers,
Endre
Re: Eugenia: Starters/ideas to automate GMF generation? [message #589827 is a reply to message #589487] Sat, 05 June 2010 12:11 Go to previous messageGo to next message
Endre Balogh is currently offline Endre BaloghFriend
Messages: 38
Registered: May 2010
Member
I found some topics on the forum about using epsilon with ant, and started fiddling with the build script again.
The tasks that begin with epsilon, e.g.epsilon.eol, epsilon.emf.register now work, however others, such as gmfgen.fromGmfmap and emfatic.generate do not.
Does anybody know what can be done for Ant to recognize these tasks?

Cheers,
Endre
Re: Eugenia: Starters/ideas to automate GMF generation? [message #589839 is a reply to message #589827] Sun, 06 June 2010 09:05 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Endre,

These appear to be tasks written by Antonio, so it's probably worth
dropping him an email to speed things up.

Cheers,
Dimitris

On 05/06/2010 15:11, Endre Balogh wrote:
> I found some topics on the forum about using epsilon with ant, and
> started fiddling with the build script again. The tasks that begin with
> epsilon, e.g.epsilon.eol, epsilon.emf.register now work, however others,
> such as gmfgen.fromGmfmap and emfatic.generate do not.
> Does anybody know what can be done for Ant to recognize these tasks?
>
> Cheers,
> Endre
Re: Eugenia: Starters/ideas to automate GMF generation? [message #589853 is a reply to message #538189] Sun, 06 June 2010 11:32 Go to previous messageGo to next message
Endre Balogh is currently offline Endre BaloghFriend
Messages: 38
Registered: May 2010
Member
Hi Dimitris,

Thanks for the suggestion, I will write him about it.

Cheers,
Endre
Re: Eugenia: Starters/ideas to automate GMF generation? [message #1263278 is a reply to message #583499] Tue, 04 March 2014 10:39 Go to previous messageGo to next message
Shrikanth NC is currently offline Shrikanth NCFriend
Messages: 31
Registered: February 2014
Member
How to run the following build.xml from command prompt ?
*********************************************************************
<project default="main">
<target name="main">
<epsilon.eugenia src="new_file.emf"/>
</target>
</project>
**********************************************************************
I have the latest ant installed and working perfectly.

Currently it says Problem: failed to create task or type epsilon.eugenia

Kindly help!

Thanks,
Shrikanth NC

[Updated on: Tue, 04 March 2014 10:40]

Report message to a moderator

Re: Eugenia: Starters/ideas to automate GMF generation? [message #1266305 is a reply to message #1263278] Fri, 07 March 2014 08:47 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Please see http://www.eclipse.org/forums/index.php/mv/msg/660072/1266297/#msg_1266297

Cheers,
Dimitris
Previous Topic:[Eugenia] using xcore class from another plugin
Next Topic:ETL trafo plug-in - no target model visible
Goto Forum:
  


Current Time: Thu Apr 18 03:26:08 GMT 2024

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

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

Back to the top