IEditorInput is a light weight descriptor of editor input,
like a file name but more abstract. It is not a model. It is a description of
the model source for an IEditorPart .
Clients implementing this editor input interface should override
Object.equals(Object) to answer true for two inputs that are
the same. The IWorbenchPage.openEditor APIs are dependent on
this to find an editor with the same input.
Clients should extend this interface to declare new types of editor inputs.
An editor input is passed to an editor via the IEditorPart.init
method. Due to the wide range of valid editor inputs, it is not possible to
define generic methods for getting and setting bytes.
Editor input must implement the IAdaptable interface;
extensions are managed by the platform's adapter manager.
Please note that it is important that the editor input be light weight.
Within the workbench, the navigation history tends to hold on to editor
inputs as a means of reconstructing the editor at a later time. The
navigation history can hold on to quite a few inputs (i.e., the default is
fifty). The actual data model should probably not be held in the input.
See Also: org.eclipse.ui.IEditorPart See Also: org.eclipse.ui.IWorkbenchPage.openEditor(IEditorInputString) See Also: org.eclipse.ui.IWorkbenchPage.openEditor(IEditorInputStringboolean) |