mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Rename one of NotificationAction classes to avoid confusion with another
This commit is contained in:
@@ -19,11 +19,7 @@ import com.intellij.openapi.actionSystem.AnAction
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.wm.IdeFrame
|
||||
|
||||
/**
|
||||
* @author Alexander Lobas
|
||||
*/
|
||||
|
||||
abstract class NotificationAction : AnAction() {
|
||||
abstract class CloseNotificationAction : AnAction() {
|
||||
override fun update(e: AnActionEvent) {
|
||||
val layout = getBalloonLayout(e)
|
||||
e.presentation.isEnabled = layout != null && layout.balloonCount > 0
|
||||
@@ -32,13 +28,13 @@ abstract class NotificationAction : AnAction() {
|
||||
protected fun getBalloonLayout(e: AnActionEvent) = e.getData(IdeFrame.KEY)?.balloonLayout as BalloonLayoutImpl?
|
||||
}
|
||||
|
||||
class CloseFirstNotificationAction : NotificationAction() {
|
||||
class CloseFirstNotificationAction : CloseNotificationAction() {
|
||||
override fun actionPerformed(e: AnActionEvent) {
|
||||
getBalloonLayout(e)?.closeFirst()
|
||||
}
|
||||
}
|
||||
|
||||
class CloseAllNotificationsAction : NotificationAction() {
|
||||
class CloseAllNotificationsAction : CloseNotificationAction() {
|
||||
override fun actionPerformed(e: AnActionEvent) {
|
||||
getBalloonLayout(e)?.closeAll()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user