// }
public static Jalview getInstance()
{
- System.out.println("Hello, MW!!!!!!!!!!!!");
return (Jalview) ApplicationSingletonProvider
.getInstance(Jalview.class);
}
class FeatureFetcher
{
/*
- * TODO: generalise to track all jalview events to orchestrate batch processing
- * events.
+ * TODO: generalise to track all jalview events to orchestrate batch
+ * processing events.
*/
private int queued = 0;
System.setSecurityManager(null);
}
+ /*
+ * @j2sNative J2S.db._DirectDatabaseCalls["compbio.dundee.ac.uk"]=null;
+ * @j2sNative J2S.db._DirectDatabaseCalls["jalview.org"]=null;
+ *
+ */
System.out
.println("Java version: " + System.getProperty("java.version"));
System.out.println("Java Home: " + System.getProperty("java.home"));
}
headless = true;
}
- if (GraphicsEnvironment.isHeadless())
- {
- headless = true;
- }
- // <<?
-
- // anything else!
final String jabawsUrl = aparser.getValue(ArgsParser.JABAWS);
allowServices = !("none".equals(jabawsUrl));
System.out.println("Error setting Taskbar: " + t.getMessage());
}
desktop.setVisible(true);
-
+ if (Platform.isJS())
+ Cache.setProperty("SHOW_JWS2_SERVICES", "false");
+ if (allowServices)
+ {
+ desktop.startServiceDiscovery();
+ }
if (!isJS)
/**
* Java only
* @j2sIgnore
*/
{
- if (allowServices)
- desktop.startServiceDiscovery();
if (!aparser.contains("nousagestats"))
{
startUsageStats(desktop);
createOutputFiles(aparser, format);
}
}
+ if (headless)
+ {
+ af.getViewport().getCalcManager().shutdown();
+ }
}
// extract groovy arguments before anything else.
// Once all other stuff is done, execute any groovy scripts (in order)
* @param aparser
* @param format
*/
- private void createOutputFiles(ArgsParser aparser,
- FileFormatI format)
+ private void createOutputFiles(ArgsParser aparser, FileFormatI format)
{
AlignFrame af = currentAlignFrame;
while (aparser.getSize() >= 2)
"Creating image map: " + imageFile.getAbsolutePath());
continue;
default:
- // fall through - try to parse as an alignment data export format
- FileFormatI outFormat=null;
- try {
- outFormat = FileFormats.getInstance().forName(outputFormat);
- } catch (Exception formatP) {
- }
- if (outFormat==null) {
- System.out.println("Couldn't parse "+outputFormat+" as a valid Jalview format string.");
- continue;
- }
- if (!outFormat.isWritable())
- {
- System.out.println(
- "This version of Jalview does not support alignment export as "
- + outputFormat);
- continue;
- }
- // record file as it was passed to Jalview so it is recognisable to the CLI caller
- String file;
- fname = new File(file=aparser.nextValue()).getAbsolutePath();
- // JBPNote - yuck - really wish we did have a bean returned from this which gave success/fail like before !
- af.saveAlignment(fname, outFormat);
- if (!af.isSaveAlignmentSuccessful())
- {
- System.out.println("Written alignment in " + outputFormat
- + " format to " + file);
- continue;
- } else {
- System.out.println("Error writing file " + file + " in "
- + outputFormat + " format!!");
- }
+ // fall through - try to parse as an alignment data export format
+ FileFormatI outFormat = null;
+ try
+ {
+ outFormat = FileFormats.getInstance().forName(outputFormat);
+ } catch (Exception formatP)
+ {
+ }
+ if (outFormat == null)
+ {
+ System.out.println("Couldn't parse " + outputFormat
+ + " as a valid Jalview format string.");
+ continue;
+ }
+ if (!outFormat.isWritable())
+ {
+ System.out.println(
+ "This version of Jalview does not support alignment export as "
+ + outputFormat);
+ continue;
+ }
+ // record file as it was passed to Jalview so it is recognisable to the CLI
+ // caller
+ String file;
+ fname = new File(file = aparser.nextValue()).getAbsolutePath();
+ // JBPNote - yuck - really wish we did have a bean returned from this which gave
+ // success/fail like before !
+ af.saveAlignment(fname, outFormat);
+ if (!af.isSaveAlignmentSuccessful())
+ {
+ System.out.println("Written alignment in " + outputFormat
+ + " format to " + file);
+ continue;
+ }
+ else
+ {
+ System.out.println("Error writing file " + file + " in "
+ + outputFormat + " format!!");
+ }
}
}
// ??? Should report - 'ignoring' extra args here...