Interface IEditorPart
- All Superinterfaces:
- IAdaptable,- ISaveablePart,- IWorkbenchPart
- All Known Subinterfaces:
- IFormPage,- IInPlaceEditor,- IReusableEditor,- ITextEditor
- All Known Implementing Classes:
- AbstractDecoratedTextEditor,- AbstractMultiEditor,- AbstractTextEditor,- CommonSourceNotFoundEditor,- CompareEditor,- EditorPart,- ErrorEditorPart,- FormEditor,- FormPage,- MultiEditor,- MultiPageEditorPart,- SharedHeaderFormEditor,- StatusTextEditor,- TextEditor
IEditorInput. Modifications made in an editor part follow an
 open-save-close lifecycle model (in contrast to a view part, where
 modifications are saved to the workbench immediately).
 An editor is document or input-centric. Each editor has an input, and only one editor can exist for each editor input within a page. This policy has been designed to simplify part management.
An editor should be used in place of a view whenever more than one instance of a document type can exist.
 This interface may be implemented directly. For convenience, a base
 implementation is defined in EditorPart.
 
An editor part is added to the workbench in two stages:
- An editor extension is contributed to the workbench registry. This extension defines the extension id, extension class, and the file extensions which are supported by the editor.
- An editor part based upon the extension is created and added to the workbench when the user opens a file with one of the supported file extensions (or some other suitable form of editor input).
 All editor parts implement the IAdaptable interface; extensions
 are managed by the platform's adapter manager.
 
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intThe property id forisDirty.static final intThe property id forgetEditorInput.Fields inherited from interface org.eclipse.ui.IWorkbenchPartPROP_TITLE
- 
Method SummaryModifier and TypeMethodDescriptionReturns the input for this editor.Returns the site for this editor.voidinit(IEditorSite site, IEditorInput input) Initializes this editor with the given editor site and input.Methods inherited from interface org.eclipse.core.runtime.IAdaptablegetAdapterMethods inherited from interface org.eclipse.ui.ISaveablePartdoSave, doSaveAs, isDirty, isSaveAsAllowed, isSaveOnCloseNeededMethods inherited from interface org.eclipse.ui.IWorkbenchPartaddPropertyListener, createPartControl, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setFocus
- 
Field Details- 
PROP_DIRTYstatic final int PROP_DIRTYThe property id forisDirty.- See Also:
 
- 
PROP_INPUTstatic final int PROP_INPUTThe property id forgetEditorInput.- See Also:
 
 
- 
- 
Method Details- 
getEditorInputIEditorInput getEditorInput()Returns the input for this editor. If this value changes the part must fire a property listener event withPROP_INPUT.- Returns:
- the editor input
 
- 
getEditorSiteIEditorSite getEditorSite()Returns the site for this editor. This method is equivalent to(IEditorSite) getSite().The site can be nullwhile the editor is being initialized. After the initialization is complete, this value must be non-nullfor the remainder of the editor's life cycle.- Returns:
- the editor site; this value may be nullif the editor has not yet been initialized
 
- 
initInitializes this editor with the given editor site and input.This method is automatically called shortly after the part is instantiated. It marks the start of the part's lifecycle. The IWorkbenchPart.disposemethod will be called automically at the end of the lifecycle. Clients must not call this method.Implementors of this method must examine the editor input object type to determine if it is understood. If not, the implementor must throw a PartInitException- Parameters:
- site- the editor site
- input- the editor input
- Throws:
- PartInitException- if this editor was not initialized successfully
 
 
-