Michael Wenz Messages: 1267 Registered: July 2009 Location: Walldorf, Germany
Senior Member
Anatoliy,
you will need some hook point where you can trigger the loading, e.g. an
action in the project explorer or the toolbar. There you would:
1) Load your prepared file as an EMF resource into an EMF ResourceSet
2) Create a diagram in a second resource in the same EMF ResourceSet
3) Navigate through the prepared file (using EMF means) and extracting the
EObjects you want to add to the diagram
4) Call an add feature for each of those objects that add the graphical
representation
In order to save that again, you just need to ensure that when you create
new people EObject you store them in the file resource the other people are
stored as well. The diagram editor will care about persisting the diagram
and all other loaded resources automatically.