JAL-1551 formatting
authorJim Procter <j.procter@dundee.ac.uk>
Mon, 20 Oct 2014 12:35:59 +0000 (13:35 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Tue, 21 Oct 2014 10:34:53 +0000 (11:34 +0100)
src/jalview/structure/StructureSelectionManager.java

index 73a5905..8a5f02a 100644 (file)
  */
 package jalview.structure;
 
-import java.io.*;
-import java.util.*;
-
-import MCview.*;
-import jalview.analysis.*;
-import jalview.api.AlignmentViewPanel;
+import jalview.analysis.AlignSeq;
 import jalview.api.StructureSelectionManagerProvider;
-import jalview.datamodel.*;
+import jalview.datamodel.AlignedCodonFrame;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.Annotation;
+import jalview.datamodel.SearchResults;
+import jalview.datamodel.SequenceI;
 import jalview.util.MessageManager;
 
+import java.io.PrintStream;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.IdentityHashMap;
+import java.util.Vector;
+
+import MCview.Atom;
+import MCview.PDBChain;
+
 public class StructureSelectionManager
 {
   static IdentityHashMap<StructureSelectionManagerProvider, StructureSelectionManager> instances;
@@ -217,7 +225,9 @@ public class StructureSelectionManager
         }
       }
       else
+      {
         targetChain = "";
+      }
 
       int max = -10;
       AlignSeq maxAlignseq = null;
@@ -317,7 +327,9 @@ public class StructureSelectionManager
       }
 
       if (protocol.equals(jalview.io.AppletFormatAdapter.PASTE))
+      {
         pdbFile = "INLINE" + pdb.id;
+      }
 
       mappings[mappings.length - 1] = new StructureMapping(sequence[s],
               pdbFile, pdb.id, maxChainId, mapping,
@@ -352,7 +364,9 @@ public class StructureSelectionManager
     String[] handlepdbs;
     Vector pdbs = new Vector();
     for (int i = 0; i < pdbfiles.length; pdbs.addElement(pdbfiles[i++]))
+    {
       ;
+    }
     StructureListener sl;
     for (int i = 0; i < listeners.size(); i++)
     {
@@ -444,7 +458,9 @@ public class StructureSelectionManager
       {
         Object li = listeners.elementAt(i);
         if (li instanceof SequenceListener)
+        {
           ((SequenceListener) li).highlightSequence(results);
+        }
       }
     }
   }
@@ -468,7 +484,9 @@ public class StructureSelectionManager
     boolean hasSequenceListeners = handlingVamsasMo || seqmappings != null;
     SearchResults results = null;
     if (index == -1)
+    {
       index = seq.findPosition(indexpos);
+    }
     StructureListener sl;
     int atomNo = 0;
     for (int i = 0; i < listeners.size(); i++)
@@ -686,9 +704,13 @@ public class StructureSelectionManager
           AlignedCodonFrame[] codonFrames)
   {
     if (!add && (seqmappings == null || seqmappings.size() == 0))
+    {
       return;
+    }
     if (seqmappings == null)
+    {
       seqmappings = new Vector();
+    }
     if (codonFrames != null && codonFrames.length > 0)
     {
       for (int cf = 0; cf < codonFrames.length; cf++)
@@ -726,8 +748,10 @@ public class StructureSelectionManager
             int[] nsr = new int[(seqmappingrefs == null) ? 1
                     : seqmappingrefs.length + 1];
             if (seqmappingrefs != null && seqmappingrefs.length > 0)
+            {
               System.arraycopy(seqmappingrefs, 0, nsr, 0,
                       seqmappingrefs.length);
+            }
             nsr[(seqmappingrefs == null) ? 0 : seqmappingrefs.length] = 1;
             seqmappingrefs = nsr;
           }