JMeterTreeModel jMeterTreeModel = guiPackage.getTreeModel();
Set<JMeterTreeNode> nodes = new HashSet<JMeterTreeNode>();
for (JMeterTreeNode jMeterTreeNode : jMeterTreeModel.getNodesOfType(Searchable.class)) {
try {
if (jMeterTreeNode.getUserObject() instanceof Searchable){
Searchable searchable = (Searchable) jMeterTreeNode.getUserObject();
List<JMeterTreeNode> matchingNodes = jMeterTreeNode.getPathToThreadGroup();
List<String> searchableTokens = searchable.getSearchableTokens();
boolean result = searcher.search(searchableTokens);
if(result) {
nodes.addAll(matchingNodes);
}
}