EMF Eclipse Forms Editor

(the libary example originally posted on EMF Corner is below)

11/04/2005

Patch 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.


11/03/2004

Updated Generic EMF Eclipse Forms Editor fails more gracefully when encountering null and complex field value exceptions .

10/25/2004

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.

    1. Download the Generic Forms Editor source plugin zip file, unpack it, and import or copy the project into your Eclipse workspace.

    2. Edit the newly installed gfe.gfEditor plugin.xml file and add the model specific file extension used by your EMF model to the comma separated list of file extensions to be handled by the gfEditor in the 'Extensions' page of the PDE plugin.xml editor and rebuild the project.

    3. The Generic Form Editor should now appear in the context menu for your EMF model files when you run your runtime-workbench with the gfe plugin and your EMF model plugins enabled, and you right click on an EMF model file having a file extension that you added to the gfEditor file extension list.

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.

 


10/25/2004
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.

There are four plugins in the package:
library
library.app
library.edit
library.editor
 

Three are from the EMF example and the fourth is our RCP application plugin.

The base library and library.edit plugins have only been changed slightly: ( Book and Writer constructors were made public )

The library.editor plugin is where you will find most of the changes along with the actual Master/Details page(s) that use the Eclipse Forms API.

The software is provided under the terms of the Eclipse CPL/EPL license(s).

Steve Blass
swblass@conceptualprocessengineering.com



Resources:

Eclipse
EMF
RCP
Eclipse Forms