- jalview.analysis.Finder finder = new jalview.analysis.Finder(
- av.getAlignment(), av.getSelectionGroup(), seqIndex, resIndex);
- finder.setCaseSensitive(caseSensitive.isSelected());
- finder.setIncludeDescription(searchDescription.isSelected());
-
- finder.setFindAll(doFindAll);
-
- finder.find(searchString); // returns true if anything was actually found
-
- seqIndex = finder.getSeqIndex();
- resIndex = finder.getResIndex();
+ FinderI finder = finders.get(av);
+ if (finder == null)
+ {
+ /*
+ * first time we've searched this viewport
+ */
+ finder = new jalview.analysis.Finder(av);
+ finders.put(av, finder);
+ }