KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > navigator > IMementoAware


1 /*******************************************************************************
2  * Copyright (c) 2003, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.navigator;
12
13 import org.eclipse.ui.IMemento;
14
15 /**
16  * Clients may use mementos to persist interesting state between sessions.
17  * Clients should ensure that the memento keys are unique; generally by using
18  * the id of the content extension as a prefix.
19  *
20  * <p>
21  * Clients may implement this interface.
22  * </p>
23  *
24  * @since 3.2
25  *
26  */

27 public interface IMementoAware {
28
29     /**
30      * <p>
31      * Restore the previous state of any actions using the flags in aMemento.
32      * This method allows the state of any actions that persist from session to
33      * session to be restored.
34      * </p>
35      *
36      * @param aMemento
37      * A memento that was given to the view part to restore its
38      * state.
39      */

40     public void restoreState(IMemento aMemento);
41
42     /**
43      * <p>
44      * Save flags in aMemento to remember the state of any actions that persist
45      * from session to session.
46      * </p>
47      * <p>
48      * Extensions should qualify any keys stored in the memento with their
49      * plugin id
50      * </p>
51      *
52      * @param aMemento
53      * A memento that was given to the view part to save its state.
54      */

55     public void saveState(IMemento aMemento);
56
57 }
58
Popular Tags