X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fanalysis%2FFinder.java;h=875322b6c090c6351268bc9c3184d95a30881ef0;hb=fd1c6fd67abdd50ff0d77410d3da9be66be315ce;hp=61e57096168ac70eeabab6d8d813f97c415f175d;hpb=c3d80a77b6782d563325e9fed92c8de371e07188;p=jalview.git diff --git a/src/jalview/analysis/Finder.java b/src/jalview/analysis/Finder.java index 61e5709..875322b 100644 --- a/src/jalview/analysis/Finder.java +++ b/src/jalview/analysis/Finder.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ 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; @@ -373,4 +376,14 @@ public class Finder { this.seqIndex = seqIndex; } + + public boolean isIncludeDescription() + { + return includeDescription; + } + + public void setIncludeDescription(boolean includeDescription) + { + this.includeDescription = includeDescription; + } }