| 1 |
package org.jetbrains.plugins.template |
| 2 |
|
| 3 |
import com.intellij.DynamicBundle |
| 4 |
import org.jetbrains.annotations.NonNls |
| 5 |
import org.jetbrains.annotations.PropertyKey |
| 6 |
|
| 7 |
@NonNls |
| 8 |
private const val BUNDLE = "messages.MyBundle" |
| 9 |
|
| 10 |
object MyBundle : DynamicBundle(BUNDLE) { |
| 11 |
|
| 12 |
operator fun get(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any) = |
| 13 |
getMessage(key, *params) |
| 14 |
|
| 15 |
@JvmStatic |
| 16 |
fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any) = |
| 17 |
getMessage(key, *params) |
| 18 |
|
| 19 |
@Suppress("unused") |
| 20 |
@JvmStatic |
| 21 |
fun messagePointer(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any) = |
| 22 |
getLazyMessage(key, *params) |
| 23 |
} |