// 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];
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);
}
}
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.
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) {
}
public static String getStartupFilesParameterString() {
+ if (HttpUtils.isJalviewSchemeUri(startupFilesParameterString)) {
+ return HttpUtils.equivalentJalviewUrl(startupFilesParameterString);
+ }
return startupFilesParameterString;
}
}