From: tcofoegbu Date: Wed, 16 Sep 2015 17:38:51 +0000 (+0100) Subject: merge X-Git-Tag: Release_2_10_0~400 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=68405aa972a7fc07ff21b35c7b2272d1d4ecb1b7;hp=b61d853baef9db35859efb45d331becfdd11e61d;p=jalview.git merge --- diff --git a/examples/applets.html b/examples/applets.html index 3dfa83a..d811e94 100644 --- a/examples/applets.html +++ b/examples/applets.html @@ -195,7 +195,7 @@ Try out JalviewLite by pressing one of the buttons below.
Displays a split window view showing aligned protein and a reconstructed cDNA alignment.
Proteins were aligned with Muscle (version 3.8.31, - via the Jalvew Desktop).
Data retrieved from Uniprot and + via the Jalview Desktop).
Data retrieved from Uniprot and ENA, after Thornton, Need and Crews, Science 19 September 2003: 301 (5640), 1714-1717 diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index ee46581..4ea90e8 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -417,7 +417,7 @@ public class Cache System.out.println("# INFO: Setting default net timeout to " + orgtimeout + " seconds."); } - String jnlpVersion = null; + String remoteVersion = null; try { System.setProperty("sun.net.client.defaultConnectTimeout", @@ -437,20 +437,20 @@ public class Cache line = line.substring(line.indexOf("value=") + 7); line = line.substring(0, line.lastIndexOf("\"")); - jnlpVersion = line; + remoteVersion = line; break; } } catch (Exception ex) { System.out - .println("Non-fatal exceptions when checking version at www.jalview.org :"); + .println("Non-fatal exception when checking version at www.jalview.org :"); System.out.println(ex); - jnlpVersion = getProperty("VERSION"); + remoteVersion = getProperty("VERSION"); } System.setProperty("sun.net.client.defaultConnectTimeout", orgtimeout); - setProperty("LATEST_VERSION", jnlpVersion); + setProperty("LATEST_VERSION", remoteVersion); } } diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index f87fbe5..a448d19 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -3250,8 +3250,8 @@ public class Jalview2XML * indicate that annotation colours are applied across all groups (pre * Jalview 2.8.1 behaviour) */ - boolean doGroupAnnColour = isVersionStringLaterThan("2.8.1", - object.getVersion()); + boolean doGroupAnnColour = Jalview2XML.isVersionStringLaterThan( + "2.8.1", object.getVersion()); AlignmentPanel ap = null; boolean isnewview = true; @@ -4037,7 +4037,7 @@ public class Jalview2XML * @return true if version is development/null or evaluates to the same or * later X.Y.Z (where X,Y,Z are like [0-9]+b?[0-9]*) */ - protected boolean isVersionStringLaterThan(String supported, + public static boolean isVersionStringLaterThan(String supported, String version) { if (version == null || version.equalsIgnoreCase("DEVELOPMENT BUILD") @@ -4060,11 +4060,18 @@ public class Jalview2XML String fileT = fileV.nextToken().toLowerCase().replace('b', '.'); try { - if (Float.valueOf(curT) > Float.valueOf(fileT)) + float supportedVersionToken = Float.parseFloat(curT); + float myVersiontoken = Float.parseFloat(fileT); + if (supportedVersionToken > myVersiontoken) { // current version is newer than the version that wrote the file return false; } + if (supportedVersionToken < myVersiontoken) + { + // current version is older than the version that wrote the file + return true; + } } catch (NumberFormatException nfe) { System.err diff --git a/test/jalview/io/Jalview2xmlTests.java b/test/jalview/io/Jalview2xmlTests.java index 3c634fd..b58a8a6 100644 --- a/test/jalview/io/Jalview2xmlTests.java +++ b/test/jalview/io/Jalview2xmlTests.java @@ -20,6 +20,7 @@ */ package jalview.io; +import static org.testng.AssertJUnit.assertFalse; import static org.testng.AssertJUnit.assertTrue; import jalview.api.AlignmentViewPanel; @@ -412,4 +413,56 @@ public class Jalview2xmlTests Desktop.getAlignmentPanels(af.getViewport().getSequenceSetId()).length); } + @Test(groups = { "Functional" }) + public void testIsVersionStringLaterThan() + { + /* + * No version / development / test / autobuild is leniently assumed to be + * compatible + */ + assertTrue(Jalview2XML.isVersionStringLaterThan(null, null)); + assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", null)); + assertTrue(Jalview2XML.isVersionStringLaterThan(null, + "Development Build")); + assertTrue(Jalview2XML.isVersionStringLaterThan(null, + "DEVELOPMENT BUILD")); + assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", + "Development Build")); + assertTrue(Jalview2XML.isVersionStringLaterThan(null, "Test")); + assertTrue(Jalview2XML.isVersionStringLaterThan(null, "TEST")); + assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", "Test")); + assertTrue(Jalview2XML + .isVersionStringLaterThan(null, "Automated Build")); + assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", + "Automated Build")); + assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", + "AUTOMATED BUILD")); + + /* + * same version returns true i.e. compatible + */ + assertTrue(Jalview2XML.isVersionStringLaterThan("2.8", "2.8")); + assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", "2.8.3")); + assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3b1", "2.8.3b1")); + assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3B1", "2.8.3b1")); + assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3b1", "2.8.3B1")); + + /* + * later version returns true + */ + assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", "2.8.4")); + assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", "2.9")); + assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", "2.9.2")); + assertTrue(Jalview2XML.isVersionStringLaterThan("2.8", "2.8.3")); + assertTrue(Jalview2XML.isVersionStringLaterThan("2.8.3", "2.8.3b1")); + + /* + * earlier version returns false + */ + assertFalse(Jalview2XML.isVersionStringLaterThan("2.8.3", "2.8")); + assertFalse(Jalview2XML.isVersionStringLaterThan("2.8.4", "2.8.3")); + assertFalse(Jalview2XML.isVersionStringLaterThan("2.8.3b1", "2.8.3")); + assertFalse(Jalview2XML.isVersionStringLaterThan("2.8.3", "2.8.2b1")); + assertFalse(Jalview2XML.isVersionStringLaterThan("2.8.0b2", "2.8.0b1")); + } } diff --git a/utils/InstallAnywhere/Jalview.iap_xml b/utils/InstallAnywhere/Jalview.iap_xml index 18c7e75..cd9987c 100755 --- a/utils/InstallAnywhere/Jalview.iap_xml +++ b/utils/InstallAnywhere/Jalview.iap_xml @@ -1,8 +1,6 @@ - - + DATE: Wed Sep 16 18:09:53 BST 2015 --> + @@ -28,9 +26,9 @@ 12,42,11,85,78,76,73,67,69,78,83,69,68 3,13,71,76,105,110,117,120,44,32,50,46,54,46,51,50,45,51,53,56,46,54,46,50,46,101,108,54,46,120,56,54,95,54,52,44,32,97,109,100,54,52,59,32,74,97,118,97,32,49,46,55,46,48,95,54,48,44,32,79,114,97,99,108,101,32,67,111,114,112,111,114,97,116,105,111,110,44,32,104,116,116,112,58,47,47,106,97,118,97,46,111,114,97,99,108,101,46,99,111,109,47,59,32,101,110,44,32,85,110,107,110,111,119,110,59,32,73,83,79,45,56,56,53,57,45,49 - 1,0,0,64,13,-64,-128,0,80,127,118,101,93,105,116,96,121,48,48,49,56,52,67,98,113,112,112,37,82,101,96,63,55,-11,2,9,1,105,27,10,1,0,0 + 1,0,0,64,-35,32,64,-48,80,127,118,101,93,105,116,96,121,48,48,49,56,52,67,98,113,112,112,37,82,101,96,63,55,-11,2,9,13,114,23,15,1,0,0 - + false @@ -280,6 +278,19 @@ and any path to a file to save to the file]]> + + + + + + + + + + + + + @@ -371,7 +382,7 @@ and any path to a file to save to the file]]> - 4232225 + 5584573 false @@ -475,7 +486,7 @@ and any path to a file to save to the file]]> - 1010204 + 1367760 false @@ -631,7 +642,7 @@ and any path to a file to save to the file]]> - 124344 + 220536 false @@ -1047,7 +1058,7 @@ and any path to a file to save to the file]]> - 348699 + 29257 false @@ -1058,8 +1069,8 @@ and any path to a file to save to the file]]> - - + + @@ -1099,7 +1110,7 @@ and any path to a file to save to the file]]> - 348699 + 300844 false @@ -1151,7 +1162,7 @@ and any path to a file to save to the file]]> - 348699 + 15996 false @@ -1203,7 +1214,7 @@ and any path to a file to save to the file]]> - 348699 + 8870 false @@ -1255,7 +1266,7 @@ and any path to a file to save to the file]]> - 4938027 + 5417196 false @@ -1463,7 +1474,7 @@ and any path to a file to save to the file]]> - 133065 + 601804 false @@ -1879,7 +1890,7 @@ and any path to a file to save to the file]]> - 663408 + 695802 false @@ -2347,7 +2358,7 @@ and any path to a file to save to the file]]> - 16046 + 660179 false @@ -2515,7 +2526,7 @@ and any path to a file to save to the file]]> - + @@ -3171,6 +3182,94 @@ You may cancel this installation at any time by clicking the 'Cancel' button.]]> + + + false + + + true + + + true + + + + + + + + + + + + true + + + false + + + + + false + + + true + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false @@ -4039,7 +4138,7 @@ Press "Done" to quit the installer.]]> true - + @@ -4945,7 +5044,7 @@ Press "Done" to quit the installer.]]> true - + @@ -5071,7 +5170,7 @@ Press "Done" to quit the installer.]]> - + @@ -5139,7 +5238,7 @@ Press "Done" to quit the installer.]]> - + @@ -5417,13 +5516,13 @@ Press "Done" to quit the installer.]]> 2 - 8 + 9 - 2 + 0 - 0 + 1 @@ -5454,7 +5553,7 @@ Press "Done" to quit the installer.]]> - + @@ -7018,11 +7117,9 @@ and any path to a file to read from that file]]> - - - - + + @@ -7181,7 +7278,7 @@ and any path to a file to read from that file]]> - 4444 + 4447 false @@ -7209,8 +7306,6 @@ and any path to a file to read from that file]]> - - @@ -7423,7 +7518,7 @@ and any path to a file to read from that file]]> - 107135 + 107635 false @@ -7467,7 +7562,7 @@ and any path to a file to read from that file]]> - 56649 + 55958 false @@ -7508,7 +7603,7 @@ and any path to a file to read from that file]]> - 3039 + 2979 false @@ -7590,7 +7685,7 @@ and any path to a file to read from that file]]> - 31397 + 31399 false @@ -7672,7 +7767,7 @@ and any path to a file to read from that file]]> - 392 + 391 false @@ -7772,8 +7867,8 @@ and any path to a file to read from that file]]> - - + + @@ -7845,7 +7940,7 @@ and any path to a file to read from that file]]> false - 1 + 30621 false @@ -7907,6 +8002,88 @@ and any path to a file to read from that file]]> + + + false + + + true + + + true + + + + + + + + + + + + false + + + + + + true + + + + + + 2612 + + + false + + + 0 + + + + + false + + + true + + + true + + + + + + + + + + + + false + + + + + + true + + + + + + 809 + + + false + + + 0 + + @@ -8322,6 +8499,8 @@ and any path to a file to read from that file]]> + +