X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fjws2%2FSequenceAnnotationWSClient.java;h=a2038f038299a22a1bd494abed9a16dac71a1c25;hb=ddc73338c0a046369b53151e8b3ebfba4d385df7;hp=7163974b1b4daec70c53974697ffa3305a556956;hpb=6a7ffd7997c11b84a81acbdd83e462cac76f124b;p=jalview.git diff --git a/src/jalview/ws/jws2/SequenceAnnotationWSClient.java b/src/jalview/ws/jws2/SequenceAnnotationWSClient.java index 7163974..a2038f0 100644 --- a/src/jalview/ws/jws2/SequenceAnnotationWSClient.java +++ b/src/jalview/ws/jws2/SequenceAnnotationWSClient.java @@ -52,7 +52,7 @@ public class SequenceAnnotationWSClient extends Jws2Client // TODO Auto-generated constructor stub } - public SequenceAnnotationWSClient(final Jws2Instance sh, + public SequenceAnnotationWSClient(final ServiceWithParameters sh, AlignFrame alignFrame, WsParamSetI preset, boolean editParams) { super(alignFrame, preset, null); @@ -139,7 +139,7 @@ public class SequenceAnnotationWSClient extends Jws2Client worker.updateParameters(this.preset, paramset); } } - if (sh.getAction().toLowerCase().contains("disorder")) + if (!sh.isInteractiveUpdate()) { // build IUPred style client. take sequences, returns annotation per // sequence. @@ -172,16 +172,19 @@ public class SequenceAnnotationWSClient extends Jws2Client final ServiceWithParameters service, final AlignFrame alignFrame) { - if (Jws2ClientFactory.registerAAConWSInstance(wsmenu, service, - alignFrame)) + if (service instanceof Jws2Instance + && Jws2ClientFactory.registerAAConWSInstance(wsmenu, (Jws2Instance) service, alignFrame)) { // Alignment dependent analysis calculation WS gui return; } boolean hasparams = service.hasParameters(); - // Assume name ends in WS - String calcName = service.getName().substring(0, - service.getName().length() - 2); + String calcName = service.getName(); + if (calcName.endsWith("WS")) + { + // Remove "WS" suffix + calcName = calcName.substring(0, calcName.length() - 2); + } JMenuItem annotservice = new JMenuItem(MessageManager.formatMessage( "label.calcname_with_default_settings", new String[] @@ -192,7 +195,7 @@ public class SequenceAnnotationWSClient extends Jws2Client @Override public void actionPerformed(ActionEvent e) { - new SequenceAnnotationWSClient((Jws2Instance) service, alignFrame, + new SequenceAnnotationWSClient(service, alignFrame, null, false); } }); @@ -211,7 +214,7 @@ public class SequenceAnnotationWSClient extends Jws2Client @Override public void actionPerformed(ActionEvent e) { - new SequenceAnnotationWSClient((Jws2Instance) service, alignFrame, + new SequenceAnnotationWSClient(service, alignFrame, null, true); } }); @@ -237,7 +240,7 @@ public class SequenceAnnotationWSClient extends Jws2Client @Override public void actionPerformed(ActionEvent e) { - new SequenceAnnotationWSClient((Jws2Instance) service, + new SequenceAnnotationWSClient(service, alignFrame, preset, false); }