Resource Bundles: Add Rename tests for bundle files and properties
#KT-6946 In Progress
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
## FIND_FILE_USAGES
|
||||
foo.bar = test
|
||||
@@ -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,10 @@
|
||||
import org.jetbrains.annotations.PropertyKey
|
||||
|
||||
private val BUNDLE_NAME = "BarBundle"
|
||||
|
||||
public fun message(@PropertyKey(resourceBundle = "BarBundle") key: String) = key
|
||||
public fun message2(@PropertyKey(resourceBundle = BUNDLE_NAME) key: String) = key
|
||||
|
||||
fun test() {
|
||||
message("foo.bar")
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
## FIND_FILE_USAGES
|
||||
foo.bar = test
|
||||
@@ -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,10 @@
|
||||
import org.jetbrains.annotations.PropertyKey
|
||||
|
||||
private val BUNDLE_NAME = "FooBundle"
|
||||
|
||||
public fun message(@PropertyKey(resourceBundle = "FooBundle") key: String) = key
|
||||
public fun message2(@PropertyKey(resourceBundle = BUNDLE_NAME) key: String) = key
|
||||
|
||||
fun test() {
|
||||
message("foo.bar")
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"type": "FILE",
|
||||
"file": "FooBundle.properties",
|
||||
"newName": "BarBundle.properties"
|
||||
}
|
||||
@@ -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)
|
||||
+1
@@ -0,0 +1 @@
|
||||
bar.foo = test
|
||||
@@ -0,0 +1,8 @@
|
||||
import org.jetbrains.annotations.PropertyKey
|
||||
|
||||
public fun message(@PropertyKey(resourceBundle = "TestBundle") key: String) = key
|
||||
|
||||
fun test() {
|
||||
@PropertyKey(resourceBundle = "TestBundle") val s1 = "bar.foo"
|
||||
message("bar.foo")
|
||||
}
|
||||
@@ -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)
|
||||
+1
@@ -0,0 +1 @@
|
||||
foo.bar = test
|
||||
@@ -0,0 +1,8 @@
|
||||
import org.jetbrains.annotations.PropertyKey
|
||||
|
||||
public fun message(@PropertyKey(resourceBundle = "TestBundle") key: String) = key
|
||||
|
||||
fun test() {
|
||||
@PropertyKey(resourceBundle = "TestBundle") val s1 = "foo.bar"
|
||||
message("foo.bar")
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"type": "BUNDLE_PROPERTY",
|
||||
"file": "TestBundle.properties",
|
||||
"oldName": "foo.bar",
|
||||
"newName": "bar.foo"
|
||||
}
|
||||
Reference in New Issue
Block a user