override fun actionPerformed()

in src/rider/main/kotlin/com/jetbrains/rider/plugins/trxplugin/action/TrxFileProjectViewAction.kt [15:28]


    override fun actionPerformed(event: AnActionEvent) {
        val file = event.getData(CommonDataKeys.VIRTUAL_FILE) ?: return
        val project = event.project ?: return
        project.coroutineScope.launch {
            val trxImportService = TrxImportService.getInstance(project)
            val response = trxImportService.importTrx(file.path)
            if (response.result == "Failed") {
                Messages.showErrorDialog(
                    TrxPluginBundle.message(response.message),
                    TrxPluginBundle.message("import.message.error.title")
                )
            }
        }
    }