From 5b697edd1b140d42f589a9c85e4133d073904198 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 20 Oct 2014 13:35:59 +0100 Subject: [PATCH] JAL-1551 formatting --- .../structure/StructureSelectionManager.java | 38 ++++++++++++++++---- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 73a5905..8a5f02a 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -20,16 +20,24 @@ */ 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 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; } -- 1.7.10.2