VirtualFile (@NotNull Project project) { final FileChooserDescriptor xmlDescriptor = FileChooserDescriptorFactory.createSingleFileDescriptor(StdFileTypes.XML); xmlDescriptor.setTitle(SmRunnerBundle.message("sm.test.runner.import.test.choose.test.file.title")); VirtualFile file = FileChooser.chooseFile(xmlDescriptor, project, null); if (file != null && !FileTypeRegistry.getInstance().isFileOfType(file, StdFileTypes.XML)) { Messages.showWarningDialog(project, SmRunnerBundle.message("dialog.message.unable.to.parse.test.results", file.getName()), SmRunnerBundle.message("sm.test.runner.import.test")); return null; } return file; }