X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalview.java;h=d9de4692f1a0ca23eab66edb1d3fa50c584c77c0;hb=1cec732f963ab102c9d8381203df8c8cba2a9ee4;hp=bb2038e889e71e34af4d4edb7275eaba5b1f17bf;hpb=26ee59562604fa9164e895e3ca07e11398a6c8a0;p=jalview.git diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index bb2038e..d9de469 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -146,6 +146,24 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi protected JSFunctionExec jsFunctionExec; + private boolean noCalculation, noMenuBar, noStatus; + + public boolean getStartCalculations() + { + return !noCalculation; + } + + public boolean getAllowMenuBar() + { + return !noMenuBar; + } + + public boolean getShowStatus() + { + return !noStatus; + } + + public static AlignFrame getCurrentAlignFrame() { return getInstance().currentAlignFrame; @@ -255,26 +273,6 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi getInstance().doMain(args); } - /** - * Allow an outside entity to initiate the second half of argument parsing - * (only). - * - * @param args - * @return null is good - */ - @Override - public Object parseArguments(String[] args) - { - - try - { - ArgsParser aparser = new ArgsParser(args); - return parseArguments(aparser, false); - } catch (Throwable t) - { - return t; - } - } private static void logClass(String name) { @@ -553,6 +551,33 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi parseArguments(aparser, true); } + /** + * Allow an outside entity to initiate the second half of argument parsing + * (only). + * + * @param args + * @return null is good + */ + @Override + public Object parseArguments(String[] args) + { + + try + { + ArgsParser aparser = new ArgsParser(args); + return parseArguments(aparser, false); + } catch (Throwable t) + { + return t; + } + } + + /** + * + * @param aparser + * @param isStartup + * @return + */ private Object parseArguments(ArgsParser aparser, boolean isStartup) { boolean isJS = Platform.isJS(); @@ -569,7 +594,6 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi String fileFormat = (isJavaAppletTag ? aparser.getAppletValue("format", null) : null); - FileFormatI format = null; DataSourceType protocol = null; @@ -597,8 +621,11 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi } } + String data; + if (file != null) { + if (!headless) { desktop.setProgressBar( @@ -645,6 +672,32 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi // TODO ? } + if (aparser.contains(ArgsParser.SHOWOVERVIEW)) + { + jalview.bin.Cache.setPropertyNoSave(Preferences.SHOW_OVERVIEW, + "true"); + + System.out.println("CMD [showoverview] executed successfully!"); + } + + if (aparser.contains(ArgsParser.NOMENUBAR)) + { + noMenuBar = true; + System.out.println("CMD [nomenu] executed successfully!"); + } + + if (aparser.contains(ArgsParser.NOSTATUS)) + { + noStatus = true; + System.out.println("CMD [nostatus] executed successfully!"); + } + + if (aparser.contains(ArgsParser.NOCALCULATION)) + { + noCalculation = true; + System.out.println("CMD [nocalculation] executed successfully!"); + } + AlignFrame af = new FileLoader(!headless).loadFileWaitTillLoaded(file, protocol, format); if (af == null) @@ -686,7 +739,7 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi // TODO: file2 How to implement file2 for the applet spit screen? - String data = aparser.getValue(ArgsParser.COLOUR, true); + data = aparser.getValue(ArgsParser.COLOUR, true); if (data != null) { data.replaceAll("%20", " "); @@ -2005,4 +2058,5 @@ public class Jalview implements ApplicationSingletonI, JalviewJSApi } + }