Author: pwang
Date: 2011-06-14 14:06:31 -0700 (Tue, 14 Jun 2011)
New Revision: 25755
Modified:
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/session/NewSessionTask.java
Log:
Add a tunable, give user a warning message before destroy current session
Modified:
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/session/NewSessionTask.java
===================================================================
---
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/session/NewSessionTask.java
2011-06-14 20:38:32 UTC (rev 25754)
+++
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/session/NewSessionTask.java
2011-06-14 21:06:31 UTC (rev 25755)
@@ -34,16 +34,24 @@
import org.cytoscape.work.AbstractTask;
import org.cytoscape.work.TaskMonitor;
+import org.cytoscape.work.Tunable;
public class NewSessionTask extends AbstractTask {
+
+ @Tunable(description="<html>Current session (all networks/attributes)
will be lost.<br />Do you want to continue?</html>")
+ public boolean destroyCurrentSession = true;
+
private CySessionManager mgr;
-
+
+
public NewSessionTask(CySessionManager mgr) {
this.mgr = mgr;
}
public void run(TaskMonitor taskMonitor) {
- mgr.setCurrentSession(null,null);
+ if (destroyCurrentSession) {
+ mgr.setCurrentSession(null,null);
+ }
}
}
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.