void () { final TreeSpeedSearch treeSpeedSearch = TreeSpeedSearch.installOn(myTree, false, path -> { final ElementNode lastPathComponent = (ElementNode)path.getLastPathComponent(); if (lastPathComponent == null) return null; String text = lastPathComponent.getDelegate().getText(); text = convertElementText(text); return text; }); treeSpeedSearch.setComparator(getSpeedSearchComparator()); }