Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Maintaining Compatibility Between New and Old Ecore Models
Maintaining Compatibility Between New and Old Ecore Models [message #167526] Wed, 09 January 2008 23:24 Go to next message
Eclipse UserFriend
Originally posted by: jdente.21technologies.com

Hi,

I have a GMF project that has been used for a while now to build some rather
large diagrams. Recently, in order to accomodate an improvement, I added a
new class to my ecore model. I wrote some extra code to handle old diagrams
so that if a diagram does not contain the newly added class, rather than
throwing a null pointer, I create the new class. Unfortunately this is not
the only problem. When the new class was created, the VISUAL_IDs changed
for several elements from my old diagrams. In order to make the new version
of my GMF project compatible with old diagrams, I had to manually revert all
the VISUAL_IDs back to their original values and then make my new class have
a different VISUAL_ID that I assigned. While this solution works, it is not
very practical. This means that anytime we need to tweak our ecore model, I
will have to manually fix all of the IDs in the generated code in order to
maintain reverse-compatibility.

Is there any way to control the VISUAL_IDs and TYPE_IDs assigned? Is there a
better way to maintain compatibility between different versions of ecore
models?

Thanks,
Joe
Re: Maintaining Compatibility Between New and Old Ecore Models [message #167571 is a reply to message #167526] Thu, 10 January 2008 16:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jdente.21technologies.com

I found the VISUAL_IDs buried in my gmfgen file. I'm guessing that manually
setting the VISUAL_IDs in my gmfgen so that they are compatible with my
earlier diagrams and then generating the code is the easiest method for
maintaining reverse compatibility.

If anyone has a better method or other suggestions on maintaining backwards
compatible diagrams, please let me know.

Thanks,
Joe

"Joe Dente" <jdente@21technologies.com> wrote in message
news:fm3l4d$dj$1@build.eclipse.org...
> Hi,
>
> I have a GMF project that has been used for a while now to build some
> rather large diagrams. Recently, in order to accomodate an improvement, I
> added a new class to my ecore model. I wrote some extra code to handle
> old diagrams so that if a diagram does not contain the newly added class,
> rather than throwing a null pointer, I create the new class.
> Unfortunately this is not the only problem. When the new class was
> created, the VISUAL_IDs changed for several elements from my old diagrams.
> In order to make the new version of my GMF project compatible with old
> diagrams, I had to manually revert all the VISUAL_IDs back to their
> original values and then make my new class have a different VISUAL_ID that
> I assigned. While this solution works, it is not very practical. This
> means that anytime we need to tweak our ecore model, I will have to
> manually fix all of the IDs in the generated code in order to maintain
> reverse-compatibility.
>
> Is there any way to control the VISUAL_IDs and TYPE_IDs assigned? Is there
> a better way to maintain compatibility between different versions of ecore
> models?
>
> Thanks,
> Joe
>
Re: Maintaining Compatibility Between New and Old Ecore Models [message #167671 is a reply to message #167571] Thu, 10 January 2008 17:08 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Joe,

Try org.eclipse.gmf.bridge.trace plugin.

-----------------
Alex Shatalin
Previous Topic:Model Explorer (navigator) in GMF
Next Topic:copy and paste w/o requiring canvas focus
Goto Forum:
  


Current Time: Fri Apr 26 04:32:10 GMT 2024

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

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

Back to the top