Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [JET] "translation" code
[JET] "translation" code [message #873000] Thu, 17 May 2012 09:34 Go to next message
jpfse   is currently offline jpfse Friend
Messages: 18
Registered: December 2011
Junior Member
Hello!

I am reconstructing a datamodel plugin using EMF. This means that I have a deprecated datamodel plugin and a brand new one that i´m working on. Part of the deprecated plugin already uses EMF. The problem is that I can't find the JET translation code in the deprecated plugin, but in the new plugin the translation code is generated in the source folder among the "generated" code, and these translation code has erros because "GenFeature" is missing (as well as some other classes from the plugin org.eclipse.emf.codegen.ecore.genmodel). I also can't find the place in the deprecated plugin that configures the location of the translation code.

Where is the default or the correct place for the translation code?

Where can I set the location of the translation code?

Should the datamodel plugin be converted to a JET plugin? Actualy the deprecated plugin is not a JET plugin and neither was the new plugin, and the problem was just the same. Right now, the new plugin is a JET plugin since I converted it because I was trying to solve the problem. The problem is still the same.

Tanks!
Re: [JET] "translation" code [message #873014 is a reply to message #873000] Thu, 17 May 2012 10:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
João,

Comments below.

On 17/05/2012 11:34 AM, João Sequeira wrote:
> Hello!
>
> I am reconstructing a datamodel plugin using EMF. This means that I
> have a deprecated datamodel plugin and a brand new one that i´m
> working on. Part of the deprecated plugin already uses EMF. The
> problem is that I can't find the JET translation code in the
> deprecated plugin, but in the new plugin the translation code is
> generated in the source folder among the "generated" code, and these
> translation code has erros because "GenFeature" is missing (as well as
> some other classes from the plugin
> org.eclipse.emf.codegen.ecore.genmodel).
So you need to add a dependency (using the MANIFEST.MF editor) on
org.eclipse.emf.codegen.ecore to the new plugin.
> I also can't find the place in the deprecated plugin that configures
> the location of the translation code.
The JET Settings in the project's properties..
>
> Where is the default or the correct place for the translation code?
The default is the src folder
>
> Where can I set the location of the translation code?
In the JET Settings for that project.
>
> Should the datamodel plugin be converted to a JET plugin?
Yes, it should have a JET nature added if you want it to compile/convert
your templtes
> Actualy the deprecated plugin is not a JET plugin and neither was the
> new plugin, and the problem was just the same. Right now, the new
> plugin is a JET plugin since I converted it because I was trying to
> solve the problem. The problem is still the same.
>
> Tanks!


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [JET] "translation" code [message #873089 is a reply to message #873014] Thu, 17 May 2012 13:35 Go to previous messageGo to next message
jpfse   is currently offline jpfse Friend
Messages: 18
Registered: December 2011
Junior Member
I have another question then. I just found that I have a plugin called .JETEmitters and after a quick search it seems to me that the code contained in this plugin is translation code.

So, what is .JETEmitters for?

The translation code that is generated in the src folder of the new datamodel plugin will be used instead of the code in .JETEmitters?

Will I have problems due to having two EMF plugins and one .JETEmitters?
Re: [JET] "translation" code [message #873163 is a reply to message #873089] Thu, 17 May 2012 16:03 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
João,

Comments below.

On 17/05/2012 3:35 PM, João Sequeira wrote:
> I have another question then. I just found that I have a plugin called
> .JETEmitters and after a quick search it seems to me that the code
> contained in this plugin is translation code.
The EMF generator's dynamic templates are compiled to that project.
> So, what is .JETEmitters for?
The results of dynamic templates. They're generated, Eclipse builds
them, and then the .class files are loaded and executed.
> The translation code that is generated in the src folder of the new
> datamodel plugin will be used instead of the code in .JETEmitters?
Yes, if you point your template path to your compile templates
>
> Will I have problems due to having two EMF plugins and one .JETEmitters?
EMF's generator will overwrite the source files there and load the
compiled results and reuse them. It's possible you could have problems
from having more than one, but not so likely.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [JET] "translation" code [message #873613 is a reply to message #873163] Fri, 18 May 2012 16:52 Go to previous messageGo to next message
jpfse   is currently offline jpfse Friend
Messages: 18
Registered: December 2011
Junior Member
What do you mean by "point your template path to your compile templates"?
Re: [JET] "translation" code [message #873849 is a reply to message #873613] Sat, 19 May 2012 08:39 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
João,<br>
<br>
You can use the URI platform:/plugin/&lt;bundle-ID&gt;/ for your
GenModel's Template Directory so that your compiled templates in
some deployed bundle are used dynamically instead of the ones
provided by EMF's generator and without.  I think if you use
platform:/resource/project/path and your project has a JET nature,
dynamic templates (their .class files) are loaded from that project
instead of being compiled into the .JETEmmitters project and loaded
from there.  I'm pretty sure using /project/path will produce the
same result...  Here's a thread that discussed it:<a
href="http://www.eclipse.org/forums/index.php/t/243390/"><br>
</a>
<blockquote><a
href="http://www.eclipse.org/forums/index.php/t/243390/">http://www.eclipse.org/forums/index.php/t/243390/</a><br>
</blockquote>
<br>
On 18/05/2012 6:52 PM, João Sequeira wrote:
<blockquote cite="mid:jp5uom$gqg$1@xxxxxxxxe.org" type="cite">What
do you mean by "point your template path to your compile
templates"?
<br>
</blockquote>
</body>
</html>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[TEXO] traverse object graph
Next Topic:Urgent : How to Read the Ecore Model
Goto Forum:
  


Current Time: Thu Apr 25 12:53:38 GMT 2024

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

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

Back to the top