Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » EMF Codegen with OCL - Problems with build M7 and newer
EMF Codegen with OCL - Problems with build M7 and newer [message #58845] Fri, 20 June 2008 09:28 Go to next message
Marc Moser is currently offline Marc MoserFriend
Messages: 66
Registered: July 2009
Member
Hi all,

We are using the approach described in


http://www.eclipse.org/articles/article.php?file=Article-EMF -Codegen-with-OCL/index.html

in our development. We update our development environment regularly
and the approach outlined above worked fine with all builds including
M6. Starting from M7 however, generation of the model code started to
fail. We are now working with RC4 and we still experience the same
problems, while generation still works fine with the M6 build.

The problem is that the compiled/generated Class.java file contains
errors indicating that the variable "genFeature" is declared more than
once.

Does anyone have some hints? I re-built the environments more than
once, deleted .JetEmmiter stuff from file system, ....

Thaks for your help.

Best,
Marc
Re: EMF Codegen with OCL - Problems with build M7 and newer [message #58871 is a reply to message #58845] Fri, 20 June 2008 12:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

--=-47ehR+Q7J11JOcSI9AnI
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi, Marc,

The problem likely stems from "drift" in the EMF codegen templates. As
they evolve (and they have changed considerably throughout this
release), you'll need to keep your custom templates in synch, as the
customizations are highly dependent on the internals of the EMF
templates. I know, for example, that the MDT UML2 team has a bugzilla
in every release that they use to track their currency with the EMF
templates.

I'd suggest some comparisons of the EMF templates that you are
overriding with custom templates against the milestone versions that
worked for you, to see what has changed.

Cheers,

Christian


On Fri, 2008-06-20 at 11:28 +0200, Marc Moser wrote:

> Hi all,
>
> We are using the approach described in
>
>
> http://www.eclipse.org/articles/article.php?file=Article-EMF -Codegen-with-OCL/index.html
>
> in our development. We update our development environment regularly
> and the approach outlined above worked fine with all builds including
> M6. Starting from M7 however, generation of the model code started to
> fail. We are now working with RC4 and we still experience the same
> problems, while generation still works fine with the M6 build.
>
> The problem is that the compiled/generated Class.java file contains
> errors indicating that the variable "genFeature" is declared more than
> once.
>
> Does anyone have some hints? I re-built the environments more than
> once, deleted .JetEmmiter stuff from file system, ....
>
> Thaks for your help.
>
> Best,
> Marc

--=-47ehR+Q7J11JOcSI9AnI
Content-Type: text/html; charset=utf-8

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.16.0">
</HEAD>
<BODY>
Hi, Marc,<BR>
<BR>
The problem likely stems from &quot;drift&quot; in the EMF codegen templates.&nbsp; As they evolve (and they have changed considerably throughout this release), you'll need to keep your custom templates in synch, as the customizations are highly dependent on the internals of the EMF templates.&nbsp; I know, for example, that the MDT UML2 team has a bugzilla in every release that they use to track their currency with the EMF templates.<BR>
<BR>
I'd suggest some comparisons of the EMF templates that you are overriding with custom templates against the milestone versions that worked for you, to see what has changed.<BR>
<BR>
Cheers,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Fri, 2008-06-20 at 11:28 +0200, Marc Moser wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Hi all,</FONT>

<FONT COLOR="#000000">We are using the approach described in</FONT>


<FONT COLOR="#000000"><A HREF=" http://www.eclipse.org/articles/article.php?file=Article-EMF -Codegen-with-OCL/index.html"> http://www.eclipse.org/articles/article.php?file=Article-EMF -Codegen-with-OCL/index.html</A></FONT>

<FONT COLOR="#000000">in our development. We update our development environment regularly</FONT>
<FONT COLOR="#000000">and the approach outlined above worked fine with all builds including</FONT>
<FONT COLOR="#000000">M6. Starting from M7 however, generation of the model code started to</FONT>
<FONT COLOR="#000000">fail. We are now working with RC4 and we still experience the same</FONT>
<FONT COLOR="#000000">problems, while generation still works fine with the M6 build.</FONT>

<FONT COLOR="#000000">The problem is that the compiled/generated Class.java file contains</FONT>
<FONT COLOR="#000000">errors indicating that the variable &quot;genFeature&quot; is declared more than</FONT>
<FONT COLOR="#000000">once.</FONT>

<FONT COLOR="#000000">Does anyone have some hints? I re-built the environments more than</FONT>
<FONT COLOR="#000000">once, deleted .JetEmmiter stuff from file system, ....</FONT>

<FONT COLOR="#000000">Thaks for your help.</FONT>

<FONT COLOR="#000000">Best,</FONT>
<FONT COLOR="#000000">Marc</FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-47ehR+Q7J11JOcSI9AnI--
Re: EMF Codegen with OCL - Problems with build M7 and newer [message #58948 is a reply to message #58871] Fri, 20 June 2008 13:56 Go to previous message
Marc Moser is currently offline Marc MoserFriend
Messages: 66
Registered: July 2009
Member
Hi Christian,

Thanks for your advice. You are correct with your assumptions. In
fact, a bugfix in the EMF templates changes the way the insert
template for declared fields
(Class/declaredFieldGenFeature.insert.javajetinc) is called. Prior to
M7, the insert-template was called once, starting with M7, it is
called once per feature.

There is a thread in the EMF newsgroup now, and Ed has to tell which
behavior is now considered correct for the future (I guess the new
one).

Best,
Marc

On Fri, 20 Jun 2008 08:57:50 -0400, "Christian W. Damus"
<cdamus@zeligsoft.com> wrote:

>Hi, Marc,
>
>The problem likely stems from "drift" in the EMF codegen templates. As
>they evolve (and they have changed considerably throughout this
>release), you'll need to keep your custom templates in synch, as the
>customizations are highly dependent on the internals of the EMF
>templates. I know, for example, that the MDT UML2 team has a bugzilla
>in every release that they use to track their currency with the EMF
>templates.
>
>I'd suggest some comparisons of the EMF templates that you are
>overriding with custom templates against the milestone versions that
>worked for you, to see what has changed.
>
>Cheers,
>
>Christian
>
>
>On Fri, 2008-06-20 at 11:28 +0200, Marc Moser wrote:
>
>> Hi all,
>>
>> We are using the approach described in
>>
>>
>> http://www.eclipse.org/articles/article.php?file=Article-EMF -Codegen-with-OCL/index.html
>>
>> in our development. We update our development environment regularly
>> and the approach outlined above worked fine with all builds including
>> M6. Starting from M7 however, generation of the model code started to
>> fail. We are now working with RC4 and we still experience the same
>> problems, while generation still works fine with the M6 build.
>>
>> The problem is that the compiled/generated Class.java file contains
>> errors indicating that the variable "genFeature" is declared more than
>> once.
>>
>> Does anyone have some hints? I re-built the environments more than
>> once, deleted .JetEmmiter stuff from file system, ....
>>
>> Thaks for your help.
>>
>> Best,
>> Marc
Previous Topic:OCL console evaluate on M1
Next Topic:[Announce] MDT OCL 1.2.0 is available
Goto Forum:
  


Current Time: Tue Mar 19 08:43:54 GMT 2024

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

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

Back to the top