public interface IEditorPart extends IWorkbenchPart, ISaveablePart
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
An editor part is added to the workbench in two stages:
All editor parts implement the
IAdaptable interface; extensions
are managed by the platform's adapter manager.
|Modifier and Type||Field and Description|
The property id for
The property id for
|Modifier and Type||Method and Description|
Returns the input for this editor.
Returns the site for this editor.
Initializes this editor with the given editor site and input.
addPropertyListener, createPartControl, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setFocus
static final int PROP_DIRTY
static final int PROP_INPUT
The site can be
null while the editor is being initialized.
After the initialization is complete, this value must be non-
for the remainder of the editor's life cycle.
nullif the editor has not yet been initialized
void init(IEditorSite site, IEditorInput input) throws PartInitException
This method is automatically called shortly after the part is instantiated.
It marks the start of the part's lifecycle. The
IWorkbenchPart.dispose method 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
site- the editor site
input- the editor input
PartInitException- if this editor was not initialized successfully
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.