in src/rider/main/kotlin/com/jetbrains/rider/plugins/trxplugin/action/TrxTestsMenuAction.kt [15:32]
override fun actionPerformed(e: AnActionEvent) {
val project = e.project ?: return
val descriptor = FileChooserDescriptor(true, false, false, false, false, false)
.withFileFilter { it.extension == "trx" }
val file: VirtualFile? = FileChooser.chooseFile(descriptor, project, null)
if (file != null) {
project.coroutineScope.launch {
val trxImportService = project.getService(TrxImportService::class.java)
val response = trxImportService.importTrx(file.path)
if (response.result == "Failed") {
Messages.showErrorDialog(
TrxPluginBundle.message(response.message),
TrxPluginBundle.message("import.message.error.title")
)
}
}
}
}