Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Changing Model
Changing Model [message #206083] Thu, 18 September 2008 18:35 Go to next message
Eclipse UserFriend
Originally posted by: nuclearpsyche.gmail.com

Hello,
I decided to use GMF and EMF for my project. Since I made a lot of
modifications to my code I don't use the code generation features
anymore. I pretty much just generated the code once and have been
modifying it directly.
Now I need to change the model and I was wondering if I'm going to have
to use the "generate code" feature or if I can make the change manually.
If I do it manually what would be required?
For example if I have an object A that contains an object B but I decide
that now object A should contain a *list* of B objects.
How hard would it be to implement this change?
Any pointers would be greatly appreciated.
Best regards,

t
Re: Changing Model [message #206099 is a reply to message #206083] Thu, 18 September 2008 21:14 Go to previous messageGo to next message
Stephan Arenswald is currently offline Stephan ArenswaldFriend
Messages: 11
Registered: July 2009
Junior Member
Hi Tamer,

take a look at the Eclipse documentation under

http://help.eclipse.org/ganymede/index.jsp

There, follow the path EMF Developer Guide --> Programmer's Guides -->
EMF Framework Programmer's Guide

This article, especially the section "Customizing the generated
implementation classes", might help (see the @genereated tag).

Hope this helps.

Regards


Tamer wrote:
> Hello,
> I decided to use GMF and EMF for my project. Since I made a lot of
> modifications to my code I don't use the code generation features
> anymore. I pretty much just generated the code once and have been
> modifying it directly.
> Now I need to change the model and I was wondering if I'm going to have
> to use the "generate code" feature or if I can make the change manually.
> If I do it manually what would be required?
> For example if I have an object A that contains an object B but I decide
> that now object A should contain a *list* of B objects.
> How hard would it be to implement this change?
> Any pointers would be greatly appreciated.
> Best regards,
>
> t
Re: Changing Model [message #206659 is a reply to message #206083] Tue, 23 September 2008 23:03 Go to previous message
Eclipse UserFriend
Originally posted by: Sam.sam.org

true, thats a problem.

try to centralize your code in custom packages
you can reference custom classes in *.gmfmap
make use of @generated NOT to prevent overwriting

make a backup, since the reconciling and rebuilding might nevertheless
overwrite your custom code

"Tamer" <nuclearpsyche@gmail.com> schrieb im Newsbeitrag
news:gau717$ug$1@build.eclipse.org...
> Hello,
> I decided to use GMF and EMF for my project. Since I made a lot of
> modifications to my code I don't use the code generation features anymore.
> I pretty much just generated the code once and have been modifying it
> directly.
> Now I need to change the model and I was wondering if I'm going to have to
> use the "generate code" feature or if I can make the change manually.
> If I do it manually what would be required?
> For example if I have an object A that contains an object B but I decide
> that now object A should contain a *list* of B objects.
> How hard would it be to implement this change?
> Any pointers would be greatly appreciated.
> Best regards,
>
> t
Previous Topic:Changing Filename-Labels in Project Explorer
Next Topic:setConnectionAnchor when collapsing container
Goto Forum:
  


Current Time: Wed Mar 03 08:04:42 GMT 2021

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

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

Back to the top