import jalview.structure.StructureImportSettings;
import jalview.urls.IdOrgSettings;
import jalview.util.ColorUtils;
+import jalview.util.Platform;
import jalview.ws.sifts.SiftsSettings;
import java.awt.Color;
/** Default file is ~/.jalview_properties */
static String propertiesFile;
- private static boolean propsAreReadOnly = false;
+ private static boolean propsAreReadOnly = /** @j2sNative true || */
+ false;
public static void initLogger()
{
}
// LOAD THE AUTHORS FROM THE authors.props file
+ boolean ignore = Platform.isJS();
+ if (!ignore)
try
{
String authorDetails = "jar:"
InputStream in = localJarFileURL.openStream();
applicationProperties.load(in);
in.close();
+
} catch (Exception ex)
{
System.out.println("Error reading author details: " + ex);
- applicationProperties.remove("AUTHORS");
- applicationProperties.remove("AUTHORFNAMES");
- applicationProperties.remove("YEAR");
+ ignore = true;
}
+ if (ignore) {
+ applicationProperties.remove("AUTHORS");
+ applicationProperties.remove("AUTHORFNAMES");
+ applicationProperties.remove("YEAR");
+ }
+
// FIND THE VERSION NUMBER AND BUILD DATE FROM jalview.jar
// MUST FOLLOW READING OF LOCAL PROPERTIES FILE AS THE
// VERSION MAY HAVE CHANGED SINCE LAST USING JALVIEW
+ // BH 2019.01.25 switching to Platform.isJS()
+ ignore = Platform.isJS();
+ if (!ignore)
try
{
String buildDetails = "jar:".concat(Cache.class.getProtectionDomain()
} catch (Exception ex)
{
System.out.println("Error reading build details: " + ex);
- applicationProperties.remove("VERSION");
+ ignore = true;
+ }
+
+ if (ignore) {
+ applicationProperties.remove("VERSION");
}
String jnlpVersion = System.getProperty("jalview.version");
}
/**
- * These methods are used when checking if the saved preference is different
- * to the default setting
+ * Answers the value of the given property, or the supplied default value if
+ * the property is not set
*/
public static String getDefault(String property, String def)
{
- String string = getProperty(property);
- if (string != null)
- {
- return string;
- }
-
- return def;
+ String value = getProperty(property);
+ return value == null ? def : value;
}
/**
}
}
}
+
+ /**
+ * Add a known domain that implements access-control-allow-origin:* bh 2018
+ *
+ * @param defaultUniprotDomain
+ */
+ public static void addJ2SDirectDatabaseCall(String domain)
+ {
+
+ /**
+ * @j2sNative
+ *
+ * J2S.addDirectDatabaseCall(domain);
+ */
+ }
}