Package org.eclipse.ui.part
Class FileEditorInputFactory
java.lang.Object
org.eclipse.ui.part.FileEditorInputFactory
- All Implemented Interfaces:
IElementFactory
Factory for saving and restoring a
FileEditorInput
.
The stored representation of a FileEditorInput
remembers
the full path of the file (that is, IFile.getFullPath
).
The workbench will automatically create instances of this class as required. It is not intended to be instantiated or subclassed by the client.
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateElement
(IMemento memento) Re-creates and returns an object from the state captured within the given memento.static String
Returns the element factory id for this class.static void
saveState
(IMemento memento, FileEditorInput input) Saves the state of the given file editor input into the given memento.
-
Constructor Details
-
FileEditorInputFactory
public FileEditorInputFactory()Creates a new factory.
-
-
Method Details
-
createElement
Description copied from interface:IElementFactory
Re-creates and returns an object from the state captured within the given memento.If the result is not null, it should be persistable; that is,
result.getAdapter(org.eclipse.ui.IPersistableElement.class)
should not return
null
.- Specified by:
createElement
in interfaceIElementFactory
- Parameters:
memento
- a memento containing the state for the object- Returns:
- an object, or
null
if the element could not be created
-
getFactoryId
Returns the element factory id for this class.- Returns:
- the element factory id
-
saveState
Saves the state of the given file editor input into the given memento.- Parameters:
memento
- the storage area for element stateinput
- the file editor input
-