BrowseModuleValueActionListener[] (Project project, ConfigurationModuleSelector moduleSelector, EditorTextFieldWithBrowseButton packageField, TextFieldWithBrowseButton patternField, EditorTextFieldWithBrowseButton categoryField, Supplier<String> className) { return new BrowseModuleValueActionListener[]{ new PackageChooserActionListener(project), new TestClassBrowser(project, moduleSelector, packageField), new MethodBrowser(project) { @Override protected Condition<PsiMethod> getFilter(PsiClass testClass) { return new JUnitUtil.TestMethodFilter(testClass); } @Override protected String getClassName() { return className.get(); } @Override protected ConfigurationModuleSelector getModuleSelector() { return moduleSelector; } }, new TestsChooserActionListener(project, moduleSelector, packageField, patternField), new BrowseModuleValueActionListener(project) { @Override protected String showDialog() { final VirtualFile virtualFile = FileChooser.chooseFile(FileChooserDescriptorFactory.createSingleFolderDescriptor(), project, null); if (virtualFile != null) { return FileUtil.toSystemDependentName(virtualFile.getPath()); } return null; } }, new CategoryBrowser(project, moduleSelector, categoryField), null }; }