import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
+import java.io.PrintStream;
import java.io.PrintWriter;
import java.net.MalformedURLException;
import java.net.URI;
perms.add(new AllPermission());
return (perms);
}
-
+
@Override
public void refresh()
{
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;
* main class for Jalview application
*
* @param args
- * open <em>filename</em>
+ * open <em>filename</em>
*/
public static void main(String[] args)
{
void doMain(String[] args)
{
System.setSecurityManager(null);
+
+ // set stdout and stderr to file if launched by getdown
+ String appdirString = System.getProperty("getdownappdir");
+ if (appdirString != null)
+ {
+ String logFilename = "output.log";
+ File logFile = new File(appdirString, logFilename);
+ if (logFile.exists())
+ {
+ logFile.delete();
+ }
+ try
+ {
+ PrintStream logOut = new PrintStream(new FileOutputStream(logFile),
+ true);
+ System.setOut(logOut);
+ System.setErr(logOut);
+
+ } catch (IOException ioe)
+ {
+ System.err.println("Failed to open debug log [path="
+ + logFile.getAbsolutePath() + ", exception=" + ioe + "]");
+ }
+ // if we've redirected our log output, note where to
+ if (logFile != null)
+ {
+ System.out.println("Logging to '" + logFile + "'.");
+ }
+
+ }
+
System.out
.println("Java version: " + System.getProperty("java.version"));
System.out.println(System.getProperty("os.arch") + " "
// report Jalview version
Cache.loadBuildProperties(true);
- String appdirString = System.getProperty("getdownappdir");
- if (appdirString != null && appdirString.length() > 0)
- {
- final File appdir = new File(appdirString);
- new Thread()
- {
- @Override
- public void run()
- {
- LaunchUtil.upgradeGetdown(
- new File(appdir, "getdown-launcher-old.jar"),
- new File(appdir, "getdown-launcher.jar"),
- new File(appdir, "getdown-launcher-new.jar"));
- }
- }.start();
-
- }
ArgsParser aparser = new ArgsParser(args);
boolean headless = false;
"Failed to set QuaQua look and feel: " + e.toString());
}
}
- if (lookAndFeel == null || !(lookAndFeel.getClass()
- .isAssignableFrom(UIManager.getLookAndFeel().getClass()))
+ if (lookAndFeel == null
+ || !(lookAndFeel.getClass().isAssignableFrom(
+ UIManager.getLookAndFeel().getClass()))
|| !UIManager.getLookAndFeel().getClass().toString()
.toLowerCase().contains("quaqua"))
{
}
/*
- * configure 'full' SO model if preferences say to,
- * else use the default (SO Lite)
+ * configure 'full' SO model if preferences say to, else use the default (SO
+ * Lite)
*/
- if (Cache.getDefault("USE_FULL_SO", false))
+ if (Cache.getDefault("USE_FULL_SO", true))
{
SequenceOntologyFactory.setInstance(new SequenceOntology());
}
BioJsHTMLOutput.updateBioJS();
}
+ // Move any new getdown-launcher-new.jar into place over old
+ // getdown-launcher.jar
+ // String appdirString = System.getProperty("getdownappdir");
+ if (appdirString != null && appdirString.length() > 0)
+ {
+ final File appdir = new File(appdirString);
+ new Thread()
+ {
+ @Override
+ public void run()
+ {
+ LaunchUtil.upgradeGetdown(
+ new File(appdir, "getdown-launcher-old.jar"),
+ new File(appdir, "getdown-launcher.jar"),
+ new File(appdir, "getdown-launcher-new.jar"));
+ }
+ }.start();
+ }
+
String file = null, data = null;
FileFormatI format = null;
DataSourceType protocol = null;
{
data.replaceAll("%20", " ");
- ColourSchemeI cs = ColourSchemeProperty
- .getColourScheme(af.getViewport(),
- af.getViewport().getAlignment(), data);
+ ColourSchemeI cs = ColourSchemeProperty.getColourScheme(
+ af.getViewport(), af.getViewport().getAlignment(), data);
if (cs != null)
{
* Locate the given string as a file and pass it to the groovy interpreter.
*
* @param groovyscript
- * the script to execute
+ * the script to execute
* @param jalviewContext
- * the Jalview Desktop object passed in to the groovy binding as the
- * 'Jalview' object.
+ * the Jalview Desktop object passed in to the groovy
+ * binding as the 'Jalview' object.
*/
private void executeGroovyScript(String groovyscript, AlignFrame af)
{
}
/**
- * Quit method delegates to Desktop.quit - unless running in headless mode
- * when it just ends the JVM
+ * Quit method delegates to Desktop.quit - unless running in headless mode when
+ * it just ends the JVM
*/
public void quit()
{