Package org.eclipse.ui
Interface IEditorReference
- All Superinterfaces:
IWorkbenchPartReference
- All Known Implementing Classes:
EditorReference
Implements a reference to an editor. The IEditorPart will not be instantiated
until the editor becomes visible or the API
getEditor(boolean)
is
called with true.
This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be implemented by clients.
-
Method Summary
Modifier and TypeMethodDescriptiongetEditor
(boolean restore) Returns the editor referenced by this object.Returns the editor input for the editor referenced by this object.Returns the factory id of the factory used to restore this editor.getName()
Returns the editor input's name.boolean
isPinned()
Methods inherited from interface org.eclipse.ui.IWorkbenchPartReference
addPartPropertyListener, addPropertyListener, getContentDescription, getId, getPage, getPart, getPartName, getPartProperty, getTitle, getTitleImage, getTitleToolTip, isDirty, removePartPropertyListener, removePropertyListener
-
Method Details
-
getFactoryId
String getFactoryId()Returns the factory id of the factory used to restore this editor. Returns null if the editor is not persistable.- Returns:
- the factory ID
-
getName
String getName()Returns the editor input's name. May return null if the name is not available or if the editor failed to be restored.- Returns:
- the name
-
getEditor
Returns the editor referenced by this object. Returnsnull
if the editor was not instantiated or it failed to be restored. Tries to restore the editor ifrestore
is true.- Parameters:
restore
- true to try to restore, false otherwise.- Returns:
- the
IEditorPart
-
isPinned
boolean isPinned()- Returns:
- true if the editor is pinned, otherwise returns false.
-
getEditorInput
Returns the editor input for the editor referenced by this object.Unlike most of the other methods on this type, this method can trigger plug-in activation.
- Returns:
- the editor input for the editor referenced by this object
- Throws:
PartInitException
- if there was an error restoring the editor input- Since:
- 3.1
-