|binding a diagram file to an external data file [message #372561]
||Wed, 29 July 2009 09:49
Originally posted by: dganrc77.gmail.com|
I am developing a diagram editor using GMF.
The aim is to provide a graphical user interface to edit an xml-based file
(let's call it data-file), that normally is edited by a form-based editor.
What I need, so, is to bind the diagram file to the external oiginal file
in a way that each modification of the diagram is reproduced in the
original file and synchronized when necessary.
I listed some basic scenarios for that:
* When create a new diagram
** Select/create a new data-file from the given project
** Bind the newly created diagram to that data-file (the diagram file must
know which is the related external model)
** Every time the user saves the diagram, save the modification to the
* Open a diagram
** (Re)-build diagram from the data-file before opening it
One problem is that I cannot use directly that model as starting model for
the diagram. I must create a new one and then face the synchronization
So the question is:
- where and how I can interact with the events that holds the
modifications of the diagram?
- where and how I can retrieve the diagram data as model object to provide
conversion to the external model?
- where and how I can craete a diagram file starting form a model I create
externally from the diagram plugin?
Can anyone point me to some resource or has anyone already faced a similar
(Apologies for the too general scenario, but I am starting now the work
and I need to collect any suggestion from more experienced people then me
before doing weird things...)
Powered by FUDForum
. Page generated in 0.02023 seconds