git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'ab43013b7e357b84b4abade0dba949668dfb2a0e' into develop
[jalview.git]
/
src
/
jalview
/
analysis
/
Finder.java
diff --git
a/src/jalview/analysis/Finder.java
b/src/jalview/analysis/Finder.java
index
b253642
..
faf79d1
100644
(file)
--- 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.
* Copyright (C) 2014 The Jalview Authors
*
* This file is part of Jalview.
@@
-42,6
+42,8
@@
public class Finder
boolean caseSensitive = false;
boolean caseSensitive = false;
+ private boolean includeDescription = false;
+
boolean findAll = false;
com.stevesoft.pat.Regex regex = null;
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;
{
idMatch.addElement(seq);
hasResults = true;
@@
-203,7
+206,7
@@
public class Finder
{
continue;
}
{
continue;
}
-
+// if invalid string used, then regex has no matched to/from
int sres = seq
.findPosition(resIndex
+ Integer.parseInt(spaces.elementAt(resIndex)
int sres = seq
.findPosition(resIndex
+ Integer.parseInt(spaces.elementAt(resIndex)
@@
-373,4
+376,14
@@
public class Finder
{
this.seqIndex = seqIndex;
}
{
this.seqIndex = seqIndex;
}
+
+ public boolean isIncludeDescription()
+ {
+ return includeDescription;
+ }
+
+ public void setIncludeDescription(boolean includeDescription)
+ {
+ this.includeDescription = includeDescription;
+ }
}
}