X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FDesktop.java;h=21a0e37ca8435e267a74176b3571eae20ba2e988;hb=70c875f4c2db626298097acd47f31db9115fcea8;hp=ed9ed504c9cb312e17688761266f7bcb0ceb2ffa;hpb=1b378087ec2d5be9b290cd63c45bfdb9e75269fb;p=jalview.git diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index ed9ed50..21a0e37 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -143,7 +143,7 @@ public class Desktop extends jalview.jbgui.GDesktop protected static final String CONFIRM_KEYBOARD_QUIT = "CONFIRM_KEYBOARD_QUIT"; - public static HashMap savingFiles = new HashMap<>(); + public static HashMap savingFiles = new HashMap(); private JalviewChangeSupport changeSupport = new JalviewChangeSupport(); @@ -559,26 +559,27 @@ public class Desktop extends jalview.jbgui.GDesktop public void getIdentifiersOrgData() { - // Thread off the identifiers fetcher - new Thread(new Runnable() - { - @Override - public void run() + if (Cache.getProperty("NOIDENTIFIERSSERVICE") == null) + {// Thread off the identifiers fetcher + new Thread(new Runnable() { - Cache.log.debug("Downloading data from identifiers.org"); - UrlDownloadClient client = new UrlDownloadClient(); - try - { - client.download(IdOrgSettings.getUrl(), - IdOrgSettings.getDownloadLocation()); - } catch (IOException e) + @Override + public void run() { - Cache.log.debug("Exception downloading identifiers.org data" - + e.getMessage()); + Cache.log.debug("Downloading data from identifiers.org"); + try + { + UrlDownloadClient.download(IdOrgSettings.getUrl(), + IdOrgSettings.getDownloadLocation()); + } catch (IOException e) + { + Cache.log.debug("Exception downloading identifiers.org data" + + e.getMessage()); + } } - } - }).start(); - ; + }).start(); + ; + } } @Override @@ -927,7 +928,7 @@ public class Desktop extends jalview.jbgui.GDesktop } catch (java.lang.ClassCastException cex) { Cache.log.warn( - "Squashed a possible GUI implementation error. If you can recreate this, please look at http://issues.jalview.org/browse/JAL-869", + "Squashed a possible GUI implementation error. If you can recreate this, please look at https://issues.jalview.org/browse/JAL-869", cex); } } @@ -1135,7 +1136,7 @@ public class Desktop extends jalview.jbgui.GDesktop panel.add(history); history.setPreferredSize(new Dimension(400, 20)); history.setEditable(true); - history.addItem("http://www."); + history.addItem("https://www."); String historyItems = jalview.bin.Cache.getProperty("RECENT_URL"); @@ -1351,7 +1352,7 @@ public class Desktop extends jalview.jbgui.GDesktop "..Checking..") + " is available for download from " + jalview.bin.Cache.getDefault("www.jalview.org", - "http://www.jalview.org") + "https://www.jalview.org") + " !!"); if (red) { @@ -1362,7 +1363,7 @@ public class Desktop extends jalview.jbgui.GDesktop "AUTHORFNAMES", "The Jalview Authors (See AUTHORS file for current list)") + "

Development managed by The Barton Group, University of Dundee, Scotland, UK.
" - + "

For help, see the FAQ at www.jalview.org/faq and/or join the jalview-discuss@jalview.org mailing list" + + "

For help, see the FAQ at www.jalview.org/faq and/or join the jalview-discuss@jalview.org mailing list" + "

If you use Jalview, please cite:" + "
Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009)" + "
Jalview Version 2 - a multiple sequence alignment editor and analysis workbench" @@ -1924,7 +1925,10 @@ public class Desktop extends jalview.jbgui.GDesktop } // FIXME: ideally should use UI interface API - FeatureSettings viewFeatureSettings = af.featureSettings; + FeatureSettings viewFeatureSettings = (af.featureSettings != null + && af.featureSettings.isOpen()) + ? af.featureSettings + : null; Rectangle fsBounds = af.getFeatureSettingsGeometry(); for (int i = 0; i < size; i++) { @@ -1935,9 +1939,10 @@ public class Desktop extends jalview.jbgui.GDesktop // transfer reference for existing feature settings to new alignFrame if (ap == af.alignPanel) { - newaf.featureSettings = (viewFeatureSettings.fr.ap == ap) - ? viewFeatureSettings - : null; + if (viewFeatureSettings != null && viewFeatureSettings.fr.ap == ap) + { + newaf.featureSettings = viewFeatureSettings; + } newaf.setFeatureSettingsGeometry(fsBounds); } @@ -1966,6 +1971,7 @@ public class Desktop extends jalview.jbgui.GDesktop } } + af.featureSettings = null; af.alignPanels.clear(); af.closeMenuItem_actionPerformed(true); @@ -2566,13 +2572,36 @@ public class Desktop extends jalview.jbgui.GDesktop this.inBatchMode = inBatchMode; } + /** + * start service discovery and wait till it is done + */ public void startServiceDiscovery() { startServiceDiscovery(false); } + /** + * start service discovery threads - blocking or non-blocking + * + * @param blocking + */ public void startServiceDiscovery(boolean blocking) { + startServiceDiscovery(blocking,false); + } + + /** + * start service discovery threads + * + * @param blocking + * - false means call returns immediately + * @param ignore_SHOW_JWS2_SERVICES_preference + * - when true JABA services are discovered regardless of user's JWS2 + * discovery preference setting + */ + public void startServiceDiscovery(boolean blocking, + boolean ignore_SHOW_JWS2_SERVICES_preference) + { boolean alive = true; Thread t0 = null, t1 = null, t2 = null; // JAL-940 - JALVIEW 1 services are now being EOLed as of JABA 2.1 release @@ -2590,7 +2619,8 @@ public class Desktop extends jalview.jbgui.GDesktop (t0 = new Thread(discoverer)).start(); } - if (Cache.getDefault("SHOW_JWS2_SERVICES", true)) + if (ignore_SHOW_JWS2_SERVICES_preference + || Cache.getDefault("SHOW_JWS2_SERVICES", true)) { t2 = jalview.ws.jws2.Jws2Discoverer.getDiscoverer() .startDiscoverer(changeSupport);