Merge branch 'patch/JAL-3976_3dbeaconsnull' into develop
authorJim Procter <j.procter@dundee.ac.uk>
Wed, 30 Mar 2022 17:35:07 +0000 (18:35 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Wed, 30 Mar 2022 17:35:07 +0000 (18:35 +0100)
RELEASE
build.gradle
help/help/html/releases.html
src/jalview/gui/FeatureEditor.java
src/jalview/gui/JvOptionPane.java
src/jalview/gui/TextColourChooser.java

diff --git a/RELEASE b/RELEASE
index ddc7974..dbf7cac 100644 (file)
--- a/RELEASE
+++ b/RELEASE
@@ -1,2 +1,2 @@
 jalview.release=releases/Release_2_11_2_Branch
-jalview.version=2.11.2.0
+jalview.version=2.11.2.1
index 9b1eb69..b4636bc 100644 (file)
@@ -42,7 +42,7 @@ plugins {
   id 'com.github.johnrengelman.shadow' version '4.0.3'
   id 'com.install4j.gradle' version '9.0.6'
   id 'com.dorongold.task-tree' version '1.5' // only needed to display task dependency tree with  gradle task1 [task2 ...] taskTree
-  id 'com.palantir.git-version' version '0.12.3'
+  id 'com.palantir.git-version' version '0.13.0' apply false
 }
 
 repositories {
@@ -115,7 +115,7 @@ ext {
   // Import releaseProps from the RELEASE file
   // or a file specified via JALVIEW_RELEASE_FILE if defined
   // Expect jalview.version and target release branch in jalview.release        
-  def releaseProps = new Properties();
+  releaseProps = new Properties();
   def releasePropFile = findProperty("JALVIEW_RELEASE_FILE");
   def defaultReleasePropFile = "${jalviewDirAbsolutePath}/RELEASE";
   try {
@@ -383,9 +383,21 @@ ext {
   modules_compileClasspath = fileTree(dir: "${jalviewDir}/${j11modDir}", include: ["*.jar"])
   modules_runtimeClasspath = modules_compileClasspath
   */
-  def details = versionDetails()
-  gitHash = details.gitHash
-  gitBranch = details.branchName
+
+  gitHash = "SOURCE"
+  gitBranch = "Source"
+  try {
+    apply plugin: "com.palantir.git-version"
+    def details = versionDetails()
+    gitHash = details.gitHash
+    gitBranch = details.branchName
+  } catch(org.gradle.api.internal.plugins.PluginApplicationException e) {
+    println("Not in a git repository. Using git values from RELEASE properties file.")
+    gitHash = releaseProps.getProperty("git.hash")
+    gitBranch = releaseProps.getProperty("git.branch")
+  } catch(java.lang.RuntimeException e1) {
+    throw new GradleException("Error with git-version plugin.  Directory '.git' exists but versionDetails() cannot be found.")
+  }
 
   println("Using a ${CHANNEL} profile.")
 
@@ -2004,6 +2016,22 @@ spotless {
   }
 }
 
+task createSourceReleaseProperties(type: WriteProperties) {
+  group = "distribution"
+  description = "Create the source RELEASE properties file"
+  
+  def sourceTarBuildDir = "${buildDir}/sourceTar"
+  def sourceReleasePropertiesFile = "${sourceTarBuildDir}/RELEASE"
+  outputFile (sourceReleasePropertiesFile)
+
+  doFirst {
+    releaseProps.each{ key, val -> property key, val }
+    property "git.branch", gitBranch
+    property "git.hash", gitHash
+  }
+
+  outputs.file(outputFile)
+}
 
 task sourceDist(type: Tar) {
   group "distribution"
@@ -2011,6 +2039,9 @@ task sourceDist(type: Tar) {
 
   dependsOn createBuildProperties
   dependsOn convertMdFiles
+  dependsOn eclipseAllPreferences
+  dependsOn createSourceReleaseProperties
+
 
   def VERSION_UNDERSCORES = JALVIEW_VERSION.replaceAll("\\.", "_")
   def outputFileName = "${project.name}_${VERSION_UNDERSCORES}.tar.gz"
@@ -2035,6 +2066,7 @@ task sourceDist(type: Tar) {
     "*locales/**",
     "utils/InstallAnywhere",
     "**/*.log",
+    "RELEASE",
   ] 
   def PROCESS_FILES=[
     "AUTHORS",
@@ -2044,7 +2076,6 @@ task sourceDist(type: Tar) {
     "FEATURETODO",
     "LICENSE",
     "**/README",
-    "RELEASE",
     "THIRDPARTYLIBS",
     "TESTNG",
     "build.gradle",
@@ -2059,7 +2090,9 @@ task sourceDist(type: Tar) {
     "**/*.sh",
   ]
   def INCLUDE_FILES=[
-    ".settings/org.eclipse.jdt.core.jalview.prefs",
+    ".classpath",
+    ".settings/org.eclipse.buildship.core.prefs",
+    ".settings/org.eclipse.jdt.core.prefs"
   ]
 
   from(jalviewDir) {
@@ -2106,6 +2139,10 @@ task sourceDist(type: Tar) {
     })
   }
 
+  def sourceTarBuildDir = "${buildDir}/sourceTar"
+  from(sourceTarBuildDir) {
+    // this includes the appended RELEASE properties file
+  }
 }
 
 
index b9a27ff..6f72dcb 100755 (executable)
@@ -58,6 +58,64 @@ li:before {
     </tr>
     <tr>
       <td width="60" align="center" nowrap><strong><a
+          id="Jalview.2.11.2">2.11.2</a><a id="Jalview.2.11.2.0">.1</a><br />
+          <em>31/03/2022</em></strong></td>
+      <td align="left" valign="top">
+        <ul>
+          <li>
+            <!-- JAL-3973 -->Distribution Tarball includes git commit
+            and branch details
+          </li>
+        </ul>
+      </td>
+      <td align="left" valign="top">
+        <ul>
+          <li>
+            <!-- JAL-3975 -->Keyboard mode (F2) stops working after
+            using the "Create sequence feature" dialog
+          </li>
+          <li>
+            <!-- JAL-3976 -->3D Structure chooser fails to select
+            structures from 3D-beacons and pops up a 'null' dialog
+          </li>
+          <li>
+            <!-- JAL-3973 -->Cannot build Jalview 2.11.2.0 via gradle
+            from its source tarball
+          </li>
+        </ul> <em>New Known Issues</em>
+        <ul>
+          <li>
+            <!-- JAL-3984 -->Keyboard mode (F2) stops working after
+            using the "Text Colour" dialog
+          </li>
+          <li>
+            <!-- JAL-3873 -->Colour by->all views doesn't allow
+            colouring same structure from different views (since
+            2.11.2.0)
+          </li>
+          <li>
+            <!-- JAL-3980 --> Sequence ID tooltip not showing during
+            long running retrieval/crossref operations (affects at least
+            2.11.1 onwards)
+          </li>
+          <li>
+            <!-- JAL-3886 -->Pfam and Rfam alignment retrieval as
+            gzipped stockholm doesn't work on JalviewJS build of 2.11.2
+          </li>
+          <li>
+            <!-- JAL-3972 -->Java 11 Only: Jalview 2.11.2.0 OSX install
+            not working due to VAqua requiring
+            sun.awt.image.MultiResolutionImage
+          </li>
+          <li>
+            <!-- JAL-3981 -->Sequence Details can take a long time to be
+            displayed for heavily annotated sequences (all versions)
+          </li>
+        </ul>
+      </td>
+    </tr>
+    <tr>
+      <td width="60" align="center" nowrap><strong><a
           id="Jalview.2.11.2">2.11.2</a><a id="Jalview.2.11.2.0">.0</a><br />
           <em>10/03/2022</em></strong></td>
       <td align="left" valign="top">
@@ -162,8 +220,8 @@ li:before {
               application from command line. <!-- JAL-3523 -->
           </em>
           </li>
-          <li>Notarized MacOS installer for compliance with
-            latest OSX releases (Monterey)</li>
+          <li>Notarized MacOS installer for compliance with latest
+            OSX releases (Monterey)</li>
           <li>
             <!-- JAL-3805 -->Uninstaller application for old
             (InstallAnywhere based) Jalview installations removed from
@@ -228,7 +286,9 @@ li:before {
           <li>
             <!--   -->First integrated JalviewJS and Jalview release
           </li>
-          <li><!-- JAL-3841,JAL-3248 -->Updated README and doc/building.md</li>
+          <li>
+            <!-- JAL-3841,JAL-3248 -->Updated README and doc/building.md
+          </li>
           <li>
             <!-- JAL-3789, JAL-3679 -->Improved JalviewJS/Jalview build
             process, added support for system package provided eclipse
@@ -246,7 +306,7 @@ li:before {
           </li>
         </ul>
       </td>
-      <td>
+      <td align="left" valign="top">
         <ul>
           <li>
             <!-- JAL-3674 -->Slow structure commands can block Jalview
index 721c798..844eee4 100644 (file)
  */
 package jalview.gui;
 
-import jalview.api.FeatureColourI;
-import jalview.datamodel.SearchResults;
-import jalview.datamodel.SearchResultsI;
-import jalview.datamodel.SequenceFeature;
-import jalview.datamodel.SequenceI;
-import jalview.gui.JalviewColourChooser.ColourChooserListener;
-import jalview.io.FeaturesFile;
-import jalview.schemes.FeatureColour;
-import jalview.util.ColorUtils;
-import jalview.util.MessageManager;
-
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.Dimension;
@@ -59,6 +48,17 @@ import javax.swing.event.ChangeListener;
 import javax.swing.event.DocumentEvent;
 import javax.swing.event.DocumentListener;
 
+import jalview.api.FeatureColourI;
+import jalview.datamodel.SearchResults;
+import jalview.datamodel.SearchResultsI;
+import jalview.datamodel.SequenceFeature;
+import jalview.datamodel.SequenceI;
+import jalview.gui.JalviewColourChooser.ColourChooserListener;
+import jalview.io.FeaturesFile;
+import jalview.schemes.FeatureColour;
+import jalview.util.ColorUtils;
+import jalview.util.MessageManager;
+
 /**
  * Provides a dialog allowing the user to add new features, or amend or delete
  * existing features
@@ -434,7 +434,7 @@ public class FeatureEditor
      * set dialog action handlers for OK (create/Amend) and Cancel options
      * also for Delete if applicable (when amending features)
      */
-    JvOptionPane dialog = JvOptionPane.newOptionDialog(Desktop.desktop)
+    JvOptionPane dialog = JvOptionPane.newOptionDialog(ap.alignFrame)
             .setResponseHandler(0, okAction)
             .setResponseHandler(2, cancelAction);
     if (!forCreate)
@@ -504,6 +504,7 @@ public class FeatureEditor
     {
       boolean useLastDefaults = features.get(0).getType() == null;
 
+      @Override
       public void run()
       {
         final String enteredType = name.getText().trim();
@@ -560,6 +561,7 @@ public class FeatureEditor
   {
     Runnable deleteAction = new Runnable()
     {
+      @Override
       public void run()
       {
         SequenceFeature sf = features.get(featureIndex);
@@ -668,6 +670,7 @@ public class FeatureEditor
 
       String featureGroup = group.getText();
 
+      @Override
       public void run()
       {
         final String enteredType = name.getText().trim();
index 22396fb..733223d 100644 (file)
@@ -21,9 +21,6 @@
 
 package jalview.gui;
 
-import jalview.util.Platform;
-import jalview.util.dialogrunner.DialogRunnerI;
-
 import java.awt.Component;
 import java.awt.HeadlessException;
 import java.beans.PropertyChangeEvent;
@@ -37,6 +34,9 @@ import javax.swing.Icon;
 import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 
+import jalview.util.Platform;
+import jalview.util.dialogrunner.DialogRunnerI;
+
 public class JvOptionPane extends JOptionPane
         implements DialogRunnerI, PropertyChangeListener
 {
@@ -874,6 +874,7 @@ public class JvOptionPane extends JOptionPane
     if (action != null)
     {
       action.run();
+      parentComponent.requestFocus();
     }
   }
 }
index 17c1f29..f9ff337 100644 (file)
  */
 package jalview.gui;
 
-import jalview.datamodel.SequenceGroup;
-import jalview.gui.JalviewColourChooser.ColourChooserListener;
-import jalview.util.MessageManager;
-
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.Dimension;
@@ -39,6 +35,10 @@ import javax.swing.JSlider;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
 
+import jalview.datamodel.SequenceGroup;
+import jalview.gui.JalviewColourChooser.ColourChooserListener;
+import jalview.util.MessageManager;
+
 public class TextColourChooser
 {
   AlignmentPanel ap;
@@ -159,9 +159,9 @@ public class TextColourChooser
         restoreInitialSettings();
       }
     };
-    JvOptionPane.newOptionDialog(alignPanel).setResponseHandler(1, action)
-            .showInternalDialog(bigpanel, title,
-                    JvOptionPane.YES_NO_CANCEL_OPTION,
+    JvOptionPane.newOptionDialog(alignPanel.alignFrame)
+            .setResponseHandler(1, action).showInternalDialog(bigpanel,
+                    title, JvOptionPane.YES_NO_CANCEL_OPTION,
                     JvOptionPane.PLAIN_MESSAGE, null, options,
                     MessageManager.getString("action.ok"));
   }