mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make GrazieBundle java-friendlier
GitOrigin-RevId: 0d4ae6c90fbff117484850fae7ac97dfb69be178
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0d61f8f7c8
commit
fcca78bb1e
@@ -15,13 +15,14 @@ object GrazieBundle {
|
||||
private val pluginBundle by lazy { DynamicBundle.INSTANCE.getResourceBundle(PLUGIN_BUNDLE_NAME, javaClass.classLoader) }
|
||||
|
||||
@Nls
|
||||
fun message(@PropertyKey(resourceBundle = DEFAULT_BUNDLE_NAME) key: String, vararg params: String): String {
|
||||
@JvmStatic
|
||||
fun message(@PropertyKey(resourceBundle = DEFAULT_BUNDLE_NAME) key: String, vararg params: Any): String {
|
||||
val bundle = if (!GraziePlugin.isBundled && pluginBundle.containsKey(key)) pluginBundle else defaultBundle
|
||||
return AbstractBundle.message(bundle, key, *params)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun messagePointer(@PropertyKey(resourceBundle = DEFAULT_BUNDLE_NAME) key: String, vararg params: String): Supplier<String> = Supplier {
|
||||
fun messagePointer(@PropertyKey(resourceBundle = DEFAULT_BUNDLE_NAME) key: String, vararg params: Any): Supplier<String> = Supplier {
|
||||
message(key, *params)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user