mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
speed search in results preview based on file names of results (IDEA-152756)
This commit is contained in:
@@ -73,6 +73,7 @@ import com.intellij.usageView.UsageInfo;
|
||||
import com.intellij.usages.*;
|
||||
import com.intellij.usages.impl.UsagePreviewPanel;
|
||||
import com.intellij.util.*;
|
||||
import com.intellij.util.containers.Convertor;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -644,6 +645,12 @@ public class FindDialog extends DialogWrapper {
|
||||
}
|
||||
};
|
||||
myResultsPreviewTable = table;
|
||||
new TableSpeedSearch(table, new Convertor<Object, String>() {
|
||||
@Override
|
||||
public String convert(Object o) {
|
||||
return ((UsageInfo2UsageAdapter)o).getFile().getName();
|
||||
}
|
||||
});
|
||||
myResultsPreviewTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
|
||||
@Override
|
||||
public void valueChanged(ListSelectionEvent e) {
|
||||
|
||||
Reference in New Issue
Block a user