From: jprocter Date: Wed, 11 Aug 2010 15:29:22 +0000 (+0000) Subject: reverted dodgy test code X-Git-Tag: Release_2_6~133 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1cc07f96279fa63ebaab79ff42d37e981da6c95f;p=jalview.git reverted dodgy test code --- diff --git a/src/jalview/gui/WsJobParameters.java b/src/jalview/gui/WsJobParameters.java index ce1c868..e639b41 100644 --- a/src/jalview/gui/WsJobParameters.java +++ b/src/jalview/gui/WsJobParameters.java @@ -399,32 +399,6 @@ public class WsJobParameters extends JPanel implements ItemListener, try { args = p.getArguments(serviceOptions); - // quick test of getArguments - for (Object rg: p.getOptions()) - { - String _rg = ((String) rg).substring(1);// remove initial arg character - - String _rgv = _rg; - // select arg name - int _rgs = _rg.indexOf(" "); - if (_rgs>0) - { - _rgv = _rg.substring(_rgs+1); - _rg = _rg.substring(0,_rgs); - } - boolean found=false; - for (Argument ar:args) - { - if (ar.getName().equalsIgnoreCase(_rg) || ar.getDefaultValue()!=null && ar.getDefaultValue().equalsIgnoreCase(_rgv)) - { - found = true; - continue; - } - } - if (!found) - { - System.err.println("Couldn't set Argument: "+rg.toString()); - } - } } catch (Exception e) { e.printStackTrace(); @@ -549,7 +523,14 @@ public class WsJobParameters extends JPanel implements ItemListener, } if (string == null) { - // no value specified. + // no value specified. Either a .. +// if (opt.getPossibleValues()==null || opt.getPossibleValues().size()<=1) { + // switch +// cb.enabled.setSelected(true); +// } else { +// // or unselected option +// cb.enabled.setSelected(false); +// } if (opt.isRequired()) { // indicate option needs to be selected! @@ -573,6 +554,10 @@ public class WsJobParameters extends JPanel implements ItemListener, } } + if (opt.isRequired() && !cb.enabled.isSelected()) + { + // TODO: indicate paramset is not valid.. option needs to be selected! + } cb.setInitialValue(); }