mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] Simplify code in BuildManagerVersionChecker
IJ-CR-130132 GitOrigin-RevId: 575e0e1fd53bd03bd3d3891886b49648c67d1f1f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
79d0ef188a
commit
83c1b92d72
@@ -2,11 +2,9 @@
|
||||
package com.intellij.compiler.server
|
||||
|
||||
import com.intellij.java.JavaBundle
|
||||
import com.intellij.notification.Notification
|
||||
import com.intellij.notification.NotificationAction
|
||||
import com.intellij.notification.NotificationGroupManager
|
||||
import com.intellij.notification.NotificationType
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.application.writeAction
|
||||
import com.intellij.openapi.components.Service
|
||||
@@ -38,20 +36,15 @@ internal class BuildManagerVersionChecker(val project: Project, val scope: Corou
|
||||
val jdkArch = versionInfo.arch ?: return@launch
|
||||
|
||||
if (jdkArch != CpuArch.CURRENT) {
|
||||
val notification = NotificationGroupManager.getInstance()
|
||||
NotificationGroupManager.getInstance()
|
||||
.getNotificationGroup("JDK Arch Check")
|
||||
.createNotification(JavaBundle.message("arch.checker.notification.title"), JavaBundle.message("arch.checker.notification.content"), NotificationType.WARNING)
|
||||
|
||||
notification.apply {
|
||||
addAction(object : NotificationAction(JavaBundle.message("arch.checker.notification.project.structure")) {
|
||||
override fun actionPerformed(e: AnActionEvent, notification: Notification) {
|
||||
.apply {
|
||||
addAction(NotificationAction.createSimpleExpiring(JavaBundle.message("arch.checker.notification.project.structure")) {
|
||||
ProjectSettingsService.getInstance(project).openProjectSettings()
|
||||
notification.expire()
|
||||
}
|
||||
})
|
||||
|
||||
notify(project)
|
||||
}
|
||||
})
|
||||
notify(project)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user