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-1085 - ensure sequence fetching client waits around until feature retrieval has...
[jalview.git]
/
src
/
jalview
/
ws
/
DasSequenceFeatureFetcher.java
diff --git
a/src/jalview/ws/DasSequenceFeatureFetcher.java
b/src/jalview/ws/DasSequenceFeatureFetcher.java
index
2a5476b
..
bef6425
100644
(file)
--- a/
src/jalview/ws/DasSequenceFeatureFetcher.java
+++ b/
src/jalview/ws/DasSequenceFeatureFetcher.java
@@
-221,6
+221,7
@@
public class DasSequenceFeatureFetcher
}
\r
private void _startFetching()
\r
{
\r
}
\r
private void _startFetching()
\r
{
\r
+ running=true;
\r
new Thread(new FetchSeqFeatures()).start();
\r
}
\r
class FetchSeqFeatures implements Runnable
\r
new Thread(new FetchSeqFeatures()).start();
\r
}
\r
class FetchSeqFeatures implements Runnable
\r
@@
-235,6
+236,7
@@
public class DasSequenceFeatureFetcher
{
\r
public void run()
\r
{
\r
{
\r
public void run()
\r
{
\r
+ running=true;
\r
new DBRefFetcher(sequences, af).fetchDBRefs(true);
\r
startFetching();
\r
setGuiFetchComplete();
\r
new DBRefFetcher(sequences, af).fetchDBRefs(true);
\r
startFetching();
\r
setGuiFetchComplete();
\r
@@
-246,6
+248,7
@@
public class DasSequenceFeatureFetcher
*/
\r
void startFetching()
\r
{
\r
*/
\r
void startFetching()
\r
{
\r
+ running=true;
\r
cancelled = false;
\r
startTime = System.currentTimeMillis();
\r
if (af != null)
\r
cancelled = false;
\r
startTime = System.currentTimeMillis();
\r
if (af != null)
\r
@@
-546,10
+549,10
@@
public class DasSequenceFeatureFetcher
}
\r
\r
int sourcesRemaining = 0;
\r
}
\r
\r
int sourcesRemaining = 0;
\r
-
\r
+ private boolean running=false;
\r
private void setGuiFetchComplete()
\r
{
\r
private void setGuiFetchComplete()
\r
{
\r
-
\r
+ running=false;
\r
if (!cancelled && af != null)
\r
{
\r
// only update the progress bar if we've completed the fetch normally
\r
if (!cancelled && af != null)
\r
{
\r
// only update the progress bar if we've completed the fetch normally
\r
@@
-879,4
+882,9
@@
public class DasSequenceFeatureFetcher
return type.getContent();
\r
}
\r
\r
return type.getContent();
\r
}
\r
\r
+ public boolean isRunning()
\r
+ {
\r
+ return running;
\r
+ }
\r
+
\r
}
\r
}
\r