Editors

We have seen how plug-ins can contribute an editor to the workbench, but we haven't yet looked at the implementation of an editor.

There is no "typical" implementation pattern for an editor, because editors usually provide application-specific semantics.  A tool that edits and manages a particular resource type will provide customized behavior for manipulating the data represented by the resource.

Editors can come in all shapes and sizes.  If a plug-in's editor is text-based, then the editor can either use the existing default text editor, or create a customized text editor by using the facilities provided in JFace.  The latter approach is used by the Java development tooling (JDT) editors.  

If a plug-in's editor is not text based, then a custom editor must be implemented by the plug-in. There are several approaches for building custom editors, all of which depend on the look and behavior of the editor.

Once the implementation model for the editor has been determined, programming the editor behavior is much like programming a stand-alone JFace or SWT application.

Copyright IBM Corp. and others 2000,2002.