X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalview.java;h=c27d7afc9273099ebab44e44184bf3c986eaca5d;hb=81ca65d00bdb8a49fa063272ce53fdc8758c2264;hp=b39f0e2cd4b753d9c1102f3d8e63ea6256f8c6f9;hpb=cb597de858c70703321daa67adef5089957e9f55;p=jalview.git diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index b39f0e2..c27d7af 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -510,18 +510,18 @@ public class Jalview implements ApplicationSingletonI } } - // script to execute after all loading is // completed one way or another // extract groovy argument and execute if necessary String groovyscript = (isJS ? null : aparser.getValue(ArgsParser.GROOVY, true)); String file = aparser.getValue(ArgsParser.OPEN, true); - String file2 = (isJavaAppletTag ? aparser.getAppletValue("file2", null) - : null); + // BH this here to allow split frame; not working as of 5/17/2019 + String file2 = aparser.getValue(ArgsParser.OPEN2, true); String fileFormat = (isJavaAppletTag ? aparser.getAppletValue("format", null) : null); + FileFormatI format = null; DataSourceType protocol = null; @@ -533,6 +533,22 @@ public class Jalview implements ApplicationSingletonI boolean haveImport = checkStartVamas(aparser); // Finally, deal with the remaining input data. long progress = -1; + if (file == null && isJavaAppletTag) + { + // Maybe the sequences are added as parameters + StringBuffer data = new StringBuffer("PASTE"); + int i = 1; + while ((file = aparser.getAppletValue("sequence" + i, null)) != null) + { + data.append(file.toString() + "\n"); + i++; + } + if (data.length() > 5) + { + file = data.toString(); + } + } + if (file != null) { if (!headless) @@ -582,8 +598,7 @@ public class Jalview implements ApplicationSingletonI } AlignFrame af = new FileLoader(!headless).loadFileWaitTillLoaded(file, - protocol, - format); + protocol, format); if (af == null) { System.out.println("error"); @@ -602,9 +617,8 @@ public class Jalview implements ApplicationSingletonI { // TODO ? } - AlignFrame af2 = new FileLoader(!headless).loadFileWaitTillLoaded( - file2, - protocol, format); + AlignFrame af2 = new FileLoader(!headless) + .loadFileWaitTillLoaded(file2, protocol, format); if (af2 == null) { System.out.println("error"); @@ -615,6 +629,8 @@ public class Jalview implements ApplicationSingletonI af.getViewport().getAlignment(), af2.getViewport().getAlignment(), "", AlignViewport.SPLIT_FRAME); + System.out.println( + "CMD [-open2 " + file2 + "] executed successfully!"); } } @@ -792,8 +808,7 @@ public class Jalview implements ApplicationSingletonI } startUpAlframe = new FileLoader(!headless) - .loadFileWaitTillLoaded(file, protocol, - format); + .loadFileWaitTillLoaded(file, protocol, format); // extract groovy arguments before anything else. }