for (SearchResultMatchI match : searchResults.getResults())
{
seqs.add(match.getSequence().getDatasetSequence());
- features.add(new SequenceFeature(searchString, desc,
- match
- .getStart(), match.getEnd(), desc));
+ features.add(new SequenceFeature(searchString, desc, match.getStart(),
+ match.getEnd(), desc));
}
- if (ap.getSeqPanel().seqCanvas.getFeatureRenderer().amendFeatures(seqs,
- features, true, ap))
+ new FeatureEditor(ap).createFeatures(seqs, features, new Runnable()
{
- /*
- * ensure feature display is turned on to show the new features,
- * and remove them as highlighted regions
- */
- ap.alignFrame.showSeqFeatures.setSelected(true);
- av.setShowSequenceFeatures(true);
- ap.highlightSearchResults(null);
- }
+ @Override
+ public void run()
+ {
+
+ /*
+ * ensure feature display is turned on to show the new features,
+ * and remove them as highlighted regions
+ */
+ ap.alignFrame.showSeqFeatures.setSelected(true);
+ av.setShowSequenceFeatures(true);
+ ap.highlightSearchResults(null);
+ }
+ });
}
/**
searchResults = null;
}
+ searchBox.updateCache();
+
// if allResults is null, this effectively switches displaySearch flag in
// seqCanvas
ap.highlightSearchResults(searchResults);
// 'SelectRegion' selection
if (!haveResults)
{
+ resIndex = -1;
+ seqIndex = 0;
JvOptionPane.showInternalMessageDialog(this,
MessageManager.getString("label.finished_searching"), null,
JvOptionPane.INFORMATION_MESSAGE);
- resIndex = -1;
- seqIndex = 0;
}
else
{
message += searchResults.getSize()
+ " subsequence matches found.";
}
- JvOptionPane.showInternalMessageDialog(this, message, null,
- JvOptionPane.INFORMATION_MESSAGE);
resIndex = -1;
seqIndex = 0;
+ JvOptionPane.showInternalMessageDialog(this, message, null,
+ JvOptionPane.INFORMATION_MESSAGE);
}
}
- searchBox.updateCache();
}
/**