Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF gmfgen
GMF gmfgen [message #169582] Wed, 23 January 2008 21:25 Go to next message
Gary Leask is currently offline Gary LeaskFriend
Messages: 28
Registered: July 2009
Junior Member
I upgraded to the latest versions of EMF and GMF.

I have Feature Seq Initializer code in the gmfmap file to initialize
Feature Values.

I'm creating Java metods to set values. In the previous version this
worked correctly.

Now however the generated code generates the method 3 or 4 times in the
Class
providers.ElementInitializers.java

Is there a setting or attribute that i need to set inthe nwer versions.

Thanks Gary.
Re: GMF gmfgen [message #169635 is a reply to message #169582] Thu, 24 January 2008 10:10 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Gary,

I have several java initializers in a diagram I'm working with and it looks
like current version of generator works properly in this situation.. I suggest
you to delete this class completely and try to regenerate it - this could
be a problem of code merging functionality incorrectly merging newly generated
class content with the old one. In this case you have to manually copy correct
initializers body into the newly generated code..

-----------------
Alex Shatalin
Re: GMF gmfgen [message #169733 is a reply to message #169635] Thu, 24 January 2008 16:10 Go to previous messageGo to next message
Gary Leask is currently offline Gary LeaskFriend
Messages: 28
Registered: July 2009
Junior Member
I have tried this and the newly generated code still generates 3 or 4
methods for each initializer. Do you wnat to see any examples of what we
are doing or experiencing.

Gary
Re: GMF gmfgen [message #169757 is a reply to message #169635] Thu, 24 January 2008 16:42 Go to previous messageGo to next message
Gary Leask is currently offline Gary LeaskFriend
Messages: 28
Registered: July 2009
Junior Member
Alex after some investigation. It looks like the process generates a
duplicate methods for every level that we nest a Feature Seq Initializer.

For example:

At the top level node we have an Feature Seq Initializer and a Feature
Value Spec for the id. This generates one getId() method.

We then Initialize a child element with a Feature Seq Initializer, and
create a getName() method using Feature Value Spec. This generates 2
getName() methods.

We then initialize a third level using Feature Seq Initializer for a
CollectType and Initalize a maxNumber with Featue Value Spec
getMaxNumber() and it generate 3 getMaxNumber() methods.

In the Eclipse 3.3.0 version
EMF 2.3.0
GMF SDK 2.0.0
This worked fine


However in
In the Eclipse 3.3.1.1 version
EMF 2.3.1
GMF SDK 2.0.1

In the Eclipse 3.4.0 version
EMF 2.4.0
GMF SDK 2.0.1

I am seeing the duplicate methods being generated

Gary
Re: GMF gmfgen [message #169797 is a reply to message #169757] Fri, 25 January 2008 08:44 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Gary,

Can you please file a bug for it with the stripped down example of the model
leading us to these compilation errors?

-----------------
Alex Shatalin
Re: GMF gmfgen [message #170557 is a reply to message #169797] Tue, 29 January 2008 17:03 Go to previous message
Gary Leask is currently offline Gary LeaskFriend
Messages: 28
Registered: July 2009
Junior Member
Alex

I submitted Bug Number 216935 with an example Application
Previous Topic:create containment association at a superclass level
Next Topic:getElementToEdit() never called
Goto Forum:
  


Current Time: Thu Nov 07 05:52:34 GMT 2024

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

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

Back to the top