import jalview.bin.Cache;
import jalview.datamodel.AlignmentView;
import jalview.gui.AlignFrame;
+import jalview.gui.Desktop;
import jalview.ws.WSMenuEntryProviderI;
import jalview.ws.params.ParamDatastoreI;
import compbio.data.msa.MsaWS;
PresetManager presets = null;
- public JabaParamStore paramStore=null;
+ public JabaParamStore paramStore = null;
/**
* non thread safe - gets the presets for this service (blocks whilst it
{
if (paramStore == null)
{
- try {
- paramStore = new JabaParamStore(this);
+ try
+ {
+ paramStore = new JabaParamStore(this,
+ (Desktop.instance != null ? Desktop
+ .getUserParameterStore() : null));
} catch (Exception ex)
- {}
-
+ {
+ }
+
}
return paramStore;
}
+
+ public String getUri()
+ {
+ // this is only valid for Jaba 1.0 - this formula might have to change!
+ return hosturl+"/"+serviceType;
+ }
};
/**
{
// dynamically regenerate service list.
final JMenu jws2al = new JMenu("JABA Alignment");
- jws2al.addMenuListener(new MenuListener() {
- // TODO: future: add menu listener to parent menu - so submenus are populated *before* they are selected.
+ jws2al.addMenuListener(new MenuListener()
+ {
+ // TODO: future: add menu listener to parent menu - so submenus are
+ // populated *before* they are selected.
@Override
public void menuSelected(MenuEvent e)
{
public void menuDeselected(MenuEvent e)
{
// TODO Auto-generated method stub
-
+
}
@Override
public void menuCanceled(MenuEvent e)
{
// TODO Auto-generated method stub
-
+
}
-
+
});
wsmenu.add(jws2al);
}
+
private void populateWSMenuEntry(JMenu jws2al, final AlignFrame alignFrame)
{
if (running || services == null || services.size() == 0)
/**
* test the given URL with the JabaWS test code
+ *
* @param foo
* @return
*/
public static boolean testServiceUrl(URL foo)
{
- try {
- compbio.ws.client.WSTester.main(new String[] { "-h="+foo.toString()});
+ try
+ {
+ compbio.ws.client.WSTester.main(new String[]
+ { "-h=" + foo.toString() });
} catch (Exception e)
{
return false;
- }
- catch (OutOfMemoryError e)
+ } catch (OutOfMemoryError e)
{
return false;
- }
- catch (Error e)
+ } catch (Error e)
{
return false;
}