X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FFinder.java;h=faf79d154f71c99427d701bb2585c9558f0d0e60;hb=25aaaa87042b3f507ad4348120df7dd073182759;hp=b25364263f2c922b645436cb53be185f07ef7785;hpb=a6e32ecfbd6ba17bda3d58ebdbadaec7302073c0;p=jalview.git diff --git a/src/jalview/analysis/Finder.java b/src/jalview/analysis/Finder.java index b253642..faf79d1 100644 --- a/src/jalview/analysis/Finder.java +++ b/src/jalview/analysis/Finder.java @@ -1,5 +1,5 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1) * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. @@ -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; + } }