public interface ICheatSheetManager
Each cheat sheet that is opened in the UI is assigned its own cheat sheet
manager, which stays with it until the cheat sheet is completed (or
restarted). The cheat sheet manager is passed as a parameter to cheat
sheet-aware actions which implement ICheatSheetAction
. The manager
carries arbitrary key-value data (strings) for the lifetime of a cheat sheet,
and can be accessed via getData(String)
and
setData(String, String)
. If the workbench is shut down while the
cheat sheet is in progress, this data will generally be saved and later
restored when the workbench is restarted and cheat sheet is resumed. The
manager also supports a CheatSheetListener
(specified via the
"listener" attribute of the "cheatsheet" element in the cheat sheet content
file), which is kept informed of life cycle events over the course of the
cheat sheet's life time.
Modifier and Type | Method and Description |
---|---|
String |
getCheatSheetID()
Returns the id of the cheat sheet managed by this manager.
|
String |
getData(String key)
Returns the data value associated with the given key.
|
Set |
getKeySet()
Get the keys for the data in this cheat sheet manager
|
ICheatSheetManager |
getParent()
Get the cheat sheet manager for the enclosing composite cheat sheet.
|
void |
setData(String key,
String data)
Sets the data value associated with the given key.
|
String getCheatSheetID()
String getData(String key)
key
- the keynull
noneIllegalArgumentException
- if key
is null
void setData(String key, String data)
Data associated with a cheat sheet manager is remembered for the life of the manager. All data is discarded when the cheat sheet is completed (or restarted).
key
- the keydata
- the string data associated with the key,
or null
to removeIllegalArgumentException
- if key
is null
ICheatSheetManager getParent()
null
if this cheatsheet was not
opened as a subtask of a composite cheat sheet.Set getKeySet()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.