mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-60330 IDEA-235533 proper @Nls context annotations in Kotlin
GitOrigin-RevId: 585047e1a814e0efda75d0ca3758f40949dde792
This commit is contained in:
committed by
intellij-monorepo-bot
parent
929d42e7ad
commit
3eac423c18
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user