import jalview.util.Platform;
import jalview.ws.jws2.Jws2Discoverer;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.util.logging.Logger;
import javax.swing.LookAndFeel;
-import javax.swing.Timer;
import javax.swing.UIManager;
import groovy.lang.Binding;
public static AlignFrame currentAlignFrame;
- /**
- * Answers true if Jalview is running as Javascript, else false. The value is
- * set at compile time.
- *
- * @return
- */
- public static boolean isJS()
- {
- return /** @j2sNative true || */
- false;
- }
-
static
{
- if (!isJS())
+ if (!Platform.isJS())
{ // BH 2018
// grab all the rights we can the JVM
Policy.setPolicy(new Policy()
private static void setLogging()
{
// BH - for event debugging in JavaScript (Java mode only)
- if (!(/** @j2sNative true ||*/false))
+ if (!Platform.isJS())
{
Logger.getLogger("").setLevel(Level.ALL);
logClass("java.awt.EventDispatchThread");
void doMain(String[] args)
{
- if (!isJS())
+ if (!Platform.isJS())
{
System.setSecurityManager(null);
}
"CMD [-props " + usrPropsFile + "] executed successfully!");
}
- /**
- * BH 2018 ignoring this section for JS
- *
- * @j2sNative
- */
- {
+ if (!Platform.isJS()) {
if (aparser.contains("help") || aparser.contains("h"))
{
showUsage();
desktop.setInBatchMode(true); // indicate we are starting up
desktop.setVisible(true);
- /**
- * BH 2018 JS bypass this section
- *
- * @j2sNative
- *
- */
- {
+
+ if (!Platform.isJS()) {
desktop.startServiceDiscovery();
if (!aparser.contains("nousagestats"))
{
}
System.out.println("CMD [-open " + file + "] executed successfully!");
- if (!isJS() && !file.startsWith("http://"))
+ if (!Platform.isJS() && !file.startsWith("http://"))
{
if (!(new File(file)).exists())
{
// And the user
// ////////////////////
- if (/** @j2sNative false && */ // BH 2018
- !headless && file == null && vamsasImport == null
+ if (!Platform.isJS() && !headless && file == null && vamsasImport == null
&& jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true))
{
file = jalview.bin.Cache.getDefault("STARTUP_FILE",