Resource Bundles: Enable property key completion in string literals
#KT-6946 Fixed
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
import org.jetbrains.annotations.PropertyKey
|
||||
|
||||
fun message(@PropertyKey(resourceBundle = "TestBundle") key: String) = key
|
||||
|
||||
fun test() {
|
||||
message("foo.<caret>b")
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package org.jetbrains.annotations
|
||||
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.FIELD)
|
||||
public annotation class PropertyKey(public val resourceBundle: String)
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import org.jetbrains.annotations.PropertyKey
|
||||
|
||||
fun message(@PropertyKey(resourceBundle = "TestBundle") key: String) = key
|
||||
|
||||
fun test() {
|
||||
message("foo.barb")
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import org.jetbrains.annotations.PropertyKey
|
||||
|
||||
fun message(@PropertyKey(resourceBundle = "TestBundle") key: String) = key
|
||||
|
||||
fun test() {
|
||||
message("foo.<caret>b")
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package org.jetbrains.annotations
|
||||
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.FIELD)
|
||||
public annotation class PropertyKey(public val resourceBundle: String)
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import org.jetbrains.annotations.PropertyKey
|
||||
|
||||
fun message(@PropertyKey(resourceBundle = "TestBundle") key: String) = key
|
||||
|
||||
fun test() {
|
||||
message("foo.bar")
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
foo.bar = 1
|
||||
bar.baz = 2
|
||||
Reference in New Issue
Block a user