Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » 2 Resources in 1 Domain leads to a Problem during Save/Refresh
2 Resources in 1 Domain leads to a Problem during Save/Refresh [message #667217] Wed, 27 April 2011 13:43 Go to next message
Robert Fritzsche is currently offline Robert Fritzsche
Messages: 2
Registered: April 2011
Junior Member
Hoi,

I have two resources in one TransactionEditingDomain. When I open the resource with the Graphiti editor a customised DiagramEditor generates a new DiagramEditorInput with a additional resource path to a new digram file.

Resources in ResourceSet:
[1] platform:/resource/Test/My.bcm_spn (original model)
[2] platform:/resource/Test/My.bob#/ (diagram)

It must have the ending #/ otherwise it crashes (can anyone tell me why, has to do with loading on demand?). But after setting the input an additional resource will be added:
[3] platform:/resource/Test/My.bob

I think that's leads to my problem.

After drawing something and save (it will be saved in the second resource, it also is written to the first two files), but after switching a tab back and towards the refresh (or something else) destroys the model (maybe loading the 3rd resource). After saving again the destroyed model will be written to the first two resources and destroy the files.

Have anyone a glue what happen here?
Re: 2 Resources in 1 Domain leads to a Problem during Save/Refresh [message #667244 is a reply to message #667217] Wed, 27 April 2011 15:13 Go to previous messageGo to next message
Tim Kaiser is currently offline Tim Kaiser
Messages: 118
Registered: July 2009
Senior Member
Hi,

the second and the third Resource have the same name ?

So its two Resources (files on disk)?

(with appending #/ you refer to the first root element inside the Resource,
which is not a Resource but an EObject)

Best regards, Tim
Re: 2 Resources in 1 Domain leads to a Problem during Save/Refresh [message #667339 is a reply to message #667217] Thu, 28 April 2011 08:43 Go to previous message
Robert Fritzsche is currently offline Robert Fritzsche
Messages: 2
Registered: April 2011
Junior Member
Thanks a lot, that was the problem. I used the "#/" URI for creating the diagram.

Now I create the diagram with the this URI: platform:/resource/Test/My.bob

and the EditorInput get this uri EcoreUtil.getURI(diagram)

Cheers,
Robert
Previous Topic:Notification of reconnection "abort"
Next Topic:Set selection programmatically
Goto Forum:
  


Current Time: Tue Sep 23 22:44:16 GMT 2014

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

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