01: /*******************************************************************************
02: * Copyright (c) 2003, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.navigator;
11:
12: import org.eclipse.ui.IMemento;
13:
14: /**
15: * Clients may use mementos to persist interesting state between sessions.
16: * Clients should ensure that the memento keys are unique; generally by using
17: * the id of the content extension as a prefix.
18: *
19: * <p>
20: * Clients may implement this interface.
21: * </p>
22: *
23: * @since 3.2
24: *
25: */
26: public interface IMementoAware {
27:
28: /**
29: * <p>
30: * Restore the previous state of any actions using the flags in aMemento.
31: * This method allows the state of any actions that persist from session to
32: * session to be restored.
33: * </p>
34: *
35: * @param aMemento
36: * A memento that was given to the view part to restore its
37: * state.
38: */
39: public void restoreState(IMemento aMemento);
40:
41: /**
42: * <p>
43: * Save flags in aMemento to remember the state of any actions that persist
44: * from session to session.
45: * </p>
46: * <p>
47: * Extensions should qualify any keys stored in the memento with their
48: * plugin id
49: * </p>
50: *
51: * @param aMemento
52: * A memento that was given to the view part to save its state.
53: */
54: public void saveState(IMemento aMemento);
55:
56: }
|