11/04/2005Patch for EMF to add form page to the editor generator posted to Eclipse bugzilla. This patch for the EMF editor generator advances the generic form editor ball by building a better master details form right into the editor generator in EMF. To get the property view into the form page required copying from the standard PropertySheetViewer but on the bright side this thing is ripe for customization beyond the standard property view.
Updated Generic EMF Eclipse Forms Editor fails more gracefully when encountering null and complex field value exceptions .
The Generic EMF Eclipse Forms Editor is a plugin providing an Eclipse Forms Master/Details editor for arbitrary EMF models.
This plugin is provided under the Eclipse Public License.
What you get is a multi-page form editor containing an Eclipse Master/Details FormPage showing your model tree on the left and a details editing section on the right. So far, we have attribute editing capability for Strings and Integers and some list entries. Edit-control creation and update implementation for more complex types remains an exercise. Where we can't provide edit controls we display name and reference labels. The outline and properties views work as they should so you can still edit complex model elements out of the box. Handlers for additional types may be added by editing the detailsPageSwitch() or createSection() and updateSection() methods in the ObjectDetailsPage.java file.
See the included SamplePage.java and the SamplePage comments in gfe.gfEditor.addPages() for more on using custom deluxe external hand crafted details pages with this editor.
The EMF Eclipse Forms Editor library example below shows how to add Eclipse Forms to an EMF editor by carving up a set of generated EMF files and hooking some new forms files into the mix. The included RCP w/ IDE implementation is also good for additional style points deductions. The generic forms editor described above is a cleaner implementation. The remaining advantages of the library example are that it is self contained and it demonstrates a concrete ObjectDetailsPage implementation based on the model classes rather then the abstract reflective approach taken in the generic forms editor above.
EMF Ecliipse Forms Editor library example
You can download the library forms editor example plugins zip file by clicking the link above. The plugins extend the EMF library example in an RCP application that uses the Eclipse Forms API to provide a Master/Details interface for editing the library model. The plugins were built with Eclipse 3.0 and EMF 2.0. The included RCP application uses the standard Eclipse Resource Perspective and Navigator view. The included EMF library model forms editor can be used with or without the included RCP application.