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.

有帮助吗?

解决方案

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.

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top