--- /dev/null
+<?xml version="1.0"?>
+<!--
+ * just a crude zip up of non-Jalview classes for development purposes -BH 2018
+ *
+ * external JAR class treatment for JavaScript: see src2/README_SWINGJS.txt
+ *
+ -->
+
+<project name="jalviewX" default="zipall" basedir="."
+ xmlns:if="ant:if"
+ xmlns:unless="ant:unless">
+
+ <!-- inputs directories -->
+ <property name="resource.dir" value="resources" />
+ <property name="swingjs.dir" value="swingjs"/>
+ <!-- output directories -->
+ <property name="site.dir" value="site"/>
+ <property name="j2s.dir" value="${site.dir}/swingjs/j2s"/>
+ <property name="libjs.dir" value="libjs"/>
+
+ <target name="zipall" depends="zipvarna,zipmig,zipintervalstore">
+
+
+ </target>
+
+ <target name="zipvarna">
+ <!-- VARNA -->
+ <property name="varna.zip" value="${libjs.dir}/VARNA-site.zip" />
+ <echo> Zipping up ${varna.zip} </echo>
+ <zip destfile="${varna.zip}" basedir="${site.dir}" includes="fr_*.html,swingjs/j2s/fr/**" />
+ </target>
+
+ <target name="zipmig">
+ <!-- net.miginfo.com MiGLayout -->
+ <property name="mig.zip" value="${libjs.dir}/MiGLayout-site.zip" />
+ <echo> Zipping up ${mig.zip} </echo>
+ <zip destfile="${mig.zip}" basedir="${site.dir}" includes="swingjs/j2s/net/miginfocom/**" />
+ </target>
+
+ <target name="zipintervalstore">
+ <!-- intervalstore.impl NCList implementation -->
+ <property name="intervalstore.zip" value="${libjs.dir}/intervalstore-site.zip" />
+ <echo> Zipping up ${intervalstore.zip} </echo>
+ <zip destfile="${intervalstore.zip}" basedir="${site.dir}" includes="swingjs/j2s/intervalstore/**" />
+ </target>
+
+ <!-- already in SwingJS
+ <target name="zipjson" already in SwingJS>
+ <property name="json.zip" value="${libjs.dir}/json-site.zip" />
+ <echo> Zipping up ${json.zip} </echo>
+ <zip destfile="${json.zip}" basedir="${site.dir}" includes="swingjs/j2s/org/json/**" />
+ </target>
+ -->
+
+ <!-- log4j minimal implementation is already in jalview/javascript
+ and is mapped from org.apache.log4j by the following .j2s line:
+
+ j2s.class.replacements=org.apache.log4j.->jalview.javascript.log4j.
+
+ <target name="ziplog4j">
+ <!- org.apache.log4j ->
+ <property name="log4j.zip" value="${libjs.dir}/log4j-site.zip" />
+ <echo> Zipping up ${log4j.zip} </echo>
+ <zip destfile="${log4j.zip}" basedir="${site.dir}" includes="swingjs/j2s/org/apache/log4j/**" />
+ </target>
+ -->
+</project>
public void setUp()
{
Cache.loadProperties("test/jalview/io/testProps.jvprops");
- Cache.applicationProperties.setProperty("PAD_GAPS",
+ Cache.setPropertyNoSave("PAD_GAPS",
Boolean.FALSE.toString());
String seqData = "seq1seq1/8-18 ABCD--EF-GHIJI\n" + "seq2 A--BCDefHI\n"
public void setUp()
{
Cache.loadProperties("test/jalview/io/testProps.jvprops");
- Cache.applicationProperties.setProperty("STRUCT_FROM_PDB",
+ Cache.setPropertyNoSave("STRUCT_FROM_PDB",
Boolean.TRUE.toString());
- Cache.applicationProperties.setProperty("ADD_TEMPFACT_ANN",
+ Cache.setPropertyNoSave("ADD_TEMPFACT_ANN",
Boolean.FALSE.toString());
- Cache.applicationProperties.setProperty("ADD_SS_ANN",
+ Cache.setPropertyNoSave("ADD_SS_ANN",
Boolean.TRUE.toString());
StructureImportSettings.setDefaultStructureFileFormat("PDB");
StructureImportSettings
public void setUp()
{
Cache.loadProperties("test/jalview/io/testProps.jvprops");
- Cache.applicationProperties.setProperty("SHOW_IDENTITY",
+ Cache.setPropertyNoSave("SHOW_IDENTITY",
Boolean.TRUE.toString());
af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa",
DataSourceType.FILE);
@Test(groups = { "Functional" }, timeOut=2000)
public void testUpdateConservation_qualityOnly()
{
- Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS",
+ Cache.setPropertyNoSave("SHOW_ANNOTATIONS",
Boolean.TRUE.toString());
- Cache.applicationProperties.setProperty("SHOW_QUALITY",
+ Cache.setPropertyNoSave("SHOW_QUALITY",
Boolean.TRUE.toString());
- Cache.applicationProperties.setProperty("SHOW_CONSERVATION",
+ Cache.setPropertyNoSave("SHOW_CONSERVATION",
Boolean.FALSE.toString());
- Cache.applicationProperties.setProperty("SHOW_OCCUPANCY",
+ Cache.setPropertyNoSave("SHOW_OCCUPANCY",
Boolean.FALSE.toString());
- Cache.applicationProperties.setProperty("SHOW_IDENTITY",
+ Cache.setPropertyNoSave("SHOW_IDENTITY",
Boolean.FALSE.toString());
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
/*
* test for JAL-2283: don't inadvertently turn on colour by conservation
*/
- Cache.applicationProperties.setProperty("DEFAULT_COLOUR_PROT", "None");
- Cache.applicationProperties.setProperty("SHOW_CONSERVATION",
+ Cache.setPropertyNoSave("DEFAULT_COLOUR_PROT", "None");
+ Cache.setPropertyNoSave("SHOW_CONSERVATION",
Boolean.TRUE.toString());
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
Jalview.main(new String[] { "-nonews", "-props",
"test/jalview/testProps.jvprops" });
- Cache.applicationProperties.setProperty("SHOW_IDENTITY",
+ Cache.setPropertyNoSave("SHOW_IDENTITY",
Boolean.TRUE.toString());
af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa",
DataSourceType.FILE);
{
Cache.loadProperties("test/jalview/io/testProps.jvprops");
// pin down annotation sort order for test
- Cache.applicationProperties.setProperty(Preferences.SORT_ANNOTATIONS,
+ Cache.setPropertyNoSave(Preferences.SORT_ANNOTATIONS,
SequenceAnnotationOrder.NONE.name());
final String TRUE = Boolean.TRUE.toString();
- Cache.applicationProperties.setProperty(
+ Cache.setPropertyNoSave(
Preferences.SHOW_AUTOCALC_ABOVE, TRUE);
- Cache.applicationProperties.setProperty("SHOW_QUALITY", TRUE);
- Cache.applicationProperties.setProperty("SHOW_CONSERVATION", TRUE);
- Cache.applicationProperties.setProperty("SHOW_IDENTITY", TRUE);
+ Cache.setPropertyNoSave("SHOW_QUALITY", TRUE);
+ Cache.setPropertyNoSave("SHOW_CONSERVATION", TRUE);
+ Cache.setPropertyNoSave("SHOW_IDENTITY", TRUE);
AlignmentI al = new FormatAdapter().readFile(TEST_DATA,
DataSourceType.PASTE, FileFormat.Fasta);
{
Cache.loadProperties("test/jalview/io/testProps.jvprops");
// pin down annotation sort order for test
- Cache.applicationProperties.setProperty(Preferences.SORT_ANNOTATIONS,
+ Cache.setPropertyNoSave(Preferences.SORT_ANNOTATIONS,
SequenceAnnotationOrder.NONE.name());
final String TRUE = Boolean.TRUE.toString();
- Cache.applicationProperties.setProperty(Preferences.SHOW_AUTOCALC_ABOVE,
+ Cache.setPropertyNoSave(Preferences.SHOW_AUTOCALC_ABOVE,
TRUE);
- Cache.applicationProperties.setProperty("SHOW_QUALITY", TRUE);
- Cache.applicationProperties.setProperty("SHOW_CONSERVATION", TRUE);
- Cache.applicationProperties.setProperty("SHOW_IDENTITY", TRUE);
+ Cache.setPropertyNoSave("SHOW_QUALITY", TRUE);
+ Cache.setPropertyNoSave("SHOW_CONSERVATION", TRUE);
+ Cache.setPropertyNoSave("SHOW_IDENTITY", TRUE);
AlignmentI al = new FormatAdapter().readFile(TEST_DATA,
DataSourceType.PASTE, FileFormat.Fasta);
public void setUp()
{
Cache.loadProperties("test/jalview/io/testProps.jvprops");
- Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS",
+ Cache.setPropertyNoSave("SHOW_ANNOTATIONS",
Boolean.TRUE.toString());
- Cache.applicationProperties.setProperty(
+ Cache.setPropertyNoSave(
Preferences.SHOW_AUTOCALC_ABOVE, Boolean.TRUE.toString());
af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa",
DataSourceType.FILE);
{
// read-only Jalview properties
Cache.loadProperties("test/jalview/io/testProps.jvprops");
- Cache.applicationProperties.setProperty("BLOSUM62_PCA_FOR_NUCLEOTIDE",
+ Cache.setPropertyNoSave("BLOSUM62_PCA_FOR_NUCLEOTIDE",
Boolean.FALSE.toString());
}
/*
* enable inclusion of BLOSUM62 for nucleotide PCA (JAL-2962)
*/
- Cache.applicationProperties.setProperty("BLOSUM62_PCA_FOR_NUCLEOTIDE",
+ Cache.setPropertyNoSave("BLOSUM62_PCA_FOR_NUCLEOTIDE",
Boolean.TRUE.toString());
/*
Jalview.main(new String[] { "-nonews", "-props",
"test/jalview/testProps.jvprops" });
String True = Boolean.TRUE.toString();
- Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", True);
- Cache.applicationProperties.setProperty("SHOW_QUALITY", True);
- Cache.applicationProperties.setProperty("SHOW_CONSERVATION", True);
- Cache.applicationProperties.setProperty("SHOW_OCCUPANCY", True);
- Cache.applicationProperties.setProperty("SHOW_IDENTITY", True);
+ Cache.setPropertyNoSave("SHOW_ANNOTATIONS", True);
+ Cache.setPropertyNoSave("SHOW_QUALITY", True);
+ Cache.setPropertyNoSave("SHOW_CONSERVATION", True);
+ Cache.setPropertyNoSave("SHOW_OCCUPANCY", True);
+ Cache.setPropertyNoSave("SHOW_IDENTITY", True);
}
/**
public void setUp()
{
Cache.loadProperties("test/jalview/io/testProps.jvprops");
- Cache.applicationProperties.setProperty("SHOW_IDENTITY",
+ Cache.setPropertyNoSave("SHOW_IDENTITY",
Boolean.TRUE.toString());
af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa",
DataSourceType.FILE);
@Test(groups = "Functional")
public void testFindMousePosition_wrapped_annotations()
{
- Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", "true");
- Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "true");
+ Cache.setPropertyNoSave("SHOW_ANNOTATIONS", "true");
+ Cache.setPropertyNoSave("WRAP_ALIGNMENT", "true");
AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
AlignViewportI av = alignFrame.getViewport();
@Test(groups = "Functional")
public void testFindMousePosition_wrapped_scaleAbove()
{
- Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", "true");
- Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "true");
+ Cache.setPropertyNoSave("SHOW_ANNOTATIONS", "true");
+ Cache.setPropertyNoSave("WRAP_ALIGNMENT", "true");
AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
AlignViewportI av = alignFrame.getViewport();
@Test(groups = "Functional")
public void testFindMousePosition_wrapped_noAnnotations()
{
- Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", "false");
- Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "true");
+ Cache.setPropertyNoSave("SHOW_ANNOTATIONS", "false");
+ Cache.setPropertyNoSave("WRAP_ALIGNMENT", "true");
AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
AlignViewportI av = alignFrame.getViewport();
@Test(groups = "Functional")
public void testFindColumn_unwrapped()
{
- Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "false");
+ Cache.setPropertyNoSave("WRAP_ALIGNMENT", "false");
AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
SeqPanel testee = alignFrame.alignPanel.getSeqPanel();
@Test(groups = "Functional")
public void testFindColumn_wrapped()
{
- Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "true");
+ Cache.setPropertyNoSave("WRAP_ALIGNMENT", "true");
AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(
"examples/uniref50.fa", DataSourceType.FILE);
AlignViewport av = alignFrame.getViewport();
@BeforeMethod(alwaysRun = true)
public void setup() throws Exception
{
- Cache.applicationProperties.setProperty("STRUCT_FROM_PDB",
+ Cache.setPropertyNoSave("STRUCT_FROM_PDB",
Boolean.TRUE.toString());
- Cache.applicationProperties.setProperty("ADD_SS_ANN",
+ Cache.setPropertyNoSave("ADD_SS_ANN",
Boolean.TRUE.toString());
FileLoader loader = new FileLoader(false);
AlignFrame af = loader.LoadFileWaitTillLoaded("examples/1gaq.txt",
BackupFilesPresetEntry bfpe = new BackupFilesPresetEntry(suffix, digits,
reverse, noMax, rollMax, false);
- Cache.applicationProperties.setProperty(BackupFiles.ENABLED,
+ Cache.setPropertyNoSave(BackupFiles.ENABLED,
Boolean.toString(enabled));
- Cache.applicationProperties.setProperty(
+ Cache.setPropertyNoSave(
BackupFilesPresetEntry.SAVEDCONFIG, bfpe.toString());
/*
- Cache.applicationProperties.setProperty(BackupFiles.ENABLED,
+ Cache.setPropertyNoSave(BackupFiles.ENABLED,
Boolean.toString(enabled));
- Cache.applicationProperties.setProperty(BackupFiles.SUFFIX, suffix);
- Cache.applicationProperties.setProperty(BackupFiles.SUFFIX_DIGITS,
+ Cache.setPropertyNoSave(BackupFiles.SUFFIX, suffix);
+ Cache.setPropertyNoSave(BackupFiles.SUFFIX_DIGITS,
Integer.toString(digits));
- Cache.applicationProperties.setProperty(BackupFiles.REVERSE_ORDER,
+ Cache.setPropertyNoSave(BackupFiles.REVERSE_ORDER,
Boolean.toString(reverse));
- Cache.applicationProperties.setProperty(BackupFiles.NO_MAX,
+ Cache.setPropertyNoSave(BackupFiles.NO_MAX,
Boolean.toString(noMax));
- Cache.applicationProperties.setProperty(BackupFiles.ROLL_MAX,
+ Cache.setPropertyNoSave(BackupFiles.ROLL_MAX,
Integer.toString(rollMax));
- Cache.applicationProperties.setProperty(BackupFiles.CONFIRM_DELETE_OLD,
+ Cache.setPropertyNoSave(BackupFiles.CONFIRM_DELETE_OLD,
"false");
*/
}
{
Cache.loadProperties("test/jalview/io/testProps.jvprops");
// ensure 'add annotation from structure' is selected
- Cache.applicationProperties.setProperty("STRUCT_FROM_PDB",
+ Cache.setPropertyNoSave("STRUCT_FROM_PDB",
Boolean.TRUE.toString());
- Cache.applicationProperties.setProperty("ADD_SS_ANN",
+ Cache.setPropertyNoSave("ADD_SS_ANN",
Boolean.TRUE.toString());
sf = new SequenceFetcher();
@Test(groups = { "Network" }, enabled = true)
public void testRnaSeqRetrieve() throws Exception
{
- Cache.applicationProperties.setProperty("PDB_DOWNLOAD_FORMAT", "PDB");
+ Cache.setPropertyNoSave("PDB_DOWNLOAD_FORMAT", "PDB");
List<DbSourceProxy> sps = sf.getSourceProxy("PDB");
AlignmentI response = sps.get(0).getSequenceRecords("2GIS");
assertTrue(response != null);
{
Cache.loadProperties("test/jalview/io/testProps.jvprops");
// ensure 'add annotation from structure' is selected
- Cache.applicationProperties.setProperty("STRUCT_FROM_PDB",
+ Cache.setPropertyNoSave("STRUCT_FROM_PDB",
Boolean.TRUE.toString());
- Cache.applicationProperties.setProperty("ADD_SS_ANN",
+ Cache.setPropertyNoSave("ADD_SS_ANN",
Boolean.TRUE.toString());
sf = new SequenceFetcher();
public void setUp()
{
Cache.loadProperties("test/jalview/io/testProps.jvprops");
- Cache.applicationProperties.setProperty("STRUCT_FROM_PDB",
+ Cache.setPropertyNoSave("STRUCT_FROM_PDB",
Boolean.TRUE.toString());
- Cache.applicationProperties.setProperty("ADD_TEMPFACT_ANN",
+ Cache.setPropertyNoSave("ADD_TEMPFACT_ANN",
Boolean.TRUE.toString());
- Cache.applicationProperties.setProperty("ADD_SS_ANN",
+ Cache.setPropertyNoSave("ADD_SS_ANN",
Boolean.TRUE.toString());
StructureImportSettings.setDefaultStructureFileFormat("PDB");
}