Merge branch 'develop' into releases/Release_2_10_2_Branch
[jalview.git] / src / jalview / io / FeaturesFile.java
index 48eeee3..4be8d0e 100755 (executable)
@@ -122,8 +122,7 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
    * @throws IOException
    */
   public FeaturesFile(boolean parseImmediately, String inFile,
-          DataSourceType type)
-          throws IOException
+          DataSourceType type) throws IOException
   {
     super(parseImmediately, inFile, type);
   }
@@ -305,7 +304,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
    */
   protected boolean parseJalviewFeature(String line, String[] gffColumns,
           AlignmentI alignment, Map<String, FeatureColourI> featureColours,
-          boolean removeHTML, boolean relaxedIdMatching, String featureGroup)
+          boolean removeHTML, boolean relaxedIdMatching,
+          String featureGroup)
   {
     /*
      * tokens: description seqid seqIndex start end type [score]
@@ -359,8 +359,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
       Color colour = ColorUtils.createColourFromName(ft);
       featureColours.put(ft, new FeatureColour(colour));
     }
-    SequenceFeature sf = new SequenceFeature(ft, desc, "", startPos,
-            endPos, featureGroup);
+    SequenceFeature sf = new SequenceFeature(ft, desc, "", startPos, endPos,
+            featureGroup);
     if (gffColumns.length > 6)
     {
       float score = Float.NaN;
@@ -550,9 +550,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
         for (int j = 0; j < features.length; j++)
         {
           isnonpos = features[j].begin == 0 && features[j].end == 0;
-          if ((!nonpos && isnonpos)
-                  || (!isnonpos && visOnly && !visible
-                          .containsKey(features[j].type)))
+          if ((!nonpos && isnonpos) || (!isnonpos && visOnly
+                  && !visible.containsKey(features[j].type)))
           {
             continue;
           }
@@ -591,18 +590,16 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
           {
             isnonpos = sequenceFeature.begin == 0
                     && sequenceFeature.end == 0;
-            if ((!nonpos && isnonpos)
-                    || (!isnonpos && visOnly && !visible
-                            .containsKey(sequenceFeature.type)))
+            if ((!nonpos && isnonpos) || (!isnonpos && visOnly
+                    && !visible.containsKey(sequenceFeature.type)))
             {
               // skip if feature is nonpos and we ignore them or if we only
               // output visible and it isn't non-pos and it's not visible
               continue;
             }
 
-            if (group != null
-                    && (sequenceFeature.featureGroup == null || !sequenceFeature.featureGroup
-                            .equals(group)))
+            if (group != null && (sequenceFeature.featureGroup == null
+                    || !sequenceFeature.featureGroup.equals(group)))
             {
               continue;
             }
@@ -620,8 +617,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
             }
             else
             {
-              if (sequenceFeature.links != null
-                      && sequenceFeature.getDescription().indexOf("<html>") == -1)
+              if (sequenceFeature.links != null && sequenceFeature
+                      .getDescription().indexOf("<html>") == -1)
               {
                 out.append("<html>");
               }
@@ -637,12 +634,13 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
 
                   if (sequenceFeature.description.indexOf(href) == -1)
                   {
-                    out.append(" <a href=\"" + href + "\">" + label
-                            + "</a>");
+                    out.append(
+                            " <a href=\"" + href + "\">" + label + "</a>");
                   }
                 }
 
-                if (sequenceFeature.getDescription().indexOf("</html>") == -1)
+                if (sequenceFeature.getDescription()
+                        .indexOf("</html>") == -1)
                 {
                   out.append("</html>");
                 }
@@ -899,8 +897,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
         fromCount = Integer.parseInt(tokens[2]);
       } catch (NumberFormatException nfe)
       {
-        throw new IOException("Invalid number in Align field: "
-                + nfe.getMessage());
+        throw new IOException(
+                "Invalid number in Align field: " + nfe.getMessage());
       }
 
       /*
@@ -1120,9 +1118,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
    * @param newseqs
    * @throws IOException
    */
-  protected void processGffPragma(String line,
-          Map<String, String> gffProps, AlignmentI align,
-          List<SequenceI> newseqs) throws IOException
+  protected void processGffPragma(String line, Map<String, String> gffProps,
+          AlignmentI align, List<SequenceI> newseqs) throws IOException
   {
     line = line.trim();
     if ("###".equals(line))