+ * Searches for a match with the sequence features, and if found, adds the
+ * sequence to the list of match ids, (but not as a duplicate). Answers true
+ * if a match was added, else false.
+ *
+ * @param seq
+ * @param searchPattern
+ * @return
+ */
+ protected boolean searchSequenceFeatures(int from, Regex searchPattern)
+ {
+ boolean matched = false;
+ SequenceI seq = viewport.getAlignment().getSequenceAt(sequenceIndex);
+
+ SequenceFeaturesI sf = seq.getFeatures();
+ for (SequenceFeature feature : sf.getAllFeatures(null))
+ {
+ if (searchPattern.search(feature.type) || (feature.description != null
+ && searchPattern.search(feature.description)))
+ {
+ searchResults.addResult(seq, seq.findIndex(feature.getBegin()),
+ seq.findIndex(feature.getEnd()));
+ matched = true;
+ }
+ }
+ return matched;
+ }
+
+ /**