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 siteIWorkbenchPart.createPartControl
- to create the editor's controls IWorkbenchPart.setFocus
- to accept focusIEditorPart.isDirty
- to decide whether a significant change has occurredIEditorPart.doSave
- to save contents of editorIEditorPart.doSaveAs
- to save contents of editorIEditorPart.isSaveAsAllowed
- to control Save AsSubclasses may extend or reimplement the following methods as required:
IExecutableExtension.setInitializationData
- extend to provide additional initialization when editor extension is instantiatedIWorkbenchPart.dispose
- extend to provide additional cleanupIAdaptable.getAdapter
- reimplement to make the editor adaptable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|