Remove NotificationAction.createSimple to fix compilation in 173
This commit is contained in:
+2
@@ -105,6 +105,8 @@
|
|||||||
<Problem reference="org.jetbrains.java.decompiler.main.decompiler.BaseDecompiler#addSpace" reason="Method was replaced with outher methods in 182. Use addSpaceEx instead." />
|
<Problem reference="org.jetbrains.java.decompiler.main.decompiler.BaseDecompiler#addSpace" reason="Method was replaced with outher methods in 182. Use addSpaceEx instead." />
|
||||||
<Problem reference="com.intellij.psi.codeStyle.CommonCodeStyleSettings#copyFrom" reason="Absent in 173. Use CompatibilityKt.copyFromEx instead." />
|
<Problem reference="com.intellij.psi.codeStyle.CommonCodeStyleSettings#copyFrom" reason="Absent in 173. Use CompatibilityKt.copyFromEx instead." />
|
||||||
<Problem reference="com.intellij.psi.codeStyle.CommonCodeStyleSettingsManager#copy" reason="Removed since 181. Use CompatibilityKt.copyFromEx instead." />
|
<Problem reference="com.intellij.psi.codeStyle.CommonCodeStyleSettingsManager#copy" reason="Removed since 181. Use CompatibilityKt.copyFromEx instead." />
|
||||||
|
<Problem reference="com.intellij.notification.NotificationAction#createSimple" reason="Absent in 173." />
|
||||||
|
<Problem reference="com.intellij.notification.NotificationAction#create" reason="Absent in 173." />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</inspection_tool>
|
</inspection_tool>
|
||||||
|
|||||||
@@ -38,12 +38,16 @@ internal fun showMigrationNotification(project: Project, migrationInfo: Migratio
|
|||||||
null
|
null
|
||||||
)
|
)
|
||||||
.also { notification ->
|
.also { notification ->
|
||||||
notification.addAction(NotificationAction.createSimple("Run migrations") {
|
notification.addAction(object : NotificationAction("Run migrations") {
|
||||||
val projectContext = SimpleDataContext.getProjectContext(project)
|
// Replace with NotificationAction.createSimple after abandoning 173 and as31
|
||||||
val action = ActionManager.getInstance().getAction(CodeMigrationAction.ACTION_ID)
|
// BUNCH: 181
|
||||||
Notification.fire(notification, action, projectContext)
|
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)
|
.notify(project)
|
||||||
|
|||||||
Reference in New Issue
Block a user