diff --git a/platform/platform-api/src/com/intellij/notification/NotificationGroup.kt b/platform/platform-api/src/com/intellij/notification/NotificationGroup.kt index 9802a769669e..81ef68f04538 100644 --- a/platform/platform-api/src/com/intellij/notification/NotificationGroup.kt +++ b/platform/platform-api/src/com/intellij/notification/NotificationGroup.kt @@ -133,17 +133,17 @@ class NotificationGroup(@param:NonNls val displayId: String, get() = registeredGroups.values } - fun createNotification(@Nls @NotificationContent content: String, type: MessageType): Notification { + fun createNotification(content: @Nls @NotificationContent String, type: MessageType): Notification { return createNotification(content, type.toNotificationType()) } - fun createNotification(@Nls @NotificationContent content: String, type: NotificationType): Notification { + fun createNotification(content: @Nls @NotificationContent String, type: NotificationType): Notification { return createNotification("", content, type) } fun createNotification( - @Nls @NotificationTitle title: String, - @Nls @NotificationContent content: String, + title: @Nls @NotificationTitle String, + content: @Nls @NotificationContent String, type: NotificationType = NotificationType.INFORMATION, listener: NotificationListener? = null ): Notification { @@ -157,9 +157,9 @@ class NotificationGroup(@param:NonNls val displayId: String, @JvmOverloads fun createNotification( - @Nls @NotificationTitle title: String?, - @Nls @NotificationSubtitle subtitle: String?, - @Nls @NotificationContent content: String?, + title: @Nls @NotificationTitle String?, + subtitle: @Nls @NotificationSubtitle String?, + content: @Nls @NotificationContent String?, type: NotificationType = NotificationType.INFORMATION, listener: NotificationListener? = null ): Notification { diff --git a/platform/platform-api/src/com/intellij/util/nls/NlsContexts.java b/platform/platform-api/src/com/intellij/util/nls/NlsContexts.java index 78608f46dc41..93f81c3a6837 100644 --- a/platform/platform-api/src/com/intellij/util/nls/NlsContexts.java +++ b/platform/platform-api/src/com/intellij/util/nls/NlsContexts.java @@ -90,19 +90,19 @@ public class NlsContexts { */ @NlsContext(prefix = "notification.title") @Nls(capitalization = Nls.Capitalization.Sentence) - @Target({ElementType.PARAMETER, ElementType.TYPE_USE}) + @Target(ElementType.TYPE_USE) public @interface NotificationTitle { } @NlsContext(prefix = "notification.subtitle") @Nls(capitalization = Nls.Capitalization.Sentence) - @Target({ElementType.PARAMETER, ElementType.TYPE_USE}) + @Target(ElementType.TYPE_USE) public @interface NotificationSubtitle { } @NlsContext(prefix = "notification.content") @Nls(capitalization = Nls.Capitalization.Sentence) - @Target({ElementType.PARAMETER, ElementType.TYPE_USE}) + @Target(ElementType.TYPE_USE) public @interface NotificationContent { }