Abstract base implementation of all workbench editors.
This class should be subclassed by clients wishing to define new editors.
The name of the subclass should be given as the "class"
attribute in a editor extension contributed to the workbench's
view extension point (named "org.eclipse.ui.editors" ).
For example, the plug-in's XML markup might contain:
<extension point="org.eclipse.ui.editors">
<editor id="com.example.myplugin.ed"
name="My Editor"
icon="./images/cedit.gif"
extensions="foo"
class="com.example.myplugin.MyFooEditor"
contributorClass="com.example.myplugin.MyFooEditorContributor"
/>
</extension>
where com.example.myplugin.MyEditor is the name of the
EditorPart subclass.
Subclasses must implement the following methods:
IEditorPart.init - to initialize editor when assigned its site
IWorkbenchPart.createPartControl - to create the editor's controls
IWorkbenchPart.setFocus - to accept focus
IEditorPart.isDirty - to decide whether a significant change has
occurred
IEditorPart.doSave - to save contents of editor
IEditorPart.doSaveAs - to save contents of editor
IEditorPart.isSaveAsAllowed - to control Save As
Subclasses may extend or reimplement the following methods as required:
IExecutableExtension.setInitializationData - extend to provide additional
initialization when editor extension is instantiated
IWorkbenchPart.dispose - extend to provide additional cleanup
IAdaptable.getAdapter - reimplement to make the editor
adaptable
|