Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF disable to open old model versions
EMF disable to open old model versions [message #1140265] Wed, 16 October 2013 08:35 Go to next message
Jaroslav Stružka is currently offline Jaroslav StružkaFriend
Messages: 5
Registered: April 2013
Junior Member
I got model written in emf file, ecore model is generated etc. Run my app create and save a new file. Then I change my model (add, remove, rename class, ... ) in emf and regenerate all. I run the app and i still can open the file created with old version of model. In emf file a changed the namespace uri of the package. Is there any way to validate, check or something how to not open the old file?
Re: EMF disable to open old model versions [message #1140384 is a reply to message #1140265] Wed, 16 October 2013 10:12 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Jaroslav,

Comments below.

On 16/10/2013 10:35 AM, Jaroslav Stružka wrote:
> I got model written in emf file, ecore model is generated etc. Run my
> app create and save a new file. Then I change my model (add, remove,
> rename class, ... ) in emf and regenerate all. I run the app and i
> still can open the file created with old version of model.
But it fails horribly?
> In emf file a changed the namespace uri of the package.
So you changed the nsURI?
> Is there any way to validate, check or something how to not open the
> old file?
I'm not sure what exactly you want to prevent. If you register the
resource factory and editor by file extension, there's no preventing the
editor being opened. If you define support for content types (set a
content type identifier in the GenPackage) then you can have it set up
so it checks the nsURI and considers the content not to be your content
if it doesn't match your namespace.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF disable to open old model versions [message #1140463 is a reply to message #1140384] Wed, 16 October 2013 11:23 Go to previous message
Jaroslav Stružka is currently offline Jaroslav StružkaFriend
Messages: 5
Registered: April 2013
Junior Member
The fail is not so horrible just some NullPointerException Very Happy but i still can init a diagram and change some properties or do some other operations.
Previous Topic:xcore derived list of objects
Next Topic:Generated eBaseStructuralFeatureID issue
Goto Forum:
  


Current Time: Sat Apr 20 05:47:49 GMT 2024

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

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

Back to the top