Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.

1 /*******************************************************************************2 * Copyright (c) 2000, 2005 IBM Corporation and others.3 * All rights reserved. This program and the accompanying materials4 * are made available under the terms of the Eclipse Public License v1.05 * which accompanies this distribution, and is available at6 * http://www.eclipse.org/legal/epl-v10.html7 *8 * Contributors:9 * IBM Corporation - initial API and implementation10 *******************************************************************************/11 package org.eclipse.ui;12 13 14 /**15 * Interface for asking an object to store its state in a memento.16 * <p>17 * This interface is typically included in interfaces where 18 * persistance is required.19 * </p><p>20 * When the workbench is shutdown objects which implement this interface 21 * will be persisted. At this time the <code>getFactoryId</code> method 22 * is invoked to discover the id of the element factory that will be used 23 * to re-create the object from a memento. Then the <code>saveState</code> 24 * method is invoked to store the element data into a newly created memento. 25 * The resulting mementos are collected up and written out to a single file.26 * </p>27 * <p>28 * During workbench startup these mementos are read from the file. The29 * factory Id for each is retrieved and mapped to an <code>IElementFactory</code> 30 * which has been registered in the element factory extension point. If a 31 * factory exists for the Id it will be engaged to re-create the original 32 * object.33 * </p>34 *35 * @see org.eclipse.core.runtime.IAdaptable36 * @see org.eclipse.ui.IMemento37 * @see org.eclipse.ui.IElementFactory38 */39 publicinterface IPersistableElement extendsIPersistable {40 /**41 * Returns the id of the element factory which should be used to re-create this42 * object.43 * <p>44 * Factory ids are declared in extensions to the standard extension point45 * <code>"org.eclipse.ui.elementFactories"</code>.46 * </p>47 * 48 * @return the element factory id49 * @see IElementFactory50 */51 publicString getFactoryId();52 }53