Best-Practice: Developing a Model-Based Editor - Intro
March 2nd, 2006
Developing a Model-Based Editor - TOC
A very important element of the Eclipse-Framework are editors. Editors are among views the fundamental element for user-interaction.
Eclipse provides a wonderful framework for creating editors with a reserved area (the “editor area”), where you don’t have to care for common behaviour. Just implement the contribution of the input and provide an implementation for saving the edited input.
What’s the goal of this article?
In the most articles and books is described how to implement an editor for editing a file with a special extension that exists physically in the workspace. But what if you want to use all the functionality the editor comes with, without writing or reading any files, but just pure Java-objects? I want to show you a way how to use in a very easy and clear way how to use simple EditorParts and MultiPageEditorParts with Forms. In addition I want to provide a strategy for managing your editors. At the end will be a eclipse-product, that has a simple view-part with a list (known from the Image-Contribution Product) . If you double-click on a list the object-specified editor will be opened and display the properties of the object, without all the workspace, file and project handling.
Requirements
- Every Object can be handled with an editor
- The Icon will be contributed by the ImageContributor
- The framework knows the objects that were already “opened” by an editor.
- A very easy way to provide new editors for new Java-Objects
- Saving with the given “Dirty-Flag”
Screenshot of the Application

Screenshot of the ready-to-use application
Let’s roll!!!
Download the required plugins as Eclipse-Projects (Source included)
Download the Editors-Best-Practice as RCP (Source included)
Entry Filed under: Editors

6 Comments Add your own
1. My Eclipse Diary » &hellip | March 3rd, 2006 at 12:11 am
[…] Intro […]
2. My Eclipse Diary » &hellip | March 3rd, 2006 at 12:12 am
[…] Intro […]
3. rich client 2.0 » B&hellip | July 4th, 2006 at 9:30 am
[…] Intro […]
4. rich client 2.0 » B&hellip | July 4th, 2006 at 9:35 am
[…] Intro […]
5. rich client 2.0 » B&hellip | July 4th, 2006 at 9:54 am
[…] Intro […]
6. rich client 2.0 » B&hellip | July 4th, 2006 at 9:55 am
[…] Intro […]
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed