Package org.eclipse.ui
Interface IPersistableEditor
-
- All Superinterfaces:
IPersistable
- All Known Implementing Classes:
AbstractDecoratedTextEditor,AbstractTextEditor,StatusTextEditor,TextEditor
public interface IPersistableEditor extends IPersistable
An editor can implement this interface and participate in the workbench session save/restore cycle usingIMemento, similar to howIViewPartcurrently works.Refer to IWorkbenchPart for the part lifecycle.
If a memento is available, restoreState(*) will be inserted into the editor startup.
editor.init(site, input)editor.restoreState(memento)editor.createPartControl(parent)- ...
On workbench shutdown, the editor state will be persisted when the editor references are saved.
- Since:
- 3.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidrestoreState(IMemento memento)Called with a memento for this editor.-
Methods inherited from interface org.eclipse.ui.IPersistable
saveState
-
-
-
-
Method Detail
-
restoreState
void restoreState(IMemento memento)
Called with a memento for this editor. The editor can parse the data or save the memento. This method may not be called.- Parameters:
memento- the saved state for this editor. May benull.
-
-