Skip to main content



      Home
Home » Modeling » EMF » EMF's Jet templates costumization(ClassCast Exception when I add new templates to common ones)
EMF's Jet templates costumization [message #1060683] Mon, 27 May 2013 14:36 Go to next message
Eclipse UserFriend
Hi all,
I'm trying to costumize the EMF API generation of model code by adding a new file.
I created a new project where I copied the templates from *.codegen.ecore preserving the folder's hierarchy, then I changed the templates directory in the genmodel options to the one I just copied. In order to make sure that the generation process uses these templates I added some java comments to the templates. This worked just fine.

When adding a new jet template to the template's folder, and running the generation, a java class for this template is not generated in the JETemitter project.

How can I solve this problem

Thank you in advance
Re: EMF's Jet templates costumization [message #1060761 is a reply to message #1060683] Tue, 28 May 2013 07:44 Go to previous messageGo to next message
Eclipse UserFriend
Amine,

You have to use generator adapters for that. Try installing the
Generator Adapter Example into your workspace for an example.

On 27/05/2013 8:36 PM, Amine BEN wrote:
> Hi all,
> I'm trying to costumize the EMF API generation of model code by adding
> a new file.
> I created a new project where I copied the templates from
> *.codegen.ecore preserving the folder's hierarchy, then I changed the
> templates directory in the genmodel options to the one I just copied.
> In order to make sure that the generation process uses these templates
> I added some java comments to the templates. This worked just fine.
>
> When adding a new jet template to the template's folder, and running
> the generation, a java class for this template is not generated in the
> JETemitter project.
>
> How can I solve this problem
> Thank you in advance
Re: EMF's Jet templates costumization [message #1062056 is a reply to message #1060761] Wed, 05 June 2013 11:13 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ed,
First thanks for your response.
I tried the validator example coming with EMF, to do so, I followed the steps to use dynamic templates.
When I run the generation using this pluging a package with the name XXX.validator is not generated.
I note that every time I run the generation i delete the .Jetemitter project and refresh the workspace.
trying this example isn't it straight forward ?
I'm a bit lost here, I appreciate your help.
Cheers
Amine

[Updated on: Wed, 05 June 2013 11:16] by Moderator

Re: EMF's Jet templates costumization [message #1062061 is a reply to message #1062056] Wed, 05 June 2013 11:26 Go to previous message
Eclipse UserFriend
Amine,

Did you launch a runtime workspace in which that extension is installed
and then generated a model there? It doesn't work to put the example in
the workspace and they try to use it in that same workspace; the
extension must be deployed in a running IDE...

On 05/06/2013 5:13 PM, Amine BEN wrote:
> Hi Ed,
> First thanks for your response.
> I tried the validator example coming with EMF, to do so, I followed
> the steps to use dynamic templates.
> When I run the generation using this pluging a package with the name
> XXX.validator is not generated.
> I note that every time I run the generation i delete the .Jetemitter
> project and refresh the workspace.
> Cheers Amine
Previous Topic:[CDO] CDOViewInvalidationEvent: can I know which CDOSession provoked it?
Next Topic:Reuse of models in a hierarchical way
Goto Forum:
  


Current Time: Fri Jul 18 07:09:17 EDT 2025

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

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

Back to the top