From 1901331ee5e64ebe491784ae0ed0351e1b424bd8 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Fri, 28 Sep 2018 00:50:06 +0300 Subject: [PATCH] Remove NotificationAction.createSimple to fix compilation in 173 --- .idea/inspectionProfiles/idea_default.xml | 2 ++ .../idea/configuration/ui/migrationNotification.kt | 14 +++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.idea/inspectionProfiles/idea_default.xml b/.idea/inspectionProfiles/idea_default.xml index b00ca857451..905caadb8e6 100644 --- a/.idea/inspectionProfiles/idea_default.xml +++ b/.idea/inspectionProfiles/idea_default.xml @@ -105,6 +105,8 @@ + + diff --git a/idea/src/org/jetbrains/kotlin/idea/configuration/ui/migrationNotification.kt b/idea/src/org/jetbrains/kotlin/idea/configuration/ui/migrationNotification.kt index ff7402a77b6..b975b9625a0 100644 --- a/idea/src/org/jetbrains/kotlin/idea/configuration/ui/migrationNotification.kt +++ b/idea/src/org/jetbrains/kotlin/idea/configuration/ui/migrationNotification.kt @@ -38,12 +38,16 @@ internal fun showMigrationNotification(project: Project, migrationInfo: Migratio null ) .also { notification -> - notification.addAction(NotificationAction.createSimple("Run migrations") { - val projectContext = SimpleDataContext.getProjectContext(project) - val action = ActionManager.getInstance().getAction(CodeMigrationAction.ACTION_ID) - Notification.fire(notification, action, projectContext) + notification.addAction(object : NotificationAction("Run migrations") { + // Replace with NotificationAction.createSimple after abandoning 173 and as31 + // BUNCH: 181 + override fun actionPerformed(e: AnActionEvent, notification: Notification) { + val projectContext = SimpleDataContext.getProjectContext(project) + val action = ActionManager.getInstance().getAction(CodeMigrationAction.ACTION_ID) + Notification.fire(notification, action, projectContext) - notification.expire() + notification.expire() + } }) } .notify(project)