Merge branch 'develop' of https://source.jalview.org/git/jalview into develop
authorBen Soares <bsoares@dundee.ac.uk>
Tue, 18 Jun 2019 09:52:27 +0000 (10:52 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Tue, 18 Jun 2019 09:52:27 +0000 (10:52 +0100)
17 files changed:
build.gradle
gradle.properties
help/help/html/calculations/pca.html
help/help/html/calculations/pcaviewer.gif [deleted file]
help/help/html/calculations/pcaviewer.png [new file with mode: 0644]
help/help/html/releases.html
src/jalview/bin/BuildDetails.java
src/jalview/bin/Cache.java
src/jalview/bin/Jalview.java
src/jalview/ext/ensembl/EnsemblFeatures.java
src/jalview/gui/Desktop.java
src/jalview/io/gff/SequenceOntologyLite.java
src/jalview/util/Platform.java
src/jalview/util/ShortcutKeyMaskExWrapper.java
src/jalview/util/ShortcutKeyMaskExWrapper11.java [new file with mode: 0644]
src/jalview/util/ShortcutKeyMaskExWrapper8.java [new file with mode: 0644]
src/jalview/util/ShortcutKeyMaskExWrapperI.java [new file with mode: 0644]

index 94481e9..f5149da 100644 (file)
@@ -55,7 +55,7 @@ ext {
   // TODO: consider allowing this expression to  be overridden by -P arg
   getdownWebsiteDir = jalviewDir + '/' + getdown_website_dir + '/' + JAVA_VERSION
   getdownAppDir = getdownWebsiteDir + '/' + getdown_app_dir
-  getdownJ11libDir = getdownWebsiteDir + '/' + getdown_j11lib_dir
+  //getdownJ11libDir = getdownWebsiteDir + '/' + getdown_j11lib_dir
   getdownResourceDir = getdownWebsiteDir + '/' + getdown_resource_dir
   getdownLauncher = jalviewDir + '/' + getdown_launcher
   getdownFilesDir = jalviewDir + '/' + getdown_files_dir + '/' + JAVA_VERSION + '/'
@@ -72,14 +72,18 @@ def additional_compiler_args = []
 def getdown_alt_java_min_version
 // this property is assigned below and expanded to multiple lines in the getdown task
 def getdown_alt_multi_java_location
+// this property is for the Java library used in eclipse
+def eclipse_java_runtime_name
 if (JAVA_VERSION.equals("1.8")) {
   JAVA_INTEGER_VERSION = "8"
+  //libDir = j8libDir
   libDir = j11libDir
   libDistDir = j8libDir
   compile_source_compatibility = 1.8
   compile_target_compatibility = 1.8
   getdown_alt_java_min_version = getdown_alt_java8_min_version
   getdown_alt_multi_java_location = getdown_alt_java8_txt_multi_java_location
+  eclipse_java_runtime_name = "JavaSE-1.8"
 } else if (JAVA_VERSION.equals("11")) {
   JAVA_INTEGER_VERSION = "11"
   libDir = j11libDir
@@ -88,6 +92,7 @@ if (JAVA_VERSION.equals("1.8")) {
   compile_target_compatibility = 11
   getdown_alt_java_min_version = getdown_alt_java11_min_version
   getdown_alt_multi_java_location = getdown_alt_java11_txt_multi_java_location
+  eclipse_java_runtime_name = "JavaSE-11"
   additional_compiler_args += [
     '--module-path', ext.modules_compileClasspath.asPath,
     '--add-modules', j11modules
@@ -106,7 +111,6 @@ sourceSets {
 
     resources {
       srcDirs "$jalviewDir/$resourceDir"
-      srcDirs "$jalviewDir/$libDistDir"
     }
 
     jar.destinationDir = file("$jalviewDir/$packageDir")
@@ -151,8 +155,7 @@ sourceSets {
     } else {
       compileClasspath += files(sourceSets.main.java.outputDir)
     }
-    //compileClasspath += sourceSets.main.compileClasspath
-    //compileClasspath += files( sourceSets.main.resources.srcDirs)
+    
     compileClasspath += fileTree(dir: "$jalviewDir/$utilsDir", include: ["**/*.jar"])
     compileClasspath += fileTree(dir: "$jalviewDir/$libDir", include: ["*.jar"])
 
@@ -211,15 +214,18 @@ eclipse {
         }
         cp.entries.removeAll(removeTheseToo)
         
+        print ("CP="+cp.inspect())
+        
         cp.entries += new Output("bin/main")
         cp.entries += new Library(fileReference(helpParentDir))
         cp.entries += new Library(fileReference(resourceDir))
         
         HashMap<String, Boolean> addedLibPath = new HashMap<>();
-        def allPaths = sourceSets.test.compileClasspath + sourceSets.main.compileClasspath
-        sourceSets.main.compileClasspath.each{
-          //if ((it.isDirectory() || ! it.exists()) && ! (it.equals(sourceSets.main.java.outputDir))) {
-          //no longer want to add outputDir as eclipse is using its own output dir in bin/main
+        
+        // changing from sourcesets.main.classpath to specific Java version lib
+        //sourceSets.main.compileClasspath.each{
+        fileTree("$jalviewDir/$libDistDir").include("**/*.jar").include("*.jar").each {
+          //don't want to add outputDir as eclipse is using its own output dir in bin/main
           if (it.isDirectory() || ! it.exists()) {
             // don't add dirs to classpath
             return
@@ -237,7 +243,9 @@ eclipse {
           }
         }
 
-        sourceSets.test.compileClasspath.each{
+        // changing from sourcesets.main.classpath to specific Java version lib
+        //sourceSets.test.compileClasspath.each{
+        fileTree(dir: "$jalviewDir/$utilsDir", include: ["**/*.jar"]).each {
           //if ((it.isDirectory() || ! it.exists()) && ! (it.equals(sourceSets.main.java.outputDir))) {
           //no longer want to add outputDir as eclipse is using its own output dir in bin/main
           if (it.isDirectory() || ! it.exists()) {
@@ -298,9 +306,9 @@ eclipse {
 
   jdt {
     // for the IDE, use java 11 compatibility
-    sourceCompatibility = 11
-    targetCompatibility = 11
-    javaRuntimeName = "JavaSE-11"
+    sourceCompatibility = compile_source_compatibility
+    targetCompatibility = compile_target_compatibility
+    javaRuntimeName = eclipse_java_runtime_name
 
     file {
       withProperties { props ->
@@ -411,48 +419,46 @@ cleanTest {
   delete cloverInstrDir
 }
 
+// format is a string like date.format("dd MMMM yyyy")
 def getDate(format) {
   def date = new Date()
-  //return date.format("dd MMMM yyyy")
   return date.format(format)
 }
 
-task setGitHash(type: Exec) {
-  workingDir = jalviewDir
-  commandLine "git", "rev-parse", "--short", "HEAD"
-  standardOutput = new ByteArrayOutputStream()
-  project.ext.gitHash = {
-    return standardOutput.toString().trim()
+task setGitVals {
+  def hashStdOut = new ByteArrayOutputStream()
+  exec {
+    commandLine "git", "rev-parse", "--short", "HEAD"
+    standardOutput = hashStdOut
+    ignoreExitValue true
   }
-}
 
-task setGitBranch(type: Exec) {
-  workingDir = jalviewDir
-  commandLine "git", "rev-parse", "--abbrev-ref", "HEAD"
-  standardOutput = new ByteArrayOutputStream()
-  project.ext.gitBranch = {
-    return standardOutput.toString().trim()
+  def branchStdOut = new ByteArrayOutputStream()
+  exec {
+    commandLine "git", "rev-parse", "--abbrev-ref", "HEAD"
+    standardOutput = branchStdOut
+    ignoreExitValue true
   }
-}
 
-task setGitVals {
-  dependsOn setGitHash
-  dependsOn setGitBranch
+  project.ext.gitHash = hashStdOut.toString().trim()
+  project.ext.gitBranch = branchStdOut.toString().trim()
+
+  outputs.upToDateWhen { false }
 }
 
 task createBuildProperties(type: WriteProperties) {
   dependsOn setGitVals
   inputs.dir("$jalviewDir/$sourceDir")
+  inputs.dir("$classes")
   inputs.dir("$jalviewDir/$resourceDir")
   outputFile "$classes/$buildPropertiesFile"
   // taking time specific comment out to allow better incremental builds
-  //comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd HH:mm:ss")
-  comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd")
-  property "BUILD_DATE", getDate("dd MMMM yyyy")
+  comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd HH:mm:ss")
+  //comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd")
+  property "BUILD_DATE", getDate("HH:mm:ss dd MMMM yyyy")
   property "VERSION", JALVIEW_VERSION
   property "INSTALLATION", INSTALLATION+" git-commit:"+project.ext.gitHash+" ["+project.ext.gitBranch+"]"
   outputs.file(outputFile)
-  outputs.dir("$classes")
 }
 
 def buildingHTML = "$jalviewDir/$docDir/building.html"
index 3d37b3f..08bcbd7 100644 (file)
@@ -1,5 +1,6 @@
 jalviewDir = .
 
+#JAVA_VERSION = 1.8
 JAVA_VERSION = 11
 JALVIEW_VERSION = DEVELOPMENT
 INSTALLATION = Source
@@ -15,9 +16,6 @@ jalview_keydig = SHA1
 
 testngGroups = Functional
 
-javac_source = 11
-javac_target = 11
-
 j8libDir = j8lib
 j11libDir = j11lib
 resourceDir = resources
@@ -50,7 +48,7 @@ getdown_local = false
 getdown_website_dir = getdown/website
 getdown_resource_dir = resource
 getdown_app_dir = dist
-getdown_j11lib_dir = j11lib
+#getdown_j11lib_dir = j11lib
 getdown_files_dir = getdown/files
 getdown_launcher = getdown/lib/getdown-launcher.jar
 getdown_core = getdown/lib/getdown-core-1.8.3-SNAPSHOT.jar
index 3529cae..3bf21cb 100755 (executable)
@@ -70,7 +70,7 @@
       nucleotide substitution matrix</a>, or by sequence percentage identity,
       or sequence feature similarity. 
   </p>
-  <img src="pcaviewer.gif">
+  <img src="pcaviewer.png">
   <p>
     <strong>The PCA Viewer</strong>
   </p>
@@ -84,7 +84,9 @@
     towards the front of the view.</p>
   <p>
     The 3d view can be rotated by dragging the mouse with the <strong>left
-      mouse button</strong> pressed. The view can also be zoomed in and out with
+      mouse button</strong> pressed, or with the <strong>arrow
+      keys</strong> when <strong>SHIFT</strong> is pressed. The
+    view can also be zoomed in and out with
     the up and down <strong>arrow keys</strong> (and the roll bar of the
     mouse if present). Labels will be shown for each sequence if the
     entry in the View menu is checked, and the plot background colour
@@ -122,7 +124,7 @@ left-clicking and dragging the mouse over the display. -->
   <p>
     Initially, the display shows the first three components of the
     similarity space, but any eigenvector can be used by changing the
-    selected dimension for the x, y, or z axis through each ones menu
+    selected dimension for the x, y, or z axis through each one's menu
     located below the 3d display. The <strong><em>Reset</em></strong>
     button will reset axis and rotation settings to their defaults.
   </p>
@@ -131,7 +133,7 @@ left-clicking and dragging the mouse over the display. -->
     <em>The output of points and transformed point coordinates was
       added to the Jalview desktop in v2.7.</em> <em>The Reset button
       and Change Parameters menu were added in Jalview 2.8.</em> <em>Support
-      for PAM250 based PCA was added in Jalview 2.8.1.</em>
+      for PAM250 based PCA was added in Jalview 2.8.1.</em><em>In Jalview 2.11, support for saving and restoring PCAs in Project files was added, and the Change parameters menu removed.</em> 
   </p>
   <p>
     <strong>Reproducing PCA calculations performed with older
diff --git a/help/help/html/calculations/pcaviewer.gif b/help/help/html/calculations/pcaviewer.gif
deleted file mode 100644 (file)
index 78c82f2..0000000
Binary files a/help/help/html/calculations/pcaviewer.gif and /dev/null differ
diff --git a/help/help/html/calculations/pcaviewer.png b/help/help/html/calculations/pcaviewer.png
new file mode 100644 (file)
index 0000000..7dc5b80
Binary files /dev/null and b/help/help/html/calculations/pcaviewer.png differ
index e7b2f47..88b0fd7 100755 (executable)
@@ -58,106 +58,179 @@ li:before {
     <tr>
       <td width="60" align="center" nowrap>
           <strong><a name="Jalview.2.11">2.11</a><br />
-            <em>tbc/06/2019</em></strong>
+            <em>20/06/2019</em></strong>
       </td>
       <td align="left" valign="top">
         <ul>
           <li>
             <!-- JAL-1793 -->Annotate nucleotide alignments from VCF data files</li>
           <li>
-            <!-- JAL-3141 -->Optional automatic backups when saving
-            Jalview project or alignment files</li>
-          <li>
-            <!-- JAL-1767,JAL-2647 -->Principal Components Analysis and
-            Viewer state is saved in Jalview Project<br />The 'Change
-            parameters' option has also been removed from the PCA viewer</li>
-          <li>
-            <!-- JAL-3127 -->New 'Colour by Sequence ID' (subgroup) option</li>
-          <li>
-            <!-- JAL-2620 -->Alternative genetic code tables supported for
+            <!-- JAL-2620 -->Alternative genetic code tables for
             'Translate as cDNA'</li>
           <li>
-            <!-- JAL-2933 -->Finder panel remembers last position in each view</li>
-          <li>
-            <!-- JAL-3198 -->More efficient creation of selections and
-            multiple groups when working with large alignments</li>
-          <li>
-            <!-- JAL-3200 -->Speedier import of annotation rows when
-            parsing stockholm files</li>
-          <li>
             <!-- JAL-3018 -->Update of Ensembl Rest Client to API v10.0</li>
-          <li>
-            <!-- JAL-2808,JAL-2069 -->Sequence features can be filtered and
-            shaded according to any associated attributes (e.g. variant
-            attributes from VCF file, or key-value pairs imported from
-            column 9 of GFF file)</li>
-          <li>
-            <!-- JAL-2897 -->Show synonymous codon variants on peptide sequences</li>
-          <li>
-            <!-- JAL-2792 -->Popup report of a selected sequence feature's details</li>
-          <li>
-            <!-- JAL-3139,JAL-2816 -->More efficient sequence feature render
-            algorithm (Z-sort/transparency and filter aware)</li>
-          <li>
-            <!-- JAL-2527 -->Alignment Overview now by default shows
-            only visible region of alignment (this can be changed in
-            user preferences)</li>
-          <li>
-            <!-- JAL-3169 -->File Chooser stays open after Cancel overwrite</li>
-          <li>
-            <!-- JAL-2420,JAL-3166 -->Better popup menu behaviour when
-          all sequences are hidden</li>
-          <li>
-            <!-- JAL-1244 -->Status bar shows bounds when dragging a selection
-          region, and gap count when inserting or deleting gaps</li>
-          <li>
-            <!-- JAL-3132 -->Status bar updates over sequence and annotation labels</li>
-          <li>
-            <!-- JAL-3093 -->Show annotation tooltips and popup menus in wrapped mode</li>
-          <li>
-            <!-- JAL-3073 -->Can select columns by dragging left/right in annotations</li>
-          <li>
-            <!-- JAL-3049,JAL-3054 -->Improved tooltips in Feature Settings dialog</li>
-          <li>
-            <!-- JAL-2814 -->Help button on Uniprot and PDB search panels</li>
-          <li> 
-            <!-- JAL-2621 -->Cursor changes over draggable box in Overview panel</li>
-          <li>
-            <!-- JAL-3203  -->Overview panel default changed to not show hidden regions</li>
-          <li>
-            <!-- JAL-3181 -->Consistent ordering of links in sequence id popup menu</li>
-          <li>
-            <!-- JAL-3021 -->Sequence Details report opens positioned to top of report</li>
-          <li>
-            <!-- JAL-3218 -->Scale panel popup menu allows Hide selected columns adjacent 
-            to a hidden column marker</li>
-          <li>
-            <!-- JAL-2975 -->Can use shift + arrow keys to rotate PCA image incrementally</li>
-          <li>
-            <!-- JAL-2965 -->PCA depth cueing with graduated colours</li>
-        </ul>
+                                       <li><strong>Enhanced visualisation and analysis of Sequence Features</strong>
+                                               <ul>
+                                                       <li>
+                                                               <!-- JAL-2808,JAL-2069 -->Sequence features can be filtered and
+                                                               shaded according to any associated attributes (e.g. variant
+                                                               attributes from VCF file, or key-value pairs imported from
+                                                               column 9 of GFF file)
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-2897 -->Show synonymous codon variants on peptide
+                                                               sequences
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-2792 -->Popup window to show full report for a selected sequence feature's
+                                                               details
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-3139,JAL-2816 -->More efficient sequence feature render
+                                                               algorithm (Z-sort/transparency and filter aware)
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-3049,JAL-3054 -->Improved tooltips in Feature Settings
+                                                               dialog
+                                                       </li>
+                                               </ul>
+                                       </li>
+                                       <li>
+            <!-- JAL-3141 -->Backup files created when saving Jalview project
+            or alignment files
+          </li>
+          <li><strong>Principal Components Analysis Viewer</strong>
+            <ul>
+                                                       <li>
+                                                               <!-- JAL-1767,JAL-2647 -->Principal Components Analysis results
+                                                               and Viewer state saved in Jalview Project
+                                                       </li>
+                                                       <li>'Change parameters' option removed from viewer's
+                                                               drop-down menus</li>
+                                                       <li>
+                                                               <!-- JAL-2975 -->Can use shift + arrow keys to rotate PCA image
+                                                               incrementally
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-2965 -->PCA plot is depth cued
+                                                       </li>
+                                               </ul>
+                                       </li>
+                                       <li>
+                                               <!-- JAL-3127 -->New 'Colour by Sequence ID' option
+                                       </li>
+                                       <li><strong>Speed and Efficiency</strong>
+                                       <ul>
+                                                       <li>
+                                                               <!-- JAL-3198 -->More efficient creation of selections and
+                                                               multiple groups when working with large alignments
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-3200 -->Speedier import of annotation rows when parsing
+                                                               Stockholm files
+                                                       </li>
+                                               </ul>
+                                       <li><strong>User Interface</strong>
+                                       <ul>
+                                                       <li>
+                                                               <!-- JAL-2933 -->Finder panel remembers last position in each
+                                                               view
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-2527 -->Alignment Overview now WYSIWIS (What you see is
+                                                               what is shown)<br />Only visible region of alignment is shown by
+                                                               default (can be changed in user preferences)
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-3169 -->File Chooser stays open after responding Cancel
+                                                               to the Overwrite Dialog
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-2420,JAL-3166 -->Better popup menu behaviour when all
+                                                               sequences are hidden
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-1244 -->Status bar shows bounds when dragging a
+                                                               selection region, and gap count when inserting or deleting gaps
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-3132 -->Status bar updates over sequence and annotation
+                                                               labels
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-3093 -->Annotation tooltips and popup menus are shown
+                                                               when in wrapped mode
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-3073 -->Can select columns by dragging left/right in
+                                                               annotations
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-2814 -->Help button on Uniprot and PDB search panels
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-2621 -->Cursor changes over draggable box in Overview
+                                                               panel
+                                                       </li>
+                                                       <li>
+                                                               <!-- JAL-3181 -->Consistent ordering of links in sequence id
+                                                               popup menu
+                                                       </li>
+                                               </ul></li>
+                                       <li><strong>Java 11 Support</strong>
+                                               <ul>
+                                                       <li>
+                                                               <!-- JAL- -->Java 11 Native Desktop installer, standalone JAR
+                                                               and getdown release channels
+                                                       </li>
+                                                       <li>
+                                                               <!--  -->OSX GUI integrations for App menu's 'About' entry and
+                                                               trapping CMD-Q
+                                                       </li>
+                                               </ul></li>
+                               </ul>
         <em>Deprecations</em>
         <ul>
           <li>
             <!-- JAL-3035 -->DAS sequence retrieval and annotation
             capabilities removed from the Jalview Desktop
           </li>
+          <li>
+            <!-- JAL-3063,JAL-3116 -->Castor library for XML marshalling and
+            unmarshalling has been replaced by JAXB for Jalview projects
+            and XML based data retrieval clients</li>
+          <li><!-- JAL-3311 -->Disable VAMSAS menu in preparation for removal</li> 
+          <li><!--  -->Jalview Desktop no longer distributed via Java Web Start</li>
         </ul>
-        <em>Release Processes</em>
+        <em>Development and Release Processes</em>
         <ul>
-          <li>
-          Atlassian Bamboo continuous integration server for
+                                       <li>
+                                               <!-- JAL-3196,JAL-3007 -->Jalview Native Application and
+                                               Installers built with Install4j (licensed to the Jalview open
+                                               source project) rather than InstallAnywhere
+                                       </li>
+                                       <li>
+                                               <!-- JAL-1929 -->Jalview Launcher System to auto-configure memory
+                                               settings, receive over the air updates and launch specific
+                                               versions via (<a href="https://github.com/threerings/getdown">Three
+                                                       Rings' GetDown</a>)
+                                       </li>
+                                       <li>
+                                               <!-- JAL-3196,JAL-3179 -->Build system migrated from Ant to Gradle
+                                       </li>
+                                       <li>
+                                               <!-- JAL-3225 -->Eclipse project configuration managed with
+                                               gradle-eclipse
+                                       </li>
+          <li>
+          Atlassian Bamboo continuous integration for
             unattended Test Suite execution</li>
           <li>
             <!-- JAL-2864 -->Memory test suite to detect leaks in common
             operations</li>
           <li>
-            <!-- JAL-3140 -->IntervalStoreJ (new updatable NCList
-            implementation) used for Sequence Feature collections</li>
-          <li>
-            <!-- JAL-3063,JAL-3116 -->Castor library for XML marshalling and
-            unmarshalling has been replaced by JAXB for Jalview projects
-            and XML based data retrieval clients</li>
+            <!-- JAL-3140 -->IntervalStoreJ (NCList
+            implementation that alows updates) used for Sequence Feature collections</li>          
         </ul>
       </td>
     <td align="left" valign="top">
@@ -192,6 +265,9 @@ li:before {
             <!-- JAL-2750 -->Tree and PCA calculation fails for selected
             region if columns were selected by dragging right-to-left
             and the mouse moved to the left of the first column</li>
+            <li>
+            <!-- JAL-3218 -->Couldn't hide selected columns adjacent 
+            to a hidden column marker via scale popup menu</li>
           <li>
             <!-- JAL-2846 -->Error message for trying to load in invalid
             URLs doesn't tell users the invalid URL</li>
@@ -247,6 +323,8 @@ li:before {
           <li>
             <!-- JAL-2898 -->stop_gained variants not shown correctly on peptide sequence</li>
           <li>
+            <!-- JAL-3021 -->Sequence Details report opens positioned to top of report</li>
+          <li>
             <!-- JAL-914 -->Help page can be opened twice</li>
         </ul>
         <em>Editing</em>
index 1f183af..5f73227 100644 (file)
@@ -35,6 +35,13 @@ public class BuildDetails implements BuildDetailsI
 
   }
 
+  /**
+   * update singleton Strings with these build details
+   * 
+   * @param version
+   * @param buildDate
+   * @param installation
+   */
   public BuildDetails(String version, String buildDate, String installation)
   {
     BuildDetails.version = version;
@@ -42,6 +49,7 @@ public class BuildDetails implements BuildDetailsI
     BuildDetails.installation = installation;
   }
 
+  @Override
   public String getBuildDate()
   {
     return buildDate;
@@ -52,6 +60,7 @@ public class BuildDetails implements BuildDetailsI
     BuildDetails.buildDate = buildDate;
   }
 
+  @Override
   public String getVersion()
   {
     return version;
@@ -62,6 +71,7 @@ public class BuildDetails implements BuildDetailsI
     BuildDetails.version = version;
   }
 
+  @Override
   public String getInstallation()
   {
     return installation;
index 19aa800..f4b4aac 100755 (executable)
@@ -405,41 +405,7 @@ public class Cache
       applicationProperties.remove("YEAR");
     }
 
-    // FIND THE VERSION NUMBER AND BUILD DATE FROM jalview.jar
-    // MUST FOLLOW READING OF LOCAL PROPERTIES FILE AS THE
-    // VERSION MAY HAVE CHANGED SINCE LAST USING JALVIEW
-    try
-    {
-      String buildDetails = "jar:".concat(Cache.class.getProtectionDomain()
-              .getCodeSource().getLocation().toString()
-              .concat("!/.build_properties"));
-
-      java.net.URL localJarFileURL = new java.net.URL(buildDetails);
-
-      InputStream in = localJarFileURL.openStream();
-      applicationProperties.load(in);
-      in.close();
-    } catch (Exception ex)
-    {
-      System.out.println("Error reading build details: " + ex);
-      applicationProperties.remove("VERSION");
-    }
-
-    String jnlpVersion = System.getProperty("jalview.version");
-    String codeVersion = getProperty("VERSION");
-    String codeInstallation = getProperty("INSTALLATION");
-    if (codeVersion == null)
-    {
-      // THIS SHOULD ONLY BE THE CASE WHEN TESTING!!
-      codeVersion = "Test";
-      jnlpVersion = "Test";
-      codeInstallation = "";
-    }
-    else
-    {
-      codeInstallation = " (" + codeInstallation + ")";
-    }
-    new BuildDetails(codeVersion, null, codeInstallation);
+    loadBuildProperties(false);
 
     SiftsSettings
             .setMapWithSifts(Cache.getDefault("MAP_WITH_SIFTS", false));
@@ -459,9 +425,6 @@ public class Cache
             "http://www.jalview.org/services/identifiers"));
     IdOrgSettings.setDownloadLocation(ID_ORG_FILE);
 
-    System.out
-            .println("Jalview Version: " + codeVersion + codeInstallation);
-
     StructureImportSettings.setDefaultStructureFileFormat(jalview.bin.Cache
             .getDefault("PDB_DOWNLOAD_FORMAT", PDB_DOWNLOAD_FORMAT));
     StructureImportSettings
@@ -469,8 +432,13 @@ public class Cache
     // StructureImportSettings
     // .setDefaultPDBFileParser(jalview.bin.Cache.getDefault(
     // "DEFAULT_PDB_FILE_PARSER", DEFAULT_PDB_FILE_PARSER));
-    // jnlpVersion will be null if we're using InstallAnywhere
+
+    String jnlpVersion = System.getProperty("jalview.version");
+
+    // jnlpVersion will be null if a latest version check for the channel needs to
+    // be done
     // Dont do this check if running in headless mode
+
     if (jnlpVersion == null && getDefault("VERSION_CHECK", true)
             && (System.getProperty("java.awt.headless") == null || System
                     .getProperty("java.awt.headless").equals("false")))
@@ -541,8 +509,6 @@ public class Cache
       }
     }
 
-    setProperty("VERSION", codeVersion);
-
     // LOAD USERDEFINED COLOURS
     jalview.bin.Cache
             .initUserColourSchemes(getProperty("USER_DEFINED_COLOURS"));
@@ -550,6 +516,50 @@ public class Cache
             false);
   }
 
+  public static void loadBuildProperties(boolean reportVersion)
+  {
+    String codeInstallation = getProperty("INSTALLATION");
+    boolean printV = codeInstallation == null;
+
+    // FIND THE VERSION NUMBER AND BUILD DATE FROM jalview.jar
+    try
+    {
+      String buildDetails = "jar:".concat(Cache.class.getProtectionDomain()
+              .getCodeSource().getLocation().toString()
+              .concat("!/.build_properties"));
+
+      java.net.URL localJarFileURL = new java.net.URL(buildDetails);
+
+      InputStream in = localJarFileURL.openStream();
+      applicationProperties.load(in);
+      in.close();
+    } catch (Exception ex)
+    {
+      System.out.println("Error reading build details: " + ex);
+      applicationProperties.remove("VERSION");
+    }
+    String codeVersion = getProperty("VERSION");
+    codeInstallation = getProperty("INSTALLATION");
+
+    if (codeVersion == null)
+    {
+      // THIS SHOULD ONLY BE THE CASE WHEN TESTING!!
+      codeVersion = "Test";
+      codeInstallation = "";
+    }
+    else
+    {
+      codeInstallation = " (" + codeInstallation + ")";
+    }
+    setProperty("VERSION", codeVersion);
+    new BuildDetails(codeVersion, null, codeInstallation);
+    if (printV && reportVersion)
+    {
+      System.out
+            .println("Jalview Version: " + codeVersion + codeInstallation);
+    }
+  }
+
   private static void deleteBuildProperties()
   {
     applicationProperties.remove("LATEST_VERSION");
@@ -640,7 +650,7 @@ public class Cache
     try
     {
       oldValue = applicationProperties.setProperty(key, obj);
-      if (!propsAreReadOnly)
+      if (propertiesFile != null && !propsAreReadOnly)
       {
         FileOutputStream out = new FileOutputStream(propertiesFile);
         applicationProperties.store(out, "---JalviewX Properties File---");
@@ -1063,4 +1073,43 @@ public class Cache
       }
     }
   }
+
+  /**
+   * 
+   * @return Jalview version, build details and JVM platform version for console
+   */
+  public static String getVersionDetailsForConsole()
+  {
+    return "Jalview Version: "
+            + jalview.bin.Cache.getDefault("VERSION", "TEST")
+            + "\n" + "Jalview Installation: "
+            + jalview.bin.Cache.getDefault("INSTALLATION",
+                    "unknown")
+            + "\n" + "Build Date: "
+            + jalview.bin.Cache.getDefault("BUILD_DATE", "unknown")
+            + "\n" + "Java version: "
+            + System.getProperty("java.version") + "\n"
+            + System.getProperty("os.arch") + " "
+            + System.getProperty("os.name") + " "
+            + System.getProperty("os.version")
+            + (jalview.bin.Cache.getDefault("VERSION", "TEST")
+                    .equals("DEVELOPMENT")
+                            ? "\nJava path:"
+                                    + System.getProperty(
+                                            "java.home")
+                                    + File.separator + "bin"
+                                    + File.separator + "java"
+                            : "");
+  }
+
+  /**
+   * 
+   * @return build details as reported in splashscreen
+   */
+  public static String getBuildDetailsForSplash()
+  {
+    // consider returning more human friendly info
+    // eg 'built from Source' or update channel
+    return jalview.bin.Cache.getDefault("INSTALLATION", "unknown");
+  }
 }
index 449c1fb..74889d7 100755 (executable)
@@ -202,6 +202,8 @@ public class Jalview
     System.out.println(System.getProperty("os.arch") + " "
             + System.getProperty("os.name") + " "
             + System.getProperty("os.version"));
+    // report Jalview version
+    Cache.loadBuildProperties(true);
 
     String appdirString = System.getProperty("getdownappdir");
     if (appdirString != null && appdirString.length() > 0)
index 744191d..99ebc69 100644 (file)
@@ -130,6 +130,7 @@ class EnsemblFeatures extends EnsemblRestClient
           int end = Integer.parseInt(obj.get("end").toString());
           String source = obj.get("source").toString();
           String strand = obj.get("strand").toString();
+          Object phase = obj.get("phase");
           String alleles = JSONUtils
                   .arrayToList((JSONArray) obj.get("alleles"));
           String clinSig = JSONUtils
@@ -155,6 +156,10 @@ class EnsemblFeatures extends EnsemblRestClient
           SequenceFeature sf = new SequenceFeature(type, desc, start, end,
                   source);
           sf.setStrand("1".equals(strand) ? "+" : "-");
+          if (phase != null)
+          {
+            sf.setPhase(phase.toString());
+          }
           setFeatureAttribute(sf, obj, "id");
           setFeatureAttribute(sf, obj, "Parent");
           setFeatureAttribute(sf, obj, "consequence_type");
index 0523d41..cf91b9c 100644 (file)
@@ -424,26 +424,7 @@ public class Desktop extends jalview.jbgui.GDesktop
     }
     jconsole = new Console(this, showjconsole);
     // add essential build information
-    jconsole.setHeader(
-            "Jalview Version: " + jalview.bin.Cache.getProperty("VERSION")
-                    + "\n" + "Jalview Installation: "
-                    + jalview.bin.Cache.getDefault("INSTALLATION",
-                            "unknown")
-                    + "\n" + "Build Date: "
-                    + jalview.bin.Cache.getDefault("BUILD_DATE", "unknown")
-                    + "\n" + "Java version: "
-                    + System.getProperty("java.version") + "\n"
-                    + System.getProperty("os.arch") + " "
-                    + System.getProperty("os.name") + " "
-                    + System.getProperty("os.version")
-                    + (jalview.bin.Cache.getProperty("VERSION").equals("DEVELOPMENT")
-                                    ? "\nJava path:"
-                                            + System.getProperty(
-                                                    "java.home")
-                                            + File.separator + "bin"
-                                            + File.separator + "java"
-                                    : "")
-            );
+    jconsole.setHeader(jalview.bin.Cache.getVersionDetailsForConsole());
 
     showConsole(showjconsole);
 
@@ -1376,9 +1357,10 @@ public class Desktop extends jalview.jbgui.GDesktop
       message.append("<h1><strong>Version: "
               + jalview.bin.Cache.getProperty("VERSION")
               + "</strong></h1>");
-      message.append("<strong>Last Updated: <em>"
+      message.append("<strong>Built: <em>"
               + jalview.bin.Cache.getDefault("BUILD_DATE", "unknown")
-              + "</em></strong>");
+              + "</em> from " + jalview.bin.Cache.getBuildDetailsForSplash()
+              + "</strong>");
 
     }
     else
@@ -1393,7 +1375,8 @@ public class Desktop extends jalview.jbgui.GDesktop
     if (jalview.bin.Cache.getDefault("LATEST_VERSION", "Checking")
             .equals("Checking"))
     {
-      message.append("<br>...Checking latest version...</br>");
+      // JBP removed this message for 2.11: May be reinstated in future version
+      // message.append("<br>...Checking latest version...</br>");
     }
     else if (!jalview.bin.Cache.getDefault("LATEST_VERSION", "Checking")
             .equals(jalview.bin.Cache.getProperty("VERSION")))
index 72e906c..7d354e0 100644 (file)
@@ -70,6 +70,7 @@ public class SequenceOntologyLite implements SequenceOntologyI
     { "snRNA", "transcript" },
     { "miRNA", "transcript" },
     { "lincRNA", "transcript" },
+    { "lnc_RNA", "transcript" },
     { "rRNA", "transcript" },
     { "mRNA", "transcript" },
     // there are many more sub-types of ncRNA...
index c1d8228..e8558fa 100644 (file)
@@ -132,7 +132,8 @@ public class Platform
         return false;
       }
       return (jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx() // .getMenuShortcutKeyMaskEx()
-              & e.getModifiersEx()) != 0; // getModifiers()) != 0;
+              & jalview.util.ShortcutKeyMaskExWrapper
+                      .getModifiersEx(e)) != 0; // getModifiers()) != 0;
     }
     return e.isControlDown();
   }
index 7292c80..c9ed231 100644 (file)
@@ -1,57 +1,46 @@
 package jalview.util;
 
-import java.awt.Toolkit;
-import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
 
 public class ShortcutKeyMaskExWrapper
 {
 
-  private static boolean init = false;
+  private static final Float specversion;
 
-  private static final Float specversion = Float
-          .parseFloat(System.getProperty("java.specification.version"));
+  private static final float modern;
 
-  private static final float modern = 11;
+  public static final int SHIFT_DOWN_MASK;
 
-  public static int SHIFT_DOWN_MASK = KeyEvent.SHIFT_DOWN_MASK;
+  public static final int ALT_DOWN_MASK;
 
-  public static int ALT_DOWN_MASK = KeyEvent.ALT_DOWN_MASK;
+  private static final ShortcutKeyMaskExWrapperI wrapper;
 
-  public ShortcutKeyMaskExWrapper()
+  static
   {
-  }
+    specversion = Float
+            .parseFloat(System.getProperty("java.specification.version"));
+    modern = 11;
 
-  private static void init()
-  {
-    if (init)
-    {
-      return;
-    }
-    if (specversion < modern)
+    if (specversion >= modern)
     {
-      SHIFT_DOWN_MASK = KeyEvent.SHIFT_MASK;
-      ALT_DOWN_MASK = KeyEvent.ALT_MASK;
+      wrapper = new ShortcutKeyMaskExWrapper11();
     }
     else
     {
-      SHIFT_DOWN_MASK = KeyEvent.SHIFT_DOWN_MASK;
-      ALT_DOWN_MASK = KeyEvent.ALT_DOWN_MASK;
+      wrapper = new ShortcutKeyMaskExWrapper8();
     }
-
-    init = true;
+    SHIFT_DOWN_MASK = wrapper.SHIFT_DOWN_MASK;
+    ALT_DOWN_MASK = wrapper.ALT_DOWN_MASK;
   }
 
   public static int getMenuShortcutKeyMaskEx()
   {
-    init();
-    if (specversion < modern)
-    {
-      return Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
-    }
-    else
-    {
-      return Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx();
-    }
+    return wrapper.getMenuShortcutKeyMaskEx();
+  }
+
+  public static int getModifiersEx(MouseEvent e)
+  {
+    return wrapper.getModifiersEx(e);
   }
 
 }
diff --git a/src/jalview/util/ShortcutKeyMaskExWrapper11.java b/src/jalview/util/ShortcutKeyMaskExWrapper11.java
new file mode 100644 (file)
index 0000000..41a6aa0
--- /dev/null
@@ -0,0 +1,34 @@
+package jalview.util;
+
+import java.awt.GraphicsEnvironment;
+import java.awt.Toolkit;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
+
+public class ShortcutKeyMaskExWrapper11 implements ShortcutKeyMaskExWrapperI
+{
+  public final static int SHIFT_DOWN_MASK = KeyEvent.SHIFT_DOWN_MASK;
+  public final static int ALT_DOWN_MASK = KeyEvent.ALT_DOWN_MASK;
+
+  @Override
+  public int getMenuShortcutKeyMaskEx()
+  {
+    try
+    {
+      if (!GraphicsEnvironment.isHeadless())
+      {
+        return Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx();
+      }
+    } catch (java.lang.Throwable t)
+    {
+    }
+    return 0;
+  }
+
+  @Override
+  public int getModifiersEx(MouseEvent e)
+  {
+    return e.getModifiersEx();
+  }
+
+}
diff --git a/src/jalview/util/ShortcutKeyMaskExWrapper8.java b/src/jalview/util/ShortcutKeyMaskExWrapper8.java
new file mode 100644 (file)
index 0000000..78254b5
--- /dev/null
@@ -0,0 +1,34 @@
+package jalview.util;
+
+import java.awt.GraphicsEnvironment;
+import java.awt.Toolkit;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
+
+public class ShortcutKeyMaskExWrapper8 implements ShortcutKeyMaskExWrapperI
+{
+  public final static int SHIFT_DOWN_MASK = KeyEvent.SHIFT_MASK;
+  public final static int ALT_DOWN_MASK = KeyEvent.ALT_MASK;
+
+  @Override
+  public int getMenuShortcutKeyMaskEx()
+  {
+    try
+    {
+      if (!GraphicsEnvironment.isHeadless())
+      {
+        return Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
+      }
+    } catch (java.lang.Throwable t)
+    {
+    }
+    return 0;
+  }
+
+  @Override
+  public int getModifiersEx(MouseEvent e)
+  {
+    return e.getModifiers();
+  }
+
+}
diff --git a/src/jalview/util/ShortcutKeyMaskExWrapperI.java b/src/jalview/util/ShortcutKeyMaskExWrapperI.java
new file mode 100644 (file)
index 0000000..bf17259
--- /dev/null
@@ -0,0 +1,14 @@
+package jalview.util;
+
+import java.awt.event.MouseEvent;
+
+public interface ShortcutKeyMaskExWrapperI
+{
+  public static int SHIFT_DOWN_MASK = 0;
+
+  public static int ALT_DOWN_MASK = 0;
+
+  public int getMenuShortcutKeyMaskEx();
+
+  public int getModifiersEx(MouseEvent e);
+}