use of com.android.tools.perflib.vmtrace.SearchResult in project android by JetBrains.
the class TraceViewPanel method searchTextChanged.
private void searchTextChanged(@Nullable String pattern) {
if (StringUtil.isEmpty(pattern)) {
myTraceViewCanvas.setHighlightMethods(null);
myResultsLabel.setText("");
return;
}
ThreadInfo thread = (ThreadInfo) myThreadCombo.getSelectedItem();
SearchResult results = myTraceData.searchFor(pattern, thread);
myTraceViewCanvas.setHighlightMethods(results.getMethods());
String result = String.format("%1$d %2$s, %3$d %4$s", results.getMethods().size(), StringUtil.pluralize("method", results.getMethods().size()), results.getInstances().size(), StringUtil.pluralize("instance", results.getInstances().size()));
myResultsLabel.setText(result);
}
Aggregations