X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FFinder.java;h=7b7204e015789007addf83b60dc0277c3649a3d1;hb=373a0f23b37fdd3c40d3ebb4a3c9120f5773bb45;hp=b25364263f2c922b645436cb53be185f07ef7785;hpb=a6e32ecfbd6ba17bda3d58ebdbadaec7302073c0;p=jalview.git diff --git a/src/jalview/analysis/Finder.java b/src/jalview/analysis/Finder.java index b253642..7b7204e 100644 --- a/src/jalview/analysis/Finder.java +++ b/src/jalview/analysis/Finder.java @@ -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,8 @@ public class Finder } } - if (regex.search(seq.getDescription())) + if (isIncludeDescription() && seq.getDescription() != null + && regex.search(seq.getDescription())) { idMatch.addElement(seq); hasResults = true; @@ -203,7 +206,7 @@ public class Finder { continue; } - +// if invalid string used, then regex has no matched to/from int sres = seq .findPosition(resIndex + Integer.parseInt(spaces.elementAt(resIndex) @@ -373,4 +376,14 @@ public class Finder { this.seqIndex = seqIndex; } + + public boolean isIncludeDescription() + { + return includeDescription; + } + + public void setIncludeDescription(boolean includeDescription) + { + this.includeDescription = includeDescription; + } }