Remove NotificationAction.createSimple to fix compilation in 173

This commit is contained in:
Nikolay Krasko
2018-09-28 00:50:06 +03:00
parent e7bed58ebe
commit 1901331ee5
2 changed files with 11 additions and 5 deletions
@@ -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)