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
Merge branch 'develop' into bug/JAL-4059_update_swingJS_for_JalviewJS_2_11_2_and_2_11_3
[jalview.git]
/
src
/
jalview
/
gui
/
StructureChooser.java
diff --git
a/src/jalview/gui/StructureChooser.java
b/src/jalview/gui/StructureChooser.java
index
01bcacf
..
a72e221
100644
(file)
--- a/
src/jalview/gui/StructureChooser.java
+++ b/
src/jalview/gui/StructureChooser.java
@@
-71,7
+71,6
@@
import jalview.gui.structurechooser.PDBStructureChooserQuerySource;
import jalview.gui.structurechooser.StructureChooserQuerySource;
import jalview.gui.structurechooser.ThreeDBStructureChooserQuerySource;
import jalview.io.DataSourceType;
import jalview.gui.structurechooser.StructureChooserQuerySource;
import jalview.gui.structurechooser.ThreeDBStructureChooserQuerySource;
import jalview.io.DataSourceType;
-import jalview.io.FileFormatException;
import jalview.io.JalviewFileChooser;
import jalview.io.JalviewFileView;
import jalview.jbgui.FilterOption;
import jalview.io.JalviewFileChooser;
import jalview.io.JalviewFileView;
import jalview.jbgui.FilterOption;
@@
-85,7
+84,6
@@
import jalview.util.StringUtils;
import jalview.ws.DBRefFetcher;
import jalview.ws.DBRefFetcher.FetchFinishedListenerI;
import jalview.ws.datamodel.alphafold.PAEContactMatrix;
import jalview.ws.DBRefFetcher;
import jalview.ws.DBRefFetcher.FetchFinishedListenerI;
import jalview.ws.datamodel.alphafold.PAEContactMatrix;
-import jalview.ws.dbsources.EBIAlfaFold;
import jalview.ws.seqfetcher.DbSourceProxy;
import jalview.ws.sifts.SiftsSettings;
import jalview.ws.seqfetcher.DbSourceProxy;
import jalview.ws.sifts.SiftsSettings;
@@
-141,6
+139,10
@@
public class StructureChooser extends GStructureChooser
List<SequenceI> seqsWithoutSourceDBRef = null;
private boolean showChooserGUI = true;
List<SequenceI> seqsWithoutSourceDBRef = null;
private boolean showChooserGUI = true;
+ /**
+ * when true, queries to external services are supressed (no SIFTs, no PDBe, no 3D-Beacons, etc)
+ */
+ private boolean dontQueryServices = false;
private static StructureViewer lastTargetedView = null;
private static StructureViewer lastTargetedView = null;
@@
-153,6
+155,13
@@
public class StructureChooser extends GStructureChooser
public StructureChooser(SequenceI[] selectedSeqs, SequenceI selectedSeq,
AlignmentPanel ap, boolean showGUI)
{
public StructureChooser(SequenceI[] selectedSeqs, SequenceI selectedSeq,
AlignmentPanel ap, boolean showGUI)
{
+ this(selectedSeqs, selectedSeq, ap, showGUI, false);
+ }
+
+ public StructureChooser(SequenceI[] selectedSeqs, SequenceI selectedSeq,
+ AlignmentPanel ap, boolean showGUI, boolean dontQueryServices)
+ {
+
// which FTS engine to use
data = StructureChooserQuerySource.getQuerySourceFor(selectedSeqs);
initDialog();
// which FTS engine to use
data = StructureChooserQuerySource.getQuerySourceFor(selectedSeqs);
initDialog();
@@
-162,6
+171,7
@@
public class StructureChooser extends GStructureChooser
this.selectedSequences = selectedSeqs;
this.progressIndicator = (ap == null) ? null : ap.alignFrame;
this.showChooserGUI = showGUI;
this.selectedSequences = selectedSeqs;
this.progressIndicator = (ap == null) ? null : ap.alignFrame;
this.showChooserGUI = showGUI;
+ this.dontQueryServices = dontQueryServices;
init();
}
init();
}
@@
-233,17
+243,21
@@
public class StructureChooser extends GStructureChooser
}
});
}
});
- Executors.defaultThreadFactory().newThread(new Runnable()
+ if (!dontQueryServices)
{
{
- @Override
- public void run()
+ Executors.defaultThreadFactory().newThread(new Runnable()
{
{
- populateSeqsWithoutSourceDBRef();
- initialStructureDiscovery();
- }
-
- }).start();
+ @Override
+ public void run()
+ {
+ populateSeqsWithoutSourceDBRef();
+ initialStructureDiscovery();
+ }
+ }).start();
+ } else {
+ Console.debug("Structure chooser not querying services to discover metadata.");
+ }
}
// called by init
}
// called by init
@@
-508,7
+522,7
@@
public class StructureChooser extends GStructureChooser
}
} catch (Exception e)
{
}
} catch (Exception e)
{
- Console.debugPrintStackTrace(e);
+ Console.printStackTrace(e);
errors.add(e.getMessage());
continue;
}
errors.add(e.getMessage());
continue;
}
@@
-1794,7
+1808,8
@@
public class StructureChooser extends GStructureChooser
{
// headless = true;
prompt = false;
{
// headless = true;
prompt = false;
- sc = new StructureChooser(new SequenceI[] { seq }, seq, ap, false);
+ // suppress structure viewer's external service queries
+ sc = new StructureChooser(new SequenceI[] { seq }, seq, ap, false,true);
}
if (ssm == null)
{
}
if (ssm == null)
{
@@
-1817,7
+1832,9
@@
public class StructureChooser extends GStructureChooser
sc.mainFrame.dispose();
if (showRefAnnotations)
sc.mainFrame.dispose();
if (showRefAnnotations)
+ {
showReferenceAnnotationsForSequence(ap.alignFrame, seq);
showReferenceAnnotationsForSequence(ap.alignFrame, seq);
+ }
return sv;
}
return sv;
}