JAL-4409 more places to check for jalviewd://
authorBen Soares <b.soares@dundee.ac.uk>
Thu, 16 May 2024 13:44:04 +0000 (14:44 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Thu, 16 May 2024 13:44:04 +0000 (14:44 +0100)
getdown/lib/getdown-core.jar
getdown/lib/getdown-launcher-local.jar
getdown/lib/getdown-launcher.jar
getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java
getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java
j11lib/getdown-core.jar
j8lib/getdown-core.jar

index a934f39..c779464 100644 (file)
Binary files a/getdown/lib/getdown-core.jar and b/getdown/lib/getdown-core.jar differ
index 6e97e11..11af9c3 100644 (file)
Binary files a/getdown/lib/getdown-launcher-local.jar and b/getdown/lib/getdown-launcher-local.jar differ
index f49ff16..fe23090 100644 (file)
Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ
index d23735d..408e9fa 100644 (file)
@@ -1955,10 +1955,13 @@ public class Application
 
         // check for locator file.  Only allow one locator file to be double clicked (if multiple files opened, ignore locator files)
         String locatorFilename = filenames.length >= 1 ? filenames[0] : null;
-        if (
-                !StringUtil.isBlank(locatorFilename)
-                && locatorFilename.toLowerCase(Locale.ROOT).endsWith("."+Application.LOCATOR_FILE_EXTENSION)
-                ) {
+        if (!StringUtil.isBlank(locatorFilename)
+              && locatorFilename.toLowerCase(Locale.ROOT).endsWith("."+Application.LOCATOR_FILE_EXTENSION)) {
+          if (HttpUtils.isJalviewSchemeUri(locatorFilename)) {
+            locatorFilename = HttpUtils.equivalentJalviewUrl(locatorFilename);
+          }
+          log.info("##### SETTING LOCATORFILENAME '"+ locatorFilename +"'");
+
           setLocatorFile(locatorFilename);
           // remove the locator filename from the filenames array
           String[] otherFilenames = new String[filenames.length - 1];
@@ -1969,9 +1972,11 @@ public class Application
         for (int i = 0; i < filenames.length; i++) {
           String filename = filenames[i];
           // skip any other locator files in a multiple file list
-          if (HttpUtils.isJalviewSchemeUri(filename)) {
-            setJalviewUri(filename);
-          } else if (! filename.toLowerCase(Locale.ROOT).endsWith("."+Application.LOCATOR_FILE_EXTENSION)) {
+          if (! filename.toLowerCase(Locale.ROOT).endsWith("."+Application.LOCATOR_FILE_EXTENSION)) {
+            if (HttpUtils.isJalviewSchemeUri(filename)) {
+              filename = HttpUtils.equivalentJalviewUrl(filename);
+            }
+            log.info("##### ADDING FILENAME '"+ filename +"'");
             addStartupFile(filename);
           }
         }
index fee1d3e..58cf8cd 100644 (file)
@@ -35,6 +35,7 @@ import com.threerings.getdown.util.LaunchUtil;
 import com.threerings.getdown.util.StringUtil;
 import static com.threerings.getdown.Log.log;
 import jalview.bin.StartupNotificationListener;
+import jalview.util.HttpUtils;
 
 /**
  * The main application entry point for Getdown.
@@ -121,6 +122,7 @@ public class GetdownApp
     log.info("-- Cur dir: " + System.getProperty("user.dir"));
     log.info("-- Launcher version: "+Build.version());
     log.info("-- startupFilesParameterString: " + startupFilesParameterString);
+    log.info("-- getStartupFilesParameterString(): " + getStartupFilesParameterString());
     log.info("---------------------------------------------");
 
     Getdown app = new Getdown(envc) {
@@ -298,6 +300,9 @@ public class GetdownApp
   }
   
   public static String getStartupFilesParameterString() {
+    if (HttpUtils.isJalviewSchemeUri(startupFilesParameterString)) {
+      return HttpUtils.equivalentJalviewUrl(startupFilesParameterString);
+    }
     return startupFilesParameterString;
   }
 }
index a934f39..c779464 100644 (file)
Binary files a/j11lib/getdown-core.jar and b/j11lib/getdown-core.jar differ
index a934f39..c779464 100644 (file)
Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ