Overview | Package | Class | 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 IElementFactory

All Known Implementing Classes:
  FileEditorInputFactory

public interface IElementFactory

A factory for re-creating objects from a previously saved memento.

Clients should implement this interface and include the name of their class in an extension to the platform extension point named `"org.eclipse.ui.elementFactories"`. For example, the plug-in's XML markup might contain:

     <extension point="org.eclipse.ui.elementFactories">
        <factory id="com.example.myplugin.MyFactory" class="com.example.myplugin.MyFactory" />
     </extension>

See Also:
  `IPersistableElement`, `IMemento`, `IWorkbench.getElementFactory(java.lang.String)`

Method Summary
`IAdaptable` | `createElement(IMemento memento)` Re-creates and returns an object from the state captured within the given memento.

Method Detail

### createElement

    public IAdaptable createElement(IMemento memento)

  Re-creates and returns an object from the state captured within the given memento.

  Under normal circumstances, the resulting object can be expected to be persistable; that is,

       result.getAdapter(org.eclipse.ui.IPersistableElement.class)

  should not return `null`.

  Parameters:
    `memento` - a memento containing the state for the object
  Returns:
    an object, or `null` if the element could not be created

Overview | Package | Class | 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.