Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[JET] "translation" code
https://www.eclipse.org/forums/index.php/mv/msg/352494/873000/#msg_873000
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.
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 Merks2012-05-17T10:10:47-00:00Re: [JET] "translation" code
https://www.eclipse.org/forums/index.php/mv/msg/352494/873089/#msg_873089
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?]]>jpfse 2012-05-17T13:35:41-00:00Re: [JET] "translation" code
https://www.eclipse.org/forums/index.php/mv/msg/352494/873163/#msg_873163
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 Merks2012-05-17T16:03:10-00:00Re: [JET] "translation" code
https://www.eclipse.org/forums/index.php/mv/msg/352494/873613/#msg_873613
jpfse 2012-05-18T16:52:38-00:00Re: [JET] "translation" code
https://www.eclipse.org/forums/index.php/mv/msg/352494/873849/#msg_873849
<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/<bundle-ID>/ 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 Merks2012-05-19T08:39:29-00:00