git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-2332 bugfix to enable structure chooser opening for hen lysozyme
[jalview.git]
/
src
/
jalview
/
gui
/
Preferences.java
diff --git
a/src/jalview/gui/Preferences.java
b/src/jalview/gui/Preferences.java
index
ff0deb3
..
3bffd3a
100755
(executable)
--- a/
src/jalview/gui/Preferences.java
+++ b/
src/jalview/gui/Preferences.java
@@
-1,6
+1,6
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*
* This file is part of Jalview.
*
@@
-20,6
+20,11
@@
*/
package jalview.gui;
*/
package jalview.gui;
+import static jalview.util.UrlConstants.DB_ACCESSION;
+import static jalview.util.UrlConstants.EMBLEBI_STRING;
+import static jalview.util.UrlConstants.SEQUENCE_ID;
+import static jalview.util.UrlConstants.SRS_STRING;
+
import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
import jalview.bin.Cache;
import jalview.gui.Help.HelpId;
import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
import jalview.bin.Cache;
import jalview.gui.Help.HelpId;
@@
-110,10
+115,7
@@
public class Preferences extends GPreferences
public static List<String> groupURLLinks;
static
{
public static List<String> groupURLLinks;
static
{
- String string = Cache
- .getDefault(
- "SEQUENCE_LINKS",
- "EMBL-EBI Search|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$");
+ String string = Cache.getDefault("SEQUENCE_LINKS", EMBLEBI_STRING);
sequenceURLLinks = new Vector<String>();
try
sequenceURLLinks = new Vector<String>();
try
@@
-124,7
+126,11
@@
public class Preferences extends GPreferences
String name = st.nextToken();
String url = st.nextToken();
// check for '|' within a regex
String name = st.nextToken();
String url = st.nextToken();
// check for '|' within a regex
- int rxstart = url.indexOf("$SEQUENCE_ID$");
+ int rxstart = url.indexOf("$" + DB_ACCESSION + "$");
+ if (rxstart == -1)
+ {
+ rxstart = url.indexOf("$" + SEQUENCE_ID + "$");
+ }
while (rxstart == -1 && url.indexOf("/=$") == -1)
{
url = url + "|" + st.nextToken();
while (rxstart == -1 && url.indexOf("/=$") == -1)
{
url = url + "|" + st.nextToken();
@@
-137,14
+143,10
@@
public class Preferences extends GPreferences
}
{
// upgrade old SRS link
}
{
// upgrade old SRS link
- int srsPos = sequenceURLLinks
- .indexOf("SRS|http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-newId+(([uniprot-all:$SEQUENCE_ID$]))+-view+SwissEntry");
+ int srsPos = sequenceURLLinks.indexOf(SRS_STRING);
if (srsPos > -1)
{
if (srsPos > -1)
{
- sequenceURLLinks
- .setElementAt(
- "EMBL-EBI Search|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$",
- srsPos);
+ sequenceURLLinks.setElementAt(EMBLEBI_STRING, srsPos);
}
}
}
}
@@
-565,6
+567,7
@@
public class Preferences extends GPreferences
else
{
Cache.applicationProperties.remove("SEQUENCE_LINKS");
else
{
Cache.applicationProperties.remove("SEQUENCE_LINKS");
+ sequenceURLLinks.clear();
}
Cache.applicationProperties.setProperty("USE_PROXY",
}
Cache.applicationProperties.setProperty("USE_PROXY",