← Revision 2 as of 2005-11-29 00:53:21
Size: 638
Comment:
|
← Revision 3 as of 2005-12-08 19:10:24 →
Size: 914
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 13: | Line 13: |
==== How to save plugin state in a file ==== Once plugins get the signal (SESSION_SAVE), they need to save the state as an XML file and tell the session writer class the file location. When all plugins finish this process, session writer class copies it into a zip file. |
CySession.xml is the file to save current states of the Cytoscape session. The following information will be stored in the XML document:
- List of networks opened in current session.
- States of Cytopanels 1~3.
- Network Tree structure.
- Session ID
- Annotation for the session
- Selected/Hidden nodes/edges
- Plugin state
Plugin State
The last element is more complicated than others. First of all, we need to create a new signal called "SESSION_SAVE" and "SESSION_LOAD" to tell plugins that session save/load command is called. We may need to create a schema for each plugin to describe its state.
How to save plugin state in a file
Once plugins get the signal (SESSION_SAVE), they need to save the state as an XML file and tell the session writer class the file location. When all plugins finish this process, session writer class copies it into a zip file.