Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Eugenia Epsilon (ANT Task)
Eugenia Epsilon [message #1094975] Mon, 26 August 2013 13:19 Go to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Dear Team,

I am generating design editor using Epsilon, I did design, compilation manually, I would like to automate same using ANT script. Epsilon web provided some info but does not have full info on ANT script, please share anyone who worked on the same.

Regards
Re: Eugenia Epsilon [message #1095715 is a reply to message #1094975] Tue, 27 August 2013 12:26 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi,

Does this help?

http://eclipse.org/epsilon/doc/articles/eugenia-ant/

Cheers,
Dimitris
Re: Eugenia Epsilon [message #1097773 is a reply to message #1095715] Fri, 30 August 2013 06:33 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Thanks,

I follow the URL but I am getting following error

build.xml:36: Problem: failed to create task or type epsilon.eugenia
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

I included Apache ant-contrib-1.0b3 but still I am getting this error
Re: Eugenia Epsilon [message #1097799 is a reply to message #1097773] Fri, 30 August 2013 07:02 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi,

You'll need to select the "Run in the same JRE as the workspace" option under the JRE tab of your launch configuration [1].

Cheers,
Dimitris

[1] http://eclipse.org/epsilon/doc/workflow/
Re: Eugenia Epsilon [message #1097903 is a reply to message #1097799] Fri, 30 August 2013 10:07 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Thanks for you help, It works for me.

After this code generation, and i need to launch a design window (may be in eclipse) automatically after code generation, is there anyway i can do it

Re: Eugenia Epsilon [message #1097998 is a reply to message #1097903] Fri, 30 August 2013 12:56 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Could you please clarify what you mean by "a design window"?

Cheers,
Dimitris
Re: Eugenia Epsilon [message #1099722 is a reply to message #1097998] Mon, 02 September 2013 05:40 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
The Design Window means,

I would like to call following are as part of ANT script after epsilon build and before epsilon build

Before Epsilon build - I want to execute some pre-requisite java classes
After Epsilon build - I would like to run "gmfgen" as a Eclipse Application, so it opens new Eclipse based EMF editor.

I want to automate entire process with Ant Script

Call Pre-Reuisite Java class in Ant Buil--> Epsilon Ant Build --> gmfgen as a Eclipse Application in Ant Build

[Updated on: Mon, 02 September 2013 12:56]

Report message to a moderator

Re: Eugenia Epsilon [message #1100042 is a reply to message #1099722] Mon, 02 September 2013 15:19 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi,

You can execute java code using the "java" ANT task [1]. I'm not aware of an ANT task that would enable you to launch a new Eclipse application so you may need to roll out your own.

Cheers,
Dimitris

[1] http://ant.apache.org/manual/Tasks/java.html
[2] http://ant.apache.org/manual/develop.html
Re: Eugenia Epsilon [message #1104971 is a reply to message #1100042] Mon, 09 September 2013 07:02 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Hi Dimitris,

Thanks for your previous help

I am getting following error

failed to create task or type gmfgen.fromGmfmap

plugin/org.eclipse.epsilon.eugenia/transformations/FixGenModel.eol


Please help me out here

[Updated on: Mon, 09 September 2013 08:50]

Report message to a moderator

Re: Eugenia Epsilon [message #1105080 is a reply to message #1104971] Mon, 09 September 2013 10:35 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi,

I'll probably need a bit more information than that (e.g a minimal example that I can use to reproduce this error [1]) before I can provide a more helpful response.

Cheers,
Dimitris

[1] http://eclipse.org/epsilon/doc/articles/minimal-examples/
Re: Eugenia Epsilon [message #1105106 is a reply to message #1105080] Mon, 09 September 2013 11:25 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Hi,

Thanks for response, I am using ANT script to run the emf design code

I am using following ANT script to generate this

In this I am getting the above error


<?xml version="1.0" encoding="UTF-8"?>
<project name="CobolEMFProject" 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="CobolEMFProject" />
<property name="model.dir" value="model" />
<property name="model.basename" value="cobolEMF" />
<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" />



<!-- 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>


<!--Generating ecore model -->
<target name="generateECore" depends="refreshEmfatic">
<echo>Generating ${ecore.location} file from Emfatic source ${emfatic.location}</echo>
<epsilon.eugenia src="${emfatic.location}"></epsilon.eugenia>
</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>


Re: Eugenia Epsilon [message #1105120 is a reply to message #1105106] Mon, 09 September 2013 11:50 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Thanks. Could you please elaborate a bit on why you need to duplicate the behaviour of the <epsilon.eugenia> task instead of building on top of it? Regarding the error you're receiving ("failed to create task or type gmfgen.fromGmfmap"), it indicates that for some reason ANT cannot find the task in question (which I suspect is coming from the eclipticalsoftware update site). Could you please try to fix this problem first and then give it another go?

Cheers,
Dimitris
Re: Eugenia Epsilon [message #1105133 is a reply to message #1105120] Mon, 09 September 2013 12:10 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Thanks for info,

eclipticalsoftware update site - is not available, it throws error to fix. is there any other update site available
Re: Eugenia Epsilon [message #1105139 is a reply to message #1105133] Mon, 09 September 2013 12:19 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

I wasn't even aware of eclipticalsoftware until you mentioned their website in your previous message so I'm afraid I can't be of much assistance here.

Cheers,
Dimitris
Re: Eugenia Epsilon [message #1105142 is a reply to message #1105139] Mon, 09 September 2013 12:22 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Ohk, I got it from here

http://www.eclipse.org/forums/index.php?t=msg&th=158862/
Re: Eugenia Epsilon [message #1105146 is a reply to message #1105142] Mon, 09 September 2013 12:27 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

I believe that this is an earlier version of work that was eventually consolidated in the <epsilon.eugenia> task [1] so it's obsolete now.

Cheers,
Dimitris

[1] http://www.eclipse.org/epsilon/doc/articles/eugenia-ant/
Re: Eugenia Epsilon [message #1105151 is a reply to message #1105146] Mon, 09 September 2013 12:34 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
ok, thanks

Thanks for info, I am changing the script,

during this time, I am getting this frequent error

I have a genemodel generated into the model directory,

Any pointer to me to resolve this

Model 'genmodel' not found



<!-- It save gen model -->
<target name="saveGenModel" depends="generateGenModel">
<epsilon.disposeModel model="genmodel" />
</target>
Re: Eugenia Epsilon [message #1105155 is a reply to message #1105151] Mon, 09 September 2013 12:38 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

I suspect that you're receiving this error because no "genmodel" model has been loaded in your workflow using one of <epsilon.loadModel> or <epsilon.emf.loadModel> tasks...

Cheers,
Dimitris
Re: Eugenia Epsilon [message #1105685 is a reply to message #1105155] Tue, 10 September 2013 06:55 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Thanks,

Again I am struck with some issue

\build.xml:174: Type 'GmfTool!ToolRegistry' not found (platform:/plugin/org.eclipse.epsilon.eugenia/transformations/ECore2GMF.eol@8:32)
Can you give a pointer to this

sorry for bother you

(As i said earlier, I have a emafatic code which i need to automate generation)

[Updated on: Tue, 10 September 2013 07:10]

Report message to a moderator

Re: Eugenia Epsilon [message #1105736 is a reply to message #1105685] Tue, 10 September 2013 08:06 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 Shivakumar,

I would suggest switching to our new <epsilon.eugenia> task: it is *much* easier to use than my old hackish script Smile. Can you post your Ant buildfile over here so we can have a look at it?

Best regards,
Antonio

[Updated on: Tue, 10 September 2013 08:07]

Report message to a moderator

Re: Eugenia Epsilon [message #1109989 is a reply to message #1105736] Mon, 16 September 2013 08:02 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Thanks for help,

It works for me,

Now I am facing another problem, I want to create a plug-in out of it, when i run a menu command to run build.xml, I am getting this error

"Problem: failed to create task or type epsilon.eugenia"

Is there any pointer how I can run my plugin with "Run in the same as JRE in the workspace"

I am launching new workspace for plugin.
Re: Eugenia Epsilon [message #1109993 is a reply to message #1109989] Mon, 16 September 2013 08:08 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi,

On the 3rd screen of [1] you should select the "Run in the same as JRE in the workspace" option.

Cheers,
Dimitris

[1] http://www.codejava.net/ides/eclipse/how-to-change-jre-for-ant-in-eclipse
Re: Eugenia Epsilon [message #1110064 is a reply to message #1109993] Mon, 16 September 2013 10:04 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Hi,

Thanks for quick reply, This solns works fine when i execute ant's build.xml script in the workspace.

I am planning to do Plug-in the whole automation process by calling build.xml in the Java class which inturn is a command in plug-in.

When i run as Meta-Inf of ecliplse plug-in, it starts new eclipse window with the command in Menu tool bar.
When i run this menu, it calls teh Java class which inturn calls the build.xml, it executes other part of the build but when it comes to the eugenia , throws build.xml:112: Problem: failed to create task or type epsilon.eugenia"
Any Idea on how to fix JRE issue

"<target name="generateCode">
<!-- Generate myfile.ecore from myfile.emf and then proceed -->
<epsilon.eugenia src="${emfatic.location}"/>

<!-- Start directly from the Ecore model -->
<epsilon.eugenia src="${ecore.location}"/>

<!-- Skips the clean, ecore and genmodel steps -->
<epsilon.eugenia src="${ecore.location}" firstStep="gmf"/>

<!-- Does not run the emfcode and gmfcode steps -->
<epsilon.eugenia src="${emfatic.location}" lastStep="gmfgen"/>

<!-- Only runs the gmf and gmfgen steps -->
<epsilon.eugenia src="${ecore.location}" firstStep="gmf" lastStep="gmfgen"/>

</target>
"
Re: Eugenia Epsilon [message #1110204 is a reply to message #1110064] Mon, 16 September 2013 14:35 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 Shivakmuar,

Using Eclipse Ant tasks from Java is actually quite complicated, as I can attest from my time developing EUnit Smile.

Do you simply want to rebuild the graphical editor every time you modify it in Eclipse? In that case, you can just add an "Ant Builder" that runs the build.xml files for you whenever the project is built. That's what I usually do.

Here's a tutorial on how to use Ant Builders in Eclipse:

http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2FgettingStarted%2Fqs-92_project_builders.htm

By the way, you can simplify your target quite a bit. Here:

<target name="generateCode">
  <!-- Generate myfile.ecore from myfile.emf and then proceed -->
  <epsilon.eugenia src="${emfatic.location}"/>
</target>


Best regards,
Antonio
Re: Eugenia Epsilon [message #1110256 is a reply to message #1110204] Mon, 16 September 2013 16:13 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi Shivakmuar,

Another option may be to invoke Eugenia using/borrowing from the GenerateAllDelegate class [1].

Cheers,
Dimitris

[1] http://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/plugins/org.eclipse.epsilon.eugenia/src/org/eclipse/epsilon/eugenia/GenerateAllDelegate.java
Re: Eugenia Epsilon [message #1110629 is a reply to message #1110256] Tue, 17 September 2013 05:53 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Thanks Dimitris and Antonio

I want to create a Ecliplse Plug-in which includes following

1) I have program (Apache's File Util) which writes dynamically to the emfatic code
2)And build gen model, gmgraph etc based om emfatic code

Both above are present in the same build.xml (compilation and building)

What I am doing is create a plugin coomand (extension) in eclipse which need to call this build.xml file, so use of this build.xml can just invoke eclipse menu command to run this.

Greatful if you provide pointer to this

Re: Eugenia Epsilon [message #1110769 is a reply to message #1110629] Tue, 17 September 2013 10:01 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
I tried to execute Ant by calling Java, but I am getting this following error

Problem: failed to create task or type epsilon.eugenia

This is due to "Run in the same JRE as the Workspace" , works fine when I execute Ant build file directly, but fails when I call from Java.

Any Idea how to set "Run in the same JRE as the Workspace" from Java
Re: Eugenia Epsilon [message #1111018 is a reply to message #1110769] Tue, 17 September 2013 16:55 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi,

I'm not sure I understand how your last question is different to http://www.eclipse.org/forums/index.php/mv/msg/512479/1110064/#msg_1110064. Have you tried the solution suggested in http://www.eclipse.org/forums/index.php/mv/msg/512479/1110256/#msg_1110256?

Cheers,
Dimitris
Re: Eugenia Epsilon [message #1111515 is a reply to message #1111018] Wed, 18 September 2013 10:19 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
I tried the option of autobuild, that works fine,

(It was running fine when i run build.xml directly with set JRE as "Run in the same JRE as the workspace"
but when i try to invoke build.xml file from java (below code), it throws following error in eclipse
"build.xml:116: Problem: failed to create task or type epsilon.eugenia"

The Java code as below

File buildFile = new File("build.xml");
Project p = new Project();
p.setUserProperty("ant.file", buildFile.getAbsolutePath());
DefaultLogger consoleLogger = new DefaultLogger();
consoleLogger.setErrorPrintStream(System.err);
consoleLogger.setOutputPrintStream(System.out);
consoleLogger.setMessageOutputLevel(Project.MSG_INFO);
p.addBuildListener(consoleLogger);

try {
p.fireBuildStarted();
p.init();
ProjectHelper helper = ProjectHelper.getProjectHelper();
p.addReference("ant.projectHelper", helper);
helper.parse(p, buildFile);
p.executeTarget(p.getDefaultTarget());
p.fireBuildFinished(null);
} catch (BuildException e) {
p.fireBuildFinished(e);
}
Re: Eugenia Epsilon [message #1111540 is a reply to message #1111515] Wed, 18 September 2013 11:03 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi Shivakumar,

I've uploaded an example that demonstrates how to do this [1]. To run this, you'll need to check out the org.eclipse.epsilon.examples.runant project and follow the instructions in readme.txt.

Cheers,
Dimitris

[1] https://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/examples/org.eclipse.epsilon.examples.runant/src/org/eclipse/epsilon/examples/runant/RunAntAction.java
Re: Eugenia Epsilon [message #1112099 is a reply to message #1111540] Thu, 19 September 2013 05:56 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Thanks, It works fine and it opens a new window

I want to open new eclipse window through ANT (This windows design window (as per http://www.eclipse.org/epsilon/cinema/
"GMF Editor Development with EuGENia" I want exactly this method in automated way

I am following same steps as above video but looking in automated way with Ant Script


Re: Eugenia Epsilon [message #1112114 is a reply to message #1112099] Thu, 19 September 2013 06:25 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi Shivakumar,

I suppose that you could try to construct and run an Eclipse launch configuration programmatically (similarly to what we do in [1] with an ANT launch configuration). I wouldn't know how to do this off the top of my head but I suspect that the good people over at the PDE forum [2] should be able to help.

Cheers,
Dimitris

[1] https://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/examples/org.eclipse.epsilon.examples.runant/src/org/eclipse/epsilon/examples/runant/RunAntAction.java
[2] http://www.eclipse.org/forums/index.php/f/14/
Re: Eugenia Epsilon [message #1112124 is a reply to message #1112114] Thu, 19 September 2013 06:40 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Thanks for info,

One basic question, how to call RunAntAction class to execute my build.xml file

Re: Eugenia Epsilon [message #1112165 is a reply to message #1112124] Thu, 19 September 2013 07:47 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi Shivakumar,

It should say in readme.txt [1].

Cheers,
Dimitris

[1] https://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/examples/org.eclipse.epsilon.examples.runant/readme.txt
Re: Eugenia Epsilon [message #1116434 is a reply to message #1110256] Wed, 25 September 2013 12:45 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Hi Dimitris,

Please can you guide me or point me how to use this "GenerateAllDelegate" class to genereate like how to pass *.emf file etc
Re: Eugenia Epsilon [message #1116441 is a reply to message #1116434] Wed, 25 September 2013 12:56 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi,

You will most probably need to subclass GenerateAllDelegate, override its getDelegates() method and add a new delegate that implements the additional functionality. You should then create a new objectContribution in your plugin.xml (see [1] for examples) that will enable you to invoke your delegate on the currently selected .emf file.

Cheers,
Dimitris

[1] http://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/plugins/org.eclipse.epsilon.eugenia/plugin.xml

[Updated on: Wed, 25 September 2013 19:14]

Report message to a moderator

Re: Eugenia Epsilon [message #1117209 is a reply to message #1116441] Thu, 26 September 2013 07:48 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Thanks Dimitris,

I did the plug-in.xml with objectContribution and executed the new eclipse application for Manifest file (MANIFEST.MF-->Run Eclipse Application - It opens new eclipse window) but it didn't work for me (not even menu).


Is there anything I am missing

Re: Eugenia Epsilon [message #1117246 is a reply to message #1117209] Thu, 26 September 2013 08:39 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

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

Cheers,
Dimitris

[1] http://eclipse.org/epsilon/doc/articles/minimal-examples/
Re: Eugenia Epsilon [message #1117549 is a reply to message #1117246] Thu, 26 September 2013 15:01 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Hi Dimitris

I send minimal project to the following email

epsilon.devs@gmail.com
Re: Eugenia Epsilon [message #1118349 is a reply to message #1117549] Fri, 27 September 2013 10:12 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Hi Dimitris

Is there any luck on 2 small project issues
Re: Eugenia Epsilon [message #1118356 is a reply to message #1118349] Fri, 27 September 2013 10:20 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi,

In the plugin.xml of "Small Epsilon Project - Generate gmf from Java class.zip" I see no reference to your AntDelegate class. Your "Small Ant Project- Ant File - call Ant File from Java code.zip" project has one class (AntRun) that only has a main method and again is not referenced in your plugin.xml. Moreover, its code is dissimilar to the example I provided [2].

I'm afraid that we've drifted away from discussing Epsilon-related issues and into basic Eclipse plugin troubleshooting. For a quick tutorial on how to contribute menu items to Eclipse I'd recommend [1]. For a more comprehensive reference I'd recommend [3] (it's getting a bit dated but most examples presented there still work).

Cheers,
Dimitris

[1] http://www.eclipse.org/articles/article.php?file=Article-action-contribution/index.html
[2] https://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/examples/org.eclipse.epsilon.examples.runant/src/org/eclipse/epsilon/examples/runant/RunAntAction.java
[3] http://www.amazon.co.uk/Eclipse-Plug-ins-Building-Commercial-Quality-Addison-Wesley/
Re: Eugenia Epsilon [message #1120899 is a reply to message #1117246] Mon, 30 September 2013 04:18 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Any input for me to resolve this issue
Re: Eugenia Epsilon [message #1122026 is a reply to message #1120899] Tue, 01 October 2013 06:48 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
org.eclipse.epsilon.eugenia.patches.GeneratePatchesDelegate and ApplyPatchesDelegate classes are not available in following Jar file (these classes are reffered in GenerateAllDelegate.java)

org.eclipse.epsilon.eugenia_1.0.0.201211082326.jar
is there any other version of jar available
Re: Eugenia Epsilon [message #1122030 is a reply to message #1122026] Tue, 01 October 2013 06:52 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

Epsilon 1.1SR1 was released a few weeks ago. You might want to try it out:

http://eclipse.org/epsilon/download/
Re: Eugenia Epsilon [message #1122142 is a reply to message #1120899] Tue, 01 October 2013 09:09 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
when i override the
protected List<EugeniaActionDelegate> getDelegates()
{
return Arrays.asList(

new GmfMap2GmfGenDelegate().setClearConsole(false),
new FixGmfGenDelegate().setClearConsole(false),
new GenerateEmfCodeDelegate()
);

this method,
I get an error saying
"The method asList(T...) in the type Arrays is not applicable for the arguments (void, void, GenerateEmfCodeDelegate)"
Re: Eugenia Epsilon [message #1122187 is a reply to message #1122142] Tue, 01 October 2013 10:01 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Any idea on following error

org.eclipse.core.runtime.CoreException: Plug-in "project name" was unable to instantiate class "org.eclipse.epsilon.eugenia.GenerateToolGraphMapDelegate".

This throws error when i call through the menu in eclipse
Re: Eugenia Epsilon [message #1122291 is a reply to message #1116441] Tue, 01 October 2013 12:07 Go to previous messageGo to next message
Shivakumar goniwada is currently offline Shivakumar goniwadaFriend
Messages: 28
Registered: August 2013
Junior Member
Hi Dimitris,

Instead of plugin, I would like to call this from Application (Swing events from button),

Is it possible to give some steps on how to invoke and pass *.emf file.


You will most probably need to subclass GenerateAllDelegate, override its getDelegates() method and add a new delegate that implements the additional functionality. You should then create a new objectContribution in your plugin.xml (see [1] for examples) that will enable you to invoke your delegate on the currently selected .emf file.

[Updated on: Tue, 01 October 2013 12:30]

Report message to a moderator

Re: Eugenia Epsilon [message #1124511 is a reply to message #1122291] Thu, 03 October 2013 16:03 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Running the complete Eugenia workflow (.emf -> generated code) from a standalone Swing application would be really hard as Eugenia invokes GMF tooling which is deeply integrated with Eclipse.

Cheers,
Dimitris
Previous Topic:New Pallet
Next Topic:Error "Type 'A!B' not found in .etl code!"
Goto Forum:
  


Current Time: Thu Mar 28 17:39:18 GMT 2024

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

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

Back to the top