Overview

 
Package  Use  Tree  Deprecated  Index  Help 
Eclipse Platform
Release 3.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 

org.eclipse.ui
Interface IPersistableElement

All Known Subinterfaces:
IWorkingSet

All Known Implementing Classes:
FileEditorInput


public interface IPersistableElement

Interface for asking an object to store its state in a memento.

This interface is typically included in interfaces where persistance is required.

When the workbench is shutdown objects which implement this interface will be persisted. At this time the getFactoryId method is invoked to discover the id of the element factory that will be used to re-create the object from a memento. Then the saveState method is invoked to store the element data into a newly created memento. The resulting mementos are collected up and written out to a single file.

During workbench startup these mementos are read from the file. The factory Id for each is retrieved and mapped to an IElementFactory which has been registered in the element factory extension point. If a factory exists for the Id it will be engaged to re-create the original object.

See Also:
IAdaptable, IMemento, IElementFactory


Method Summary
 String getFactoryId()
          Returns the id of the element factory which should be used to re-create this object.
 void saveState(IMemento memento)
          Saves the state of the object in the given memento.
 

Method Detail

 

 

getFactoryId

public String getFactoryId()

Returns the id of the element factory which should be used to re-create this object.

Factory ids are declared in extensions to the standard extension point "org.eclipse.ui.elementFactories".

Returns:
the element factory id
See Also:
IElementFactory


 

 

saveState

public void saveState(IMemento memento)

Saves the state of the object in the given memento.

Parameters:
memento - the storage area for object's state


 

Overview

 
Package  Use  Tree  Deprecated  Index  Help 
Eclipse Platform
Release 3.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.