mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
browse tests: set focus in the tree, enable speedsearch (IDEA-153424)
This commit is contained in:
@@ -25,6 +25,7 @@ import com.intellij.psi.PsiSubstitutor;
|
||||
import com.intellij.psi.util.PsiFormatUtil;
|
||||
import com.intellij.ui.*;
|
||||
import com.intellij.ui.components.JBList;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -70,6 +71,7 @@ public class MethodListDlg extends DialogWrapper {
|
||||
}.installOn(myList);
|
||||
|
||||
ScrollingUtil.ensureSelectionExists(myList);
|
||||
TreeUIHelper.getInstance().installListSpeedSearch(myList);
|
||||
setTitle(ExecutionBundle.message("choose.test.method.dialog.title"));
|
||||
init();
|
||||
}
|
||||
@@ -85,6 +87,12 @@ public class MethodListDlg extends DialogWrapper {
|
||||
return myWholePanel;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public JComponent getPreferredFocusedComponent() {
|
||||
return myList;
|
||||
}
|
||||
|
||||
public PsiMethod getSelected() {
|
||||
return (PsiMethod)myList.getSelectedValue();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user