KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > cheatsheets > state > ICheatSheetStateManager


1 /*******************************************************************************
2  * Copyright (c) 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
12 package org.eclipse.ui.internal.cheatsheets.state;
13
14 import java.util.Properties JavaDoc;
15
16 import org.eclipse.core.runtime.IStatus;
17 import org.eclipse.ui.internal.cheatsheets.registry.CheatSheetElement;
18 import org.eclipse.ui.internal.cheatsheets.views.CheatSheetManager;
19
20 /**
21  * This interface is an abstraction of the state saving functions for a cheat sheet.
22  * Depending on how a cheat sheet is opened the state may be opened from
23  * a memento passed in, a file whose name is determined from the id of the
24  * cheat sheet, or in the case of a tray dialog it is passed using an object.
25  */

26
27 public interface ICheatSheetStateManager {
28     
29     /**
30      * Will be called before any of the functions to get or save state
31      * @param element
32      */

33     public void setElement(CheatSheetElement element);
34
35     /**
36      * Load the properties from the state file/memento/memory
37      */

38     public Properties JavaDoc getProperties();
39
40     /**
41      * Load the cheat sheet manager from state file/memento/memory
42      */

43     public CheatSheetManager getCheatSheetManager();
44     
45     /**
46      * Save the properties and the cheat sheet manager
47      * @param properties
48      * @param manager
49      * @return
50      */

51     public IStatus saveState(Properties JavaDoc properties, CheatSheetManager manager);
52
53 }
54
Popular Tags