From c13784724ba3826e6cc3faeb85571cf30776592d Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 6 Sep 2010 16:39:44 +0000 Subject: [PATCH] JAL-591 --- src/jalview/gui/Desktop.java | 11 + src/jalview/gui/WsJobParameters.java | 18 +- src/jalview/gui/WsParamSetManager.java | 298 ++++++++++++++++++++++++++++ src/jalview/ws/jws2/JabaParamStore.java | 201 +++++++++++++------ src/jalview/ws/jws2/JabaPreset.java | 2 +- src/jalview/ws/jws2/Jws2Discoverer.java | 47 +++-- src/jalview/ws/jws2/MsaWSClient.java | 2 +- src/jalview/ws/params/ParamDatastoreI.java | 45 ++++- src/jalview/ws/params/ParamManager.java | 23 ++- 9 files changed, 554 insertions(+), 93 deletions(-) create mode 100644 src/jalview/gui/WsParamSetManager.java diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 53fa463..8531e04 100755 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -19,6 +19,7 @@ package jalview.gui; import jalview.bin.Cache; import jalview.io.*; +import jalview.ws.params.ParamManager; import java.awt.*; import java.awt.datatransfer.*; @@ -2200,4 +2201,14 @@ public class Desktop extends jalview.jbgui.GDesktop implements }).start(); } + public static WsParamSetManager wsparamManager = null; + public static ParamManager getUserParameterStore() + { + if (wsparamManager==null) + { + wsparamManager = new WsParamSetManager(); + } + return wsparamManager; + } + } diff --git a/src/jalview/gui/WsJobParameters.java b/src/jalview/gui/WsJobParameters.java index 58c9646..1d56b69 100644 --- a/src/jalview/gui/WsJobParameters.java +++ b/src/jalview/gui/WsJobParameters.java @@ -389,11 +389,7 @@ public class WsJobParameters extends JPanel implements ItemListener, if (isUserPreset) { String curname = ((String) setName.getSelectedItem()).trim(); - if (curname.length() > 0 && !curname.equals(lastParmSet)) - { - _deleteUserPreset(lastParmSet); - } - _storeCurrentPreset(curname); + _updatePreset(lastParmSet, curname); lastParmSet = curname; isUserPreset = true; initArgSetModified(); @@ -401,6 +397,7 @@ public class WsJobParameters extends JPanel implements ItemListener, } } + private void _deleteUserPreset(String lastParmSet2) { paramStore.deletePreset(lastParmSet2); @@ -1466,7 +1463,7 @@ public class WsJobParameters extends JPanel implements ItemListener, } { System.out.println("Testing opts dupes for " - + lastserv.getHost() + " : " + + lastserv.getUri() + " : " + lastserv.getActionText() + ":" + pr.getName()); List