| <?xml version='1.0' encoding='UTF-8'?>
|
| <!-- Schema file written by PDE -->
|
| <schema targetNamespace="org.eclipse.ui">
|
| <annotation>
|
| <appInfo>
|
| <meta.schema plugin="org.eclipse.ui" id="elementFactories" name="Element Factories"/>
|
| </appInfo>
|
| <documentation>
|
| This extension point is used to add element factories |
| to the workbench. An element factory is used to |
| recreate <samp>IAdaptable</samp> objects which are |
| persisted during workbench shutdown. |
| <p> |
| As an example, the element factory is used to |
| persist editor input. The input for an |
| editor must implement |
| <samp>org.eclipse.ui.EditorInput</samp>. |
| The life cycle of an <samp>IEditorInput</samp> within |
| an editor has a number of phases. |
| <ol> |
| <li> |
| The initial input for an editor is passed in during |
| editor creation. |
| </li> |
| <li> |
| On shutdown the workbench state is captured. |
| In this process the workbench will create a memento |
| for each open editor and its input. The input is |
| saved as a two part memento containing a factory ID |
| and any primitive data required to recreate the |
| element on startup. For more information see |
| the documentation on |
| <samp>org.eclipse.ui.IPersistableElement</samp>. |
| </li> |
| <li> |
| On startup the workbench state is read and the |
| editors from the previous session are recreated. |
| In this process the workbench will recreate the input |
| element for each open editor. To do this it will |
| map the original factory ID for the input element |
| to a concrete factory class defined in the registry. |
| If a mapping exists, and the factory class is valid, |
| an instance of the factory class is created. Then |
| the workbench asks the factory to recreate the original |
| element from the remaining primitive data within the |
| memento. The resulting <samp>IAdaptable</samp> is cast |
| to an <samp>IEditorInput</samp> and passed to the |
| new editor. |
| </li> |
| </ol>
|
| </documentation>
|
| </annotation>
|
|
|
| <element name="extension">
|
| <complexType>
|
| <sequence>
|
| <element ref="factory" minOccurs="0" maxOccurs="unbounded"/>
|
| </sequence>
|
| <attribute name="point" type="string" use="required">
|
| <annotation>
|
| <documentation>
|
| a fully qualified identifier of the target extension point
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="id" type="string">
|
| <annotation>
|
| <documentation>
|
| an optional identifier of the extension instance
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="name" type="string">
|
| <annotation>
|
| <documentation>
|
| an optional name of the extension instance
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| </complexType>
|
| </element>
|
|
|
| <element name="factory">
|
| <complexType>
|
| <attribute name="id" type="string" use="required">
|
| <annotation>
|
| <documentation>
|
| a unique name that will be used to identify this factory.
|
| </documentation>
|
| </annotation>
|
| </attribute>
|
| <attribute name="class" type="string" use="required">
|
| <annotation>
|
| <documentation>
|
| a fully qualified name of a class that implements |
| <samp>org.eclipse.ui.IElementFactory</samp>
|
| </documentation>
|
| <appInfo>
|
| <meta.attribute kind="java" basedOn="org.eclipse.ui.IElementFactory "/>
|
| </appInfo>
|
| </annotation>
|
| </attribute>
|
| </complexType>
|
| </element>
|
|
|
| <annotation>
|
| <appInfo>
|
| <meta.section type="examples"/>
|
| </appInfo>
|
| <documentation>
|
| The following is an example of an element factory extension: |
| <p> |
| <pre> |
| <extension |
| point = "org.eclipse.ui.elementFactories"> |
| <factory |
| id ="com.xyz.ElementFactory" |
| class="com.xyz.ElementFactory"> |
| </factory> |
| </extension> |
| </pre> |
| </p>
|
| </documentation>
|
| </annotation>
|
|
|
| <annotation>
|
| <appInfo>
|
| <meta.section type="apiInfo"/>
|
| </appInfo>
|
| <documentation>
|
| The value of the <samp>class</samp> attribute must |
| be a fully qualified name of a class that implements |
| <samp>org.eclipse.ui.IElementFactory</samp>. An instance |
| of this class must create an <samp>IAdaptable</samp> |
| object from a workbench memento.
|
| </documentation>
|
| </annotation>
|
|
|
| <annotation>
|
| <appInfo>
|
| <meta.section type="implementation"/>
|
| </appInfo>
|
| <documentation>
|
| The workbench provides an <samp>IResource</samp> factory. |
| Additional factories should be added to recreate other |
| <samp>IAdaptable</samp> types commonly found in other |
| object models, such as the Java Model.
|
| </documentation>
|
| </annotation>
|
|
|
| <annotation>
|
| <appInfo>
|
| <meta.section type="copyright"/>
|
| </appInfo>
|
| <documentation>
|
| Copyright (c) 2002, 2003 IBM Corporation and others.<br> |
| All rights reserved. This program and the accompanying materials are made |
| available under the terms of the Common Public License v1.0 which accompanies |
| this distribution, and is available at |
| <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
|
| </documentation>
|
| </annotation>
|
|
|
| </schema>
|