X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAnnotationFile.java;h=b669ee50903dff5d89c44c1d65a1224b71937310;hb=2d3be0b3f26fa3e35480976cd5a90a5562d43dcf;hp=e68562762987f5e438b06f7d1618e0857fcd7597;hpb=e5b2edf3955c50cfd61799ad12cdc9016603ee1c;p=jalview.git diff --git a/src/jalview/io/AnnotationFile.java b/src/jalview/io/AnnotationFile.java index e685627..b669ee5 100755 --- a/src/jalview/io/AnnotationFile.java +++ b/src/jalview/io/AnnotationFile.java @@ -171,22 +171,9 @@ public class AnnotationFile if (cs != null && cs.hasHiddenColumns()) { text.append("VIEW_HIDECOLS\t"); - List hc = cs.getListOfCols(); - boolean comma = false; - for (int[] r : hc) - { - if (!comma) - { - comma = true; - } - else - { - text.append(","); - } - text.append(r[0]); - text.append("-"); - text.append(r[1]); - } + + String regions = cs.regionsToString(",", "-"); + text.append(regions); text.append("\n"); } // TODO: allow efficient recovery of annotation data shown in several @@ -202,8 +189,8 @@ public class AnnotationFile StringBuffer colours = new StringBuffer(); StringBuffer graphLine = new StringBuffer(); StringBuffer rowprops = new StringBuffer(); - Hashtable graphGroup = new Hashtable(); - Hashtable graphGroup_refs = new Hashtable(); + Hashtable graphGroup = new Hashtable<>(); + Hashtable graphGroup_refs = new Hashtable<>(); BitSet graphGroupSeen = new BitSet(); java.awt.Color color; @@ -748,8 +735,8 @@ public class AnnotationFile BufferedReader in) throws Exception { nlinesread = 0; - ArrayList combineAnnotation_calls = new ArrayList(); - ArrayList deferredAnnotation_calls = new ArrayList(); + ArrayList combineAnnotation_calls = new ArrayList<>(); + ArrayList deferredAnnotation_calls = new ArrayList<>(); boolean modified = false; String groupRef = null; Hashtable groupRefRows = new Hashtable(); @@ -1112,7 +1099,7 @@ public class AnnotationFile modified = true; } // Resolve the groupRefs - Hashtable groupRefLookup = new Hashtable(); + Hashtable groupRefLookup = new Hashtable<>(); Enumeration en = groupRefRows.keys(); while (en.hasMoreElements())