简体   繁体   中英

Eclipse Forms Editor for XML

I'd like to program an editor for domain specific XML files which also has a form part (much like the PDE Manifest Editor or the editors of the ADT). Problem is: I don't really understand the code of these 2 examples.

My current approach is following: Using EMF with an ECore model created from XSD. As Editor a Multipage Editor (one XML editor, one forms part). I don't exactly use databinding between the form and the editor, instead I reload the whole file on page change to the forms page (resp. rebuild the whole file on changing to the editor page).

Currently the XML files are pretty small, so this approach could work, but they can become larger and everytime to reload/rebuild the whole file seems pretty heavy (I'm also planning to use such an editor later for ODX files which can easily become larger than 5MB)

So is there any way to avoid rebuilding/reloading the whole file and just update the changed information in the datamodel?

Also, I'd like to have some kind of content assist (something like lightweight IntelliSense and more important ProblemMarkers) Can this be achieved directly by using EMF or how can this be done?

Despite the fact that there are some really good resources about Eclipse forms and XML binding to Java, I can't find any resources for these handy Multipage editors.

Can you point me towards some directions. Maybe if EMF also isn't the solution, the project is still in the beginning phase, so I can switch to another library. Eg for the upper mentioned ODX files I'm already using XMLBeans(in another, pure data mining/converting context), but I assumed EMF would provide some benefits since it is directly bound to the Eclipse project.

I recommend that you take a look at the Sapphire Project . One of they key usecases it covers is bi-directional editing between a form page and an XML source page. There is support for field validation, content assist, etc.

Sapphire Project's Website

Introduction to Sapphire

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM