JAL-1528 bug fixes and adjustments to Chimera interface
[jalview.git] / src / ext / edu / ucsf / rbvi / strucviz2 / port / ListenerThreads.java
index dee027b..883d536 100644 (file)
@@ -12,7 +12,7 @@ import java.util.Map;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import ext.edu.ucsf.rbvi.strucviz2.*;
+import ext.edu.ucsf.rbvi.strucviz2.StructureManager;
 
 /***************************************************
  *                 Thread Classes                  *
@@ -67,6 +67,7 @@ public class ListenerThreads extends Thread {
        public List<String> getResponse(String command) {
                List<String> reply;
                // System.out.println("getResponse: "+command);
+    // TODO do we need a maximum wait time before aborting?
                while (!replyLog.containsKey(command)) {
                        try {
                                Thread.currentThread().sleep(100);
@@ -88,7 +89,9 @@ public class ListenerThreads extends Thread {
                } catch (InterruptedException e) {
                }
                if (replyLog.containsKey(command))
-                       replyLog.remove(command);
+    {
+      replyLog.remove(command);
+    }
                return;
        }
 
@@ -99,7 +102,9 @@ public class ListenerThreads extends Thread {
         */
        private void chimeraRead() throws IOException {
                if (chimera == null)
-                       return;
+    {
+      return;
+    }
 
                String line = null;
                while ((line = lineReader.readLine()) != null) {
@@ -153,9 +158,13 @@ public class ListenerThreads extends Thread {
                        replyLog.put(command, reply);
                }
                if (updateModels)
-                       (new ModelUpdater()).start();
+    {
+      (new ModelUpdater()).start();
+    }
                if (updateSelection)
-                       (new SelectionUpdater()).start();
+    {
+      (new SelectionUpdater()).start();
+    }
                if (importNetwork) {
                        (new NetworkUpdater(line)).start();
                }