import jalview.schemes.ZappoColourScheme;
import jalview.ws.jws1.Discoverer;
import jalview.ws.jws2.Jws2Discoverer;
+import jalview.ws.jws2.jabaws2.Jws2Instance;
import jalview.ws.seqfetcher.DbSourceProxy;
import java.awt.BorderLayout;
@Override
public void run()
{
+ final List<JMenuItem> legacyItems=new ArrayList<JMenuItem>();
try
{
System.err.println("Building ws menu again "
// TODO: refactor to allow list of AbstractName/Handler bindings to
// be
// stored or retrieved from elsewhere
- Vector msaws = null; // (Vector) Discoverer.services.get("MsaWS");
+ // No MSAWS used any more:
+ // Vector msaws = null; // (Vector) Discoverer.services.get("MsaWS");
Vector secstrpr = (Vector) Discoverer.services
.get("SecStrPred");
- Vector seqsrch = null; // (Vector)
- // Discoverer.services.get("SeqSearch");
- // TODO: move GUI generation code onto service implementation - so a
- // client instance attaches itself to the GUI with method call like
- // jalview.ws.MsaWSClient.bind(servicehandle, Desktop.instance,
- // alignframe)
- if (msaws != null)
- {
- // Add any Multiple Sequence Alignment Services
- for (int i = 0, j = msaws.size(); i < j; i++)
- {
- final ext.vamsas.ServiceHandle sh = (ext.vamsas.ServiceHandle) msaws
- .get(i);
- jalview.ws.WSMenuEntryProviderI impl = jalview.ws.jws1.Discoverer
- .getServiceClient(sh);
- impl.attachWSMenuEntry(msawsmenu, me);
-
- }
- }
if (secstrpr != null)
{
// Add any secondary structure prediction services
.get(i);
jalview.ws.WSMenuEntryProviderI impl = jalview.ws.jws1.Discoverer
.getServiceClient(sh);
+ int p=secstrmenu.getItemCount();
impl.attachWSMenuEntry(secstrmenu, me);
- }
- }
- if (seqsrch != null)
- {
- // Add any sequence search services
- for (int i = 0, j = seqsrch.size(); i < j; i++)
- {
- final ext.vamsas.ServiceHandle sh = (ext.vamsas.ServiceHandle) seqsrch
- .elementAt(i);
- jalview.ws.WSMenuEntryProviderI impl = jalview.ws.jws1.Discoverer
- .getServiceClient(sh);
- impl.attachWSMenuEntry(seqsrchmenu, me);
+ int q=secstrmenu.getItemCount();
+ for (int litm=p;litm<q; litm++)
+ {
+ legacyItems.add(secstrmenu.getItem(litm));
+ }
}
}
}
-
+
// Add all submenus in the order they should appear on the web
// services menu
wsmenu.add(msawsmenu);
wsmenu.add(secstrmenu);
wsmenu.add(dismenu);
wsmenu.add(analymenu);
- // final ArrayList<JMenu> submens=new ArrayList<JMenu>();
- // submens.add(msawsmenu);
- // submens.add(secstrmenu);
- // submens.add(dismenu);
- // submens.add(analymenu);
-
// No search services yet
// wsmenu.add(seqsrchmenu);
webService.add(me.webServiceNoServices);
}
// TODO: move into separate menu builder class.
+ boolean new_sspred=false;
if (Cache.getDefault("SHOW_JWS2_SERVICES", true))
{
Jws2Discoverer jws2servs = Jws2Discoverer.getDiscoverer();
if (jws2servs.hasServices())
{
jws2servs.attachWSMenuEntry(webService, me);
+ for (Jws2Instance sv:jws2servs.getServices()) {
+ if (sv.description.toLowerCase().contains("jpred"))
+ {
+ for (JMenuItem jmi:legacyItems)
+ {
+ jmi.setVisible(false);
+ }
+ }
+ }
+
}
if (jws2servs.isRunning())
{
}
}
}
-
build_urlServiceMenu(me.webService);
build_fetchdbmenu(webService);
for (JMenu item : wsmenu)