* configure 'full' SO model if preferences say to,
* else use the default (SO Lite)
*/
- if (Cache.getDefault(Preferences.USE_FULL_SO, false))
+ // BH NOTE 2020.06.01 Jalview-JS/develop has this true for Java, false for
+ // JavaScript
+ if (Cache.getDefault(Preferences.USE_FULL_SO, !isJS))
{
SequenceOntologyFactory.setSequenceOntology(new SequenceOntology());
}
try
{
ArgsParser aparser = new ArgsParser(args);
- return parseArguments(aparser, false);
+ parseArguments(aparser, false);
+ return null;
} catch (Throwable t)
{
return t;
*
* @param aparser
* @param isStartup
- * @return
+ * @return null, indicating no error
*/
- private Object parseArguments(ArgsParser aparser, boolean isStartup)
+ private void parseArguments(ArgsParser aparser, boolean isStartup)
{
boolean isJS = Platform.isJS();
System.out.println("No files to open!");
System.exit(1);
}
- boolean haveImport = checkStartVamas(aparser);
// Finally, deal with the remaining input data.
long progress = -1;
if (file == null && isJavaAppletTag)
"CMD [-open2 " + file2 + "] executed successfully!");
}
}
-
setCurrentAlignFrame(af);
- // TODO: file2 How to implement file2 for the applet spit screen?
-
data = aparser.getValue(ArgsParser.COLOUR, true);
if (data != null)
{
}
}
}
+
AlignFrame startUpAlframe = null;
// We'll only open the default file if the desktop is visible.
// And the user
// ////////////////////
- if (!isJS && !headless && file == null && !haveImport
+ if (!isJS && !headless && file == null
&& jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true))
/**
* Java only
desktop.setInBatchMode(false);
}
- return null;
- }
-
- private boolean checkStartVamas(ArgsParser aparser)
- {
- String vamsasImport = aparser.getValue(ArgsParser.VDOC);
- String vamsasSession = aparser.getValue(ArgsParser.VSESS);
- if (vamsasImport == null && vamsasSession == null)
- {
- return false;
- }
- if (desktop == null || headless)
- {
- System.out.println(
- "Headless vamsas sessions not yet supported. Sorry.");
- System.exit(1);
- }
- boolean haveImport = (vamsasImport != null);
- if (haveImport)
- {
- // if we have a file, start a new session and import it.
- boolean inSession = false;
- try
- {
- DataSourceType viprotocol = AppletFormatAdapter
- .checkProtocol(vamsasImport);
- if (viprotocol == DataSourceType.FILE)
- {
- inSession = desktop.vamsasImport(new File(vamsasImport));
- }
- else if (viprotocol == DataSourceType.URL)
- {
- inSession = desktop.vamsasImport(new URL(vamsasImport));
- }
-
- } catch (Exception e)
- {
- System.err.println("Exeption when importing " + vamsasImport
- + " as a vamsas document.");
- e.printStackTrace();
- }
- if (!inSession)
- {
- System.err.println("Failed to import " + vamsasImport
- + " as a vamsas document.");
- }
- else
- {
- System.out.println("Imported Successfully into new session "
- + desktop.getVamsasApplication().getCurrentSession());
- }
- }
- if (vamsasSession != null)
- {
- if (vamsasImport != null)
- {
- // close the newly imported session and import the Jalview specific
- // remnants into the new session later on.
- desktop.vamsasStop_actionPerformed(null);
- }
- // now join the new session
- try
- {
- if (desktop.joinVamsasSession(vamsasSession))
- {
- System.out.println(
- "Successfully joined vamsas session " + vamsasSession);
- }
- else
- {
- System.err.println("WARNING: Failed to join vamsas session "
- + vamsasSession);
- }
- } catch (Exception e)
- {
- System.err.println(
- "ERROR: Failed to join vamsas session " + vamsasSession);
- e.printStackTrace();
- }
- if (vamsasImport != null)
- {
- // the Jalview specific remnants can now be imported into the new
- // session at the user's leisure.
- Cache.log.info(
- "Skipping Push for import of data into existing vamsas session.");
- // TODO:
- // enable
- // this
- // when
- // debugged
- // desktop.getVamsasApplication().push_update();
- }
- }
- return haveImport;
}
/**
imageName = imageFile.getName();
HtmlSvgOutput htmlSVG = new HtmlSvgOutput(af.alignPanel);
htmlSVG.exportHTML(file);
-
System.out.println("Creating HTML image: " + file);
continue;
}