JAL-1644 revised Finder's implementation to use a flag to enalbe searching an alignme...
[jalview.git] / src / jalview / analysis / Finder.java
index b253642..224c60a 100644 (file)
@@ -42,6 +42,8 @@ public class Finder
 
   boolean caseSensitive = false;
 
+  private boolean includeDescription = false;
+
   boolean findAll = false;
 
   com.stevesoft.pat.Regex regex = null;
@@ -150,7 +152,7 @@ public class Finder
           }
         }
 
-        if (regex.search(seq.getDescription()))
+        if (isIncludeDescription() && regex.search(seq.getDescription()))
         {
           idMatch.addElement(seq);
           hasResults = true;
@@ -373,4 +375,14 @@ public class Finder
   {
     this.seqIndex = seqIndex;
   }
+
+  public boolean isIncludeDescription()
+  {
+    return includeDescription;
+  }
+
+  public void setIncludeDescription(boolean includeDescription)
+  {
+    this.includeDescription = includeDescription;
+  }
 }