import jalview.gui.JvSwingUtils;
import jalview.util.MessageManager;
import jalview.ws.api.ServiceWithParameters;
-import jalview.ws.jws2.dm.AAConSettings;
-import jalview.ws.jws2.jabaws2.Jws2Instance;
+import jalview.ws.params.AutoCalcSetting;
import jalview.ws.params.WsParamSetI;
import jalview.ws.uimodel.AlignAnalysisUIText;
// 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);
// dan think. Do I need to change this method to run RNAalifold through the
// GUI
- public void initSequenceAnnotationWSClient(final Jws2Instance sh,
+ public void initSequenceAnnotationWSClient(final ServiceWithParameters sh,
AlignFrame alignFrame, WsParamSetI preset, boolean editParams)
{
// dan changed! dan test. comment out if conditional
List<AlignCalcWorkerI> clnts = alignFrame.getViewport()
.getCalcManager()
- .getRegisteredWorkersOfClass(SeqAnnotationServiceCalcWorker.class);
+ .getWorkersOfClass(SeqAnnotationServiceCalcWorker.class);
SeqAnnotationServiceCalcWorker worker = null;
if (clnts != null)
MessageManager.getString("error.implementation_error"),
x);
}
- alignFrame.getViewport().getCalcManager().registerWorker(worker);
- alignFrame.getViewport().getCalcManager().startWorker(worker);
-
+ alignFrame.getViewport().getCalcManager().registerWorker(worker); // also
+ // starts
+ // the
+ // worker
}
else
{
worker.updateParameters(this.preset, paramset);
}
}
- if (sh.getAction().toLowerCase().contains("disorder"))
+ if (!sh.isInteractiveUpdate())
{
// build IUPred style client. take sequences, returns annotation per
// sequence.
}
}
- public SequenceAnnotationWSClient(AAConSettings fave,
+ public SequenceAnnotationWSClient(AutoCalcSetting fave,
AlignFrame alignFrame, boolean b)
{
super(alignFrame, fave.getPreset(), fave.getArgumentSet());
final ServiceWithParameters service,
final AlignFrame alignFrame)
{
- if (Jws2ClientFactory.registerAAConWSInstance(wsmenu, service,
- alignFrame))
+ if (Jws2ClientFactory.registerAAConWSInstance(wsmenu,
+ 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[]
@Override
public void actionPerformed(ActionEvent e)
{
- new SequenceAnnotationWSClient((Jws2Instance) service, alignFrame,
+ new SequenceAnnotationWSClient(service, alignFrame,
null, false);
}
});
@Override
public void actionPerformed(ActionEvent e)
{
- new SequenceAnnotationWSClient((Jws2Instance) service, alignFrame,
+ new SequenceAnnotationWSClient(service, alignFrame,
null, true);
}
});
@Override
public void actionPerformed(ActionEvent e)
{
- new SequenceAnnotationWSClient((Jws2Instance) service,
+ new SequenceAnnotationWSClient(service,
alignFrame, preset,
false);
}
@Override
public void actionPerformed(ActionEvent arg0)
{
- Desktop.instance.showUrl(service.getDocumentationUrl());
+ Desktop.getInstance().showUrl(service.getDocumentationUrl());
}
});
annotservice.setToolTipText(