Is it possible to generate XML file from Shape example in GEF,Same as its getting generated in GMF? Like in GMF if we select GMF Design page and open it with XML file,it provides all external information about model figures,same like i want to generate with GEF.
Is it possible to generate XML file in gef
472 views Asked by Eshika At
2
There are 2 answers
0
On
There is really no connections between the GEF and the way of persistance of it's domain model.
Here is two possible solutions: 1. If you domain model are plain java objects (POJOs) try using JAXB, and annotate them with JAXB annotations.Then use JAXB to persist them. 2. Switch to using EMF (which will provide you XML serrialization out of the box) and probably to GMF.
For just Shapes Example - there is a EMF - driven Shapes Example which will serrialize model to XMI, but that can be easily changed to XML.
In GMF you get automatic XML serialization since GMF is build on top EMF and GMF, using EMF as the model and GEF as the MVC framework. Editors that use GEF only must take care of serialization however they like.