From 06931e7445db77675739e0f206d7b5fafc3f9c05 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 16 Sep 2011 12:27:57 +0100 Subject: [PATCH] JAL-940 - removed legacy service options from preferences and noted deprecation in .jalview_properties --- src/jalview/bin/Cache.java | 11 +++++++---- src/jalview/gui/AlignFrame.java | 11 ++++++----- src/jalview/gui/Desktop.java | 3 ++- src/jalview/gui/WsPreferences.java | 11 ++--------- src/jalview/jbgui/GWsPreferences.java | 18 ------------------ src/jalview/ws/jws2/Jws2Discoverer.java | 4 ++-- 6 files changed, 19 insertions(+), 39 deletions(-) diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index 68edf1b..ab08140 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -40,9 +40,6 @@ import org.biojava.dasobert.dasregistry.Das1Source; * *
  • logs.Jalview.Level - Cache.log stringified level.
    *
  • - *
  • DISCOVERY_START - Boolean - controls if discovery services are queried on - * startup
  • - *
  • DISCOVERY_URLS - comma separated list of Discovery Service endpoints.
  • *
  • SCREEN_WIDTH
  • *
  • SCREEN_HEIGHT
  • *
  • SCREEN_Y=285
  • @@ -137,7 +134,13 @@ import org.biojava.dasobert.dasregistry.Das1Source; *
  • * * - * + * Deprecated settings: + * * @author $author$ * @version $Revision$ */ diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 9df4931..30026ef 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -3969,18 +3969,19 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, "Sequence Database Search"); final JMenu analymenu = new JMenu( "Analysis"); - - if (Cache.getDefault("SHOW_JWS1_SERVICES", true) - && Discoverer.services != null + // JAL-940 - only show secondary structure prediction services from the legacy server + if (// Cache.getDefault("SHOW_JWS1_SERVICES", true) + // && + Discoverer.services != null && (Discoverer.services.size() > 0)) { // TODO: refactor to allow list of AbstractName/Handler bindings to // be // stored or retrieved from elsewhere - Vector msaws = (Vector) Discoverer.services.get("MsaWS"); + Vector msaws = null; // (Vector) Discoverer.services.get("MsaWS"); Vector secstrpr = (Vector) Discoverer.services .get("SecStrPred"); - Vector seqsrch = (Vector) Discoverer.services.get("SeqSearch"); + 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, diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 56bd82f..3796b08 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -2221,7 +2221,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements // register PCS handler for desktop. discoverer.addPropertyChangeListener(changeSupport); } - if (Cache.getDefault("SHOW_JWS1_SERVICES", true)) + // JAL-940 - disabled JWS1 service configuration - always start discoverer until we phase out completely + if (true) { (t0 = new Thread(discoverer)).start(); } diff --git a/src/jalview/gui/WsPreferences.java b/src/jalview/gui/WsPreferences.java index 5258a4c..bc813ea 100644 --- a/src/jalview/gui/WsPreferences.java +++ b/src/jalview/gui/WsPreferences.java @@ -77,17 +77,14 @@ public class WsPreferences extends GWsPreferences enableEnfinServices.setSelected(oldEnfin = Cache.getDefault( "SHOW_ENFIN_SERVICES", true)); enableEnfinServices.addActionListener(updateAction); - enableJws1Services.setSelected(oldJws1 = Cache.getDefault( - "SHOW_JWS1_SERVICES", true)); - enableJws1Services.addActionListener(updateAction); enableJws2Services.setSelected(oldJws2 = Cache.getDefault( "SHOW_JWS2_SERVICES", true)); enableJws2Services.addActionListener(updateAction); indexByHost.setSelected(oldIndexByHost = Cache.getDefault( - "WSMENU_BYHOST", true)); + "WSMENU_BYHOST", false)); indexByHost.addActionListener(updateAction); indexByType.setSelected(oldIndexByType = Cache.getDefault( - "WSMENU_BYTYPE", true)); + "WSMENU_BYTYPE", false)); indexByType.addActionListener(updateAction); displayWsWarning.setSelected(oldWsWarning = Cache.getDefault( "SHOW_WSDISCOVERY_ERRORS", true)); @@ -241,10 +238,6 @@ public class WsPreferences extends GWsPreferences old ? oldEnfin : enableEnfinServices.isSelected()) .toString()); Cache.setProperty( - "SHOW_JWS1_SERVICES", - Boolean.valueOf(old ? oldJws1 : enableJws1Services.isSelected()) - .toString()); - Cache.setProperty( "SHOW_JWS2_SERVICES", Boolean.valueOf(old ? oldJws2 : enableJws2Services.isSelected()) .toString()); diff --git a/src/jalview/jbgui/GWsPreferences.java b/src/jalview/jbgui/GWsPreferences.java index 734ed8e..171bd7b 100644 --- a/src/jalview/jbgui/GWsPreferences.java +++ b/src/jalview/jbgui/GWsPreferences.java @@ -77,8 +77,6 @@ public class GWsPreferences extends JPanel protected JCheckBox indexByType = new JCheckBox(); - protected JCheckBox enableJws1Services = new JCheckBox(); - protected JCheckBox enableJws2Services = new JCheckBox(); protected JCheckBox enableEnfinServices = new JCheckBox(); @@ -196,16 +194,6 @@ public class GWsPreferences extends JPanel enableJws2Services_actionPerformed(e); } }); - enableJws1Services - .setFont(new java.awt.Font("Verdana", Font.PLAIN, 10)); - enableJws1Services.setText("Enable Legacy Services"); - enableJws1Services.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent e) - { - enableJws1Services_actionPerformed(e); - } - }); displayWsWarning.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10)); displayWsWarning.setText("Display warnings"); displayWsWarning @@ -407,7 +395,6 @@ public class GWsPreferences extends JPanel wsMenuButtons.setLayout(new GridLayout(2, 3)); wsMenuButtons.add(indexByHost); wsMenuButtons.add(indexByType); - wsMenuButtons.add(enableJws1Services); wsMenuButtons.add(enableJws2Services); wsMenuButtons.add(enableEnfinServices); wsMenuButtons.add(displayWsWarning); @@ -504,11 +491,6 @@ public class GWsPreferences extends JPanel } - protected void enableJws1Services_actionPerformed(ActionEvent e) - { - - } - protected void refreshWs_actionPerformed(ActionEvent e) { diff --git a/src/jalview/ws/jws2/Jws2Discoverer.java b/src/jalview/ws/jws2/Jws2Discoverer.java index 9b4c008..dc75246 100644 --- a/src/jalview/ws/jws2/Jws2Discoverer.java +++ b/src/jalview/ws/jws2/Jws2Discoverer.java @@ -407,8 +407,8 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI { return; } - boolean byhost = Cache.getDefault("WSMENU_BYHOST", true), bytype = Cache - .getDefault("WSMENU_BYTYPE", true); + boolean byhost = Cache.getDefault("WSMENU_BYHOST", false), bytype = Cache + .getDefault("WSMENU_BYTYPE", false); /** * eventually, JWS2 services will appear under the same align/etc submenus. * for moment we keep them separate. -- 1.7.10.2