Resource Bundles: Enable property key completion in string literals

#KT-6946 Fixed
This commit is contained in:
Alexey Sedunov
2015-09-22 19:21:06 +03:00
parent 594e4e5c31
commit 6b9e2b0bbb
21 changed files with 191 additions and 1 deletions
@@ -0,0 +1,7 @@
import org.jetbrains.annotations.PropertyKey
fun message(@PropertyKey(resourceBundle = "TestBundle") key: String) = key
fun test() {
message("foo.<caret>b")
}
@@ -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)
@@ -0,0 +1,7 @@
import org.jetbrains.annotations.PropertyKey
fun message(@PropertyKey(resourceBundle = "TestBundle") key: String) = key
fun test() {
message("foo.barb")
}
@@ -0,0 +1,7 @@
import org.jetbrains.annotations.PropertyKey
fun message(@PropertyKey(resourceBundle = "TestBundle") key: String) = key
fun test() {
message("foo.<caret>b")
}
@@ -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)
@@ -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