JAL-940 - removed legacy service options from preferences and noted deprecation in...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 16 Sep 2011 11:27:57 +0000 (12:27 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 16 Sep 2011 11:27:57 +0000 (12:27 +0100)
src/jalview/bin/Cache.java
src/jalview/gui/AlignFrame.java
src/jalview/gui/Desktop.java
src/jalview/gui/WsPreferences.java
src/jalview/jbgui/GWsPreferences.java
src/jalview/ws/jws2/Jws2Discoverer.java

index 68edf1b..ab08140 100755 (executable)
@@ -40,9 +40,6 @@ import org.biojava.dasobert.dasregistry.Das1Source;
  * </li>
  * <li>logs.Jalview.Level - Cache.log stringified level. <br>
  * </li>
- * <li>DISCOVERY_START - Boolean - controls if discovery services are queried on
- * startup</li>
- * <li>DISCOVERY_URLS - comma separated list of Discovery Service endpoints.</li>
  * <li>SCREEN_WIDTH</li>
  * <li>SCREEN_HEIGHT</li>
  * <li>SCREEN_Y=285</li>
@@ -137,7 +134,13 @@ import org.biojava.dasobert.dasregistry.Das1Source;
  * <li></li>
  * 
  * </ul>
- * 
+ * Deprecated settings:
+ * <ul>
+ *  * <li>DISCOVERY_START - Boolean - controls if discovery services are queried on
+ * startup (JWS1 services only)</li>
+ * <li>DISCOVERY_URLS - comma separated list of Discovery Service endpoints. (JWS1 services only)</li>
+ * <li>SHOW_JWS1_SERVICES (true) enable or disable the original Jalview 2 services in the desktop GUI
+ * </ul>
  * @author $author$
  * @version $Revision$
  */
index 9df4931..30026ef 100755 (executable)
@@ -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,
index 56bd82f..3796b08 100644 (file)
@@ -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();
     }
index 5258a4c..bc813ea 100644 (file)
@@ -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());
index 734ed8e..171bd7b 100644 (file)
@@ -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)
   {
 
index 9b4c008..dc75246 100644 (file)
@@ -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.