From dbbbf738e4e9a4cc6c216180e883d3c8fc52aa0a Mon Sep 17 00:00:00 2001 From: Bart van Helvert Date: Wed, 6 Mar 2024 14:26:07 +0100 Subject: [PATCH] [kotlin] Add tests for binding FQN GitOrigin-RevId: 7b82a03b5722e361ba4c8adbbac6dd66ecdd3698 --- .../ExtensionOverload.kt | 16 + .../ExtensionOverload.kt.after | 10 + .../annotationCall/FullyQualified.kt | 0 .../annotationCall/FullyQualified.kt.after | 0 .../annotationCall/RootPkg.kt | 0 .../annotationCall/RootPkg.kt.after | 0 .../annotationCall/UnQualified.kt | 0 .../annotationCall/UnQualified.kt.after | 0 .../annotationReference/FullyQualified.kt | 0 .../FullyQualified.kt.after | 0 .../annotationReference/RootPkg.kt | 0 .../annotationReference/RootPkg.kt.after | 0 .../annotationReference/UnQualified.kt | 0 .../annotationReference/UnQualified.kt.after | 0 .../callOnCompanionObject/FullyQualified.kt | 0 .../FullyQualified.kt.after | 0 .../callOnCompanionObject/RootPkg.kt | 0 .../callOnCompanionObject/RootPkg.kt.after | 0 .../callOnCompanionObject/UnQualified.kt | 0 .../UnQualified.kt.after | 0 .../callOnObject/FullyQualified.kt | 0 .../callOnObject/FullyQualified.kt.after | 0 .../callOnObject/RootPkg.kt | 0 .../callOnObject/RootPkg.kt.after | 0 .../callOnObject/UnQualified.kt | 0 .../callOnObject/UnQualified.kt.after | 0 .../constructorCall/ChangeImport.kt | 0 .../constructorCall/ChangeImport.kt.after | 0 .../constructorCall/FullyQualified.kt | 0 .../constructorCall/FullyQualified.kt.after | 0 .../constructorCall/RootPkg.kt | 0 .../constructorCall/RootPkg.kt.after | 0 .../constructorCall/TypeArgument.kt | 0 .../constructorCall/TypeArgument.kt.after | 0 .../constructorCall/UnQualified.kt | 0 .../constructorCall/UnQualified.kt.after | 0 .../constructorCall/UnQualifiedInCallChain.kt | 0 .../UnQualifiedInCallChain.kt.after | 0 .../FullyQualified.kt | 0 .../FullyQualified.kt.after | 0 .../delegatedSuperTypeReference/RootPkg.kt | 0 .../RootPkg.kt.after | 0 .../Unqualified.kt | 0 .../Unqualified.kt.after | 0 .../importReference/ImportReference.kt | 0 .../importReference/ImportReference.kt.after | 0 .../ImportReferenceWithAlias.kt | 0 .../ImportReferenceWithAlias.kt.after | 0 .../objectProperty/FullyQualified.kt | 0 .../objectProperty/FullyQualified.kt.after | 0 .../objectProperty/RootPkg.kt | 0 .../objectProperty/RootPkg.kt.after | 0 .../objectProperty/UnQualified.kt | 0 .../objectProperty/UnQualified.kt.after | 0 .../propertyTypeReference/FullyQualified.kt | 0 .../FullyQualified.kt.after | 0 .../FullyQualifiedWithLongerFqn.kt | 0 .../FullyQualifiedWithLongerFqn.kt.after | 0 .../FullyQualifiedWithShorterFqn.kt | 0 .../FullyQualifiedWithShorterFqn.kt.after | 0 .../propertyTypeReference/RootPkg.kt | 0 .../propertyTypeReference/RootPkg.kt.after | 0 .../propertyTypeReference/UnQualified.kt | 0 .../UnQualified.kt.after | 0 .../returnTypeReference/FullyQualified.kt | 0 .../FullyQualified.kt.after | 0 .../returnTypeReference/RootPkg.kt | 0 .../returnTypeReference/RootPkg.kt.after | 0 .../returnTypeReference/UnQualified.kt | 0 .../returnTypeReference/UnQualified.kt.after | 0 .../superTypeCall/FullyQualified.kt | 0 .../superTypeCall/FullyQualified.kt.after | 0 .../superTypeCall/RootPkg.kt | 0 .../superTypeCall/RootPkg.kt.after | 0 .../superTypeCall/UnQualified.kt | 0 .../superTypeCall/UnQualified.kt.after | 0 .../superTypeReference/FullyQualified.kt | 0 .../FullyQualified.kt.after | 0 .../superTypeReference/RootPkg.kt | 0 .../superTypeReference/RootPkg.kt.after | 0 .../superTypeReference/UnQualified.kt | 0 .../superTypeReference/UnQualified.kt.after | 0 .../topLevelFunctionCall/Qualified.kt | 0 .../topLevelFunctionCall/Qualified.kt.after | 0 .../topLevelFunctionCall/RootPkg.kt | 0 .../topLevelFunctionCall/RootPkg.kt.after | 0 .../topLevelFunctionCall/UnQualified.kt | 0 .../topLevelFunctionCall/UnQualified.kt.after | 0 .../topLevelProperty/Qualified.kt | 0 .../topLevelProperty/Qualified.kt.after | 0 .../topLevelProperty/RootPkg.kt | 0 .../topLevelProperty/RootPkg.kt.after | 0 .../topLevelProperty/UnQualified.kt | 0 .../topLevelProperty/UnQualified.kt.after | 0 .../typeArgs/AllTypeArguments.kt | 0 .../typeArgs/AllTypeArguments.kt.after | 0 .../typeArgs/FirstLastTypeArguments.kt | 0 .../typeArgs/FirstLastTypeArguments.kt.after | 0 .../typeArgs/SingleRef.kt | 0 .../typeArgs/SingleRef.kt.after | 0 .../refactoring/K2ReferenceMutateService.kt | 4 +- .../AbstractK2BindToElementTest.kt | 32 +- .../bindToElement/AbstractK2BindToFqnTest.kt | 21 + .../bindToElement/AbstractK2BindToTest.kt | 36 + .../K2BindToElementTestGenerated.java | 1186 +++++++++-------- .../K2BindToFqnTestGenerated.java | 386 ++++++ .../GenerateK2RefactoringsTests.kt | 5 + 107 files changed, 1087 insertions(+), 609 deletions(-) create mode 100644 plugins/kotlin/idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/ExtensionOverload.kt create mode 100644 plugins/kotlin/idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/ExtensionOverload.kt.after rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/annotationCall/FullyQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/annotationCall/FullyQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/annotationCall/RootPkg.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/annotationCall/RootPkg.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/annotationCall/UnQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/annotationCall/UnQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/annotationReference/FullyQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/annotationReference/FullyQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/annotationReference/RootPkg.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/annotationReference/RootPkg.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/annotationReference/UnQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/annotationReference/UnQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/callOnCompanionObject/FullyQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/callOnCompanionObject/FullyQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/callOnCompanionObject/RootPkg.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/callOnCompanionObject/RootPkg.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/callOnCompanionObject/UnQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/callOnCompanionObject/UnQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/callOnObject/FullyQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/callOnObject/FullyQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/callOnObject/RootPkg.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/callOnObject/RootPkg.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/callOnObject/UnQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/callOnObject/UnQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/constructorCall/ChangeImport.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/constructorCall/ChangeImport.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/constructorCall/FullyQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/constructorCall/FullyQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/constructorCall/RootPkg.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/constructorCall/RootPkg.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/constructorCall/TypeArgument.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/constructorCall/TypeArgument.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/constructorCall/UnQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/constructorCall/UnQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/constructorCall/UnQualifiedInCallChain.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/constructorCall/UnQualifiedInCallChain.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/delegatedSuperTypeReference/FullyQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/delegatedSuperTypeReference/FullyQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/delegatedSuperTypeReference/RootPkg.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/delegatedSuperTypeReference/RootPkg.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/delegatedSuperTypeReference/Unqualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/delegatedSuperTypeReference/Unqualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/importReference/ImportReference.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/importReference/ImportReference.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/importReference/ImportReferenceWithAlias.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/importReference/ImportReferenceWithAlias.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/objectProperty/FullyQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/objectProperty/FullyQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/objectProperty/RootPkg.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/objectProperty/RootPkg.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/objectProperty/UnQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/objectProperty/UnQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/propertyTypeReference/FullyQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/propertyTypeReference/FullyQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/propertyTypeReference/FullyQualifiedWithLongerFqn.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/propertyTypeReference/FullyQualifiedWithLongerFqn.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/propertyTypeReference/FullyQualifiedWithShorterFqn.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/propertyTypeReference/FullyQualifiedWithShorterFqn.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/propertyTypeReference/RootPkg.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/propertyTypeReference/RootPkg.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/propertyTypeReference/UnQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/propertyTypeReference/UnQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/returnTypeReference/FullyQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/returnTypeReference/FullyQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/returnTypeReference/RootPkg.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/returnTypeReference/RootPkg.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/returnTypeReference/UnQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/returnTypeReference/UnQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/superTypeCall/FullyQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/superTypeCall/FullyQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/superTypeCall/RootPkg.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/superTypeCall/RootPkg.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/superTypeCall/UnQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/superTypeCall/UnQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/superTypeReference/FullyQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/superTypeReference/FullyQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/superTypeReference/RootPkg.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/superTypeReference/RootPkg.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/superTypeReference/UnQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/superTypeReference/UnQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/topLevelFunctionCall/Qualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/topLevelFunctionCall/Qualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/topLevelFunctionCall/RootPkg.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/topLevelFunctionCall/RootPkg.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/topLevelFunctionCall/UnQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/topLevelFunctionCall/UnQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/topLevelProperty/Qualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/topLevelProperty/Qualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/topLevelProperty/RootPkg.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/topLevelProperty/RootPkg.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/topLevelProperty/UnQualified.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/topLevelProperty/UnQualified.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/typeArgs/AllTypeArguments.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/typeArgs/AllTypeArguments.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/typeArgs/FirstLastTypeArguments.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/typeArgs/FirstLastTypeArguments.kt.after (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/typeArgs/SingleRef.kt (100%) rename plugins/kotlin/idea/tests/testData/refactoring/{bindToElement => bindToFqn}/typeArgs/SingleRef.kt.after (100%) create mode 100644 plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/AbstractK2BindToFqnTest.kt create mode 100644 plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/AbstractK2BindToTest.kt create mode 100644 plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/K2BindToFqnTestGenerated.java diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/ExtensionOverload.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/ExtensionOverload.kt new file mode 100644 index 000000000000..e22870cff21f --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/ExtensionOverload.kt @@ -0,0 +1,16 @@ +// FILE: test/Test.kt +// BIND_TO bar.fooBar +package test + +import bar.fooBar + +fun Any.usage() { + fooBar() //shorten references bug https://youtrack.jetbrains.com/issue/KT-64493, should be bar.fooBar() +} + +// FILE: bar/Bar.kt +package bar + +val fooBar: () -> Unit = { } + +val fooBar: Any.() -> Unit = { } diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/ExtensionOverload.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/ExtensionOverload.kt.after new file mode 100644 index 000000000000..42ff614b4c7f --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/ExtensionOverload.kt.after @@ -0,0 +1,10 @@ +// FILE: test/Test.kt +// BIND_TO bar.fooBar +package test + +import bar.fooBar + +fun Any.usage() { + fooBar() //shorten references bug https://youtrack.jetbrains.com/issue/KT-64493, should be bar.fooBar() +} + diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationCall/FullyQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationCall/FullyQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationCall/FullyQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationCall/FullyQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationCall/FullyQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationCall/FullyQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationCall/FullyQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationCall/FullyQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationCall/RootPkg.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationCall/RootPkg.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationCall/RootPkg.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationCall/RootPkg.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationCall/RootPkg.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationCall/RootPkg.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationCall/RootPkg.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationCall/RootPkg.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationCall/UnQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationCall/UnQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationCall/UnQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationCall/UnQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationCall/UnQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationCall/UnQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationCall/UnQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationCall/UnQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationReference/FullyQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationReference/FullyQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationReference/FullyQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationReference/FullyQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationReference/FullyQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationReference/FullyQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationReference/FullyQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationReference/FullyQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationReference/RootPkg.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationReference/RootPkg.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationReference/RootPkg.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationReference/RootPkg.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationReference/RootPkg.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationReference/RootPkg.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationReference/RootPkg.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationReference/RootPkg.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationReference/UnQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationReference/UnQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationReference/UnQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationReference/UnQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationReference/UnQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationReference/UnQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/annotationReference/UnQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/annotationReference/UnQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnCompanionObject/FullyQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/FullyQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnCompanionObject/FullyQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/FullyQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnCompanionObject/FullyQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/FullyQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnCompanionObject/FullyQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/FullyQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnCompanionObject/RootPkg.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/RootPkg.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnCompanionObject/RootPkg.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/RootPkg.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnCompanionObject/RootPkg.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/RootPkg.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnCompanionObject/RootPkg.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/RootPkg.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnCompanionObject/UnQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/UnQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnCompanionObject/UnQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/UnQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnCompanionObject/UnQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/UnQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnCompanionObject/UnQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/UnQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnObject/FullyQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnObject/FullyQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnObject/FullyQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnObject/FullyQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnObject/FullyQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnObject/FullyQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnObject/FullyQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnObject/FullyQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnObject/RootPkg.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnObject/RootPkg.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnObject/RootPkg.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnObject/RootPkg.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnObject/RootPkg.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnObject/RootPkg.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnObject/RootPkg.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnObject/RootPkg.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnObject/UnQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnObject/UnQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnObject/UnQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnObject/UnQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnObject/UnQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnObject/UnQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/callOnObject/UnQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/callOnObject/UnQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/ChangeImport.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/ChangeImport.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/ChangeImport.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/ChangeImport.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/ChangeImport.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/ChangeImport.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/ChangeImport.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/ChangeImport.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/FullyQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/FullyQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/FullyQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/FullyQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/FullyQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/FullyQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/FullyQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/FullyQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/RootPkg.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/RootPkg.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/RootPkg.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/RootPkg.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/RootPkg.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/RootPkg.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/RootPkg.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/RootPkg.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/TypeArgument.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/TypeArgument.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/TypeArgument.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/TypeArgument.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/TypeArgument.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/TypeArgument.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/TypeArgument.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/TypeArgument.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/UnQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/UnQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/UnQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/UnQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/UnQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/UnQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/UnQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/UnQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/UnQualifiedInCallChain.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/UnQualifiedInCallChain.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/UnQualifiedInCallChain.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/UnQualifiedInCallChain.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/UnQualifiedInCallChain.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/UnQualifiedInCallChain.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/constructorCall/UnQualifiedInCallChain.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/constructorCall/UnQualifiedInCallChain.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference/FullyQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/FullyQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference/FullyQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/FullyQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference/FullyQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/FullyQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference/FullyQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/FullyQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference/RootPkg.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/RootPkg.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference/RootPkg.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/RootPkg.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference/RootPkg.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/RootPkg.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference/RootPkg.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/RootPkg.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference/Unqualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/Unqualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference/Unqualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/Unqualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference/Unqualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/Unqualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference/Unqualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/Unqualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/importReference/ImportReference.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/importReference/ImportReference.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/importReference/ImportReference.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/importReference/ImportReference.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/importReference/ImportReference.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/importReference/ImportReference.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/importReference/ImportReference.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/importReference/ImportReference.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/importReference/ImportReferenceWithAlias.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/importReference/ImportReferenceWithAlias.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/importReference/ImportReferenceWithAlias.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/importReference/ImportReferenceWithAlias.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/importReference/ImportReferenceWithAlias.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/importReference/ImportReferenceWithAlias.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/importReference/ImportReferenceWithAlias.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/importReference/ImportReferenceWithAlias.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/objectProperty/FullyQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/objectProperty/FullyQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/objectProperty/FullyQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/objectProperty/FullyQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/objectProperty/FullyQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/objectProperty/FullyQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/objectProperty/FullyQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/objectProperty/FullyQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/objectProperty/RootPkg.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/objectProperty/RootPkg.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/objectProperty/RootPkg.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/objectProperty/RootPkg.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/objectProperty/RootPkg.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/objectProperty/RootPkg.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/objectProperty/RootPkg.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/objectProperty/RootPkg.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/objectProperty/UnQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/objectProperty/UnQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/objectProperty/UnQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/objectProperty/UnQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/objectProperty/UnQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/objectProperty/UnQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/objectProperty/UnQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/objectProperty/UnQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/FullyQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/FullyQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/FullyQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/FullyQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/FullyQualifiedWithLongerFqn.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualifiedWithLongerFqn.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/FullyQualifiedWithLongerFqn.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualifiedWithLongerFqn.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/FullyQualifiedWithLongerFqn.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualifiedWithLongerFqn.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/FullyQualifiedWithLongerFqn.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualifiedWithLongerFqn.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/FullyQualifiedWithShorterFqn.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualifiedWithShorterFqn.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/FullyQualifiedWithShorterFqn.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualifiedWithShorterFqn.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/FullyQualifiedWithShorterFqn.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualifiedWithShorterFqn.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/FullyQualifiedWithShorterFqn.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualifiedWithShorterFqn.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/RootPkg.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/RootPkg.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/RootPkg.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/RootPkg.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/RootPkg.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/RootPkg.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/RootPkg.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/RootPkg.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/UnQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/UnQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/UnQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/UnQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/UnQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/UnQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/propertyTypeReference/UnQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/UnQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/returnTypeReference/FullyQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/returnTypeReference/FullyQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/returnTypeReference/FullyQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/returnTypeReference/FullyQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/returnTypeReference/FullyQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/returnTypeReference/FullyQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/returnTypeReference/FullyQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/returnTypeReference/FullyQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/returnTypeReference/RootPkg.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/returnTypeReference/RootPkg.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/returnTypeReference/RootPkg.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/returnTypeReference/RootPkg.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/returnTypeReference/RootPkg.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/returnTypeReference/RootPkg.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/returnTypeReference/RootPkg.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/returnTypeReference/RootPkg.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/returnTypeReference/UnQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/returnTypeReference/UnQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/returnTypeReference/UnQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/returnTypeReference/UnQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/returnTypeReference/UnQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/returnTypeReference/UnQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/returnTypeReference/UnQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/returnTypeReference/UnQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeCall/FullyQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeCall/FullyQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeCall/FullyQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeCall/FullyQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeCall/FullyQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeCall/FullyQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeCall/FullyQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeCall/FullyQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeCall/RootPkg.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeCall/RootPkg.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeCall/RootPkg.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeCall/RootPkg.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeCall/RootPkg.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeCall/RootPkg.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeCall/RootPkg.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeCall/RootPkg.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeCall/UnQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeCall/UnQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeCall/UnQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeCall/UnQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeCall/UnQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeCall/UnQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeCall/UnQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeCall/UnQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeReference/FullyQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeReference/FullyQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeReference/FullyQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeReference/FullyQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeReference/FullyQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeReference/FullyQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeReference/FullyQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeReference/FullyQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeReference/RootPkg.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeReference/RootPkg.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeReference/RootPkg.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeReference/RootPkg.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeReference/RootPkg.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeReference/RootPkg.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeReference/RootPkg.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeReference/RootPkg.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeReference/UnQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeReference/UnQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeReference/UnQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeReference/UnQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeReference/UnQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeReference/UnQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/superTypeReference/UnQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/superTypeReference/UnQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/Qualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/Qualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/Qualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/Qualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/Qualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/Qualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/Qualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/Qualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/RootPkg.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/RootPkg.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/RootPkg.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/RootPkg.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/RootPkg.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/RootPkg.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/RootPkg.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/RootPkg.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/UnQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/UnQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/UnQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/UnQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/UnQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/UnQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/UnQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/UnQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelProperty/Qualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelProperty/Qualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelProperty/Qualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelProperty/Qualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelProperty/Qualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelProperty/Qualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelProperty/Qualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelProperty/Qualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelProperty/RootPkg.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelProperty/RootPkg.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelProperty/RootPkg.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelProperty/RootPkg.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelProperty/RootPkg.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelProperty/RootPkg.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelProperty/RootPkg.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelProperty/RootPkg.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelProperty/UnQualified.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelProperty/UnQualified.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelProperty/UnQualified.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelProperty/UnQualified.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelProperty/UnQualified.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelProperty/UnQualified.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/topLevelProperty/UnQualified.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/topLevelProperty/UnQualified.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/typeArgs/AllTypeArguments.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/typeArgs/AllTypeArguments.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/typeArgs/AllTypeArguments.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/typeArgs/AllTypeArguments.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/typeArgs/AllTypeArguments.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/typeArgs/AllTypeArguments.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/typeArgs/AllTypeArguments.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/typeArgs/AllTypeArguments.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/typeArgs/FirstLastTypeArguments.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/typeArgs/FirstLastTypeArguments.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/typeArgs/FirstLastTypeArguments.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/typeArgs/FirstLastTypeArguments.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/typeArgs/FirstLastTypeArguments.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/typeArgs/FirstLastTypeArguments.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/typeArgs/FirstLastTypeArguments.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/typeArgs/FirstLastTypeArguments.kt.after diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/typeArgs/SingleRef.kt b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/typeArgs/SingleRef.kt similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/typeArgs/SingleRef.kt rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/typeArgs/SingleRef.kt diff --git a/plugins/kotlin/idea/tests/testData/refactoring/bindToElement/typeArgs/SingleRef.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/typeArgs/SingleRef.kt.after similarity index 100% rename from plugins/kotlin/idea/tests/testData/refactoring/bindToElement/typeArgs/SingleRef.kt.after rename to plugins/kotlin/idea/tests/testData/refactoring/bindToFqn/typeArgs/SingleRef.kt.after diff --git a/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/K2ReferenceMutateService.kt b/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/K2ReferenceMutateService.kt index 3ad6d2867012..635edbf16f5f 100644 --- a/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/K2ReferenceMutateService.kt +++ b/plugins/kotlin/refactorings/kotlin.refactorings.k2/src/org/jetbrains/kotlin/idea/k2/refactoring/K2ReferenceMutateService.kt @@ -85,9 +85,7 @@ internal class K2ReferenceMutateService : KtReferenceMutateServiceBase() { if (simpleNameReference.isReferenceTo(targetElement)) return expression } else { val oldTarget = simpleNameReference.resolve() - if (oldTarget?.isCallableAsExtensionFunction() == targetElement?.isCallableAsExtensionFunction() - && oldTarget?.kotlinFqName == fqName - ) return expression + if (oldTarget?.isCallableAsExtensionFunction() == null && oldTarget?.kotlinFqName == fqName) return expression } if (fqName.isRoot) return expression val writableFqn = if (fqName.pathSegments().last().asString() == SpecialNames.DEFAULT_NAME_FOR_COMPANION_OBJECT.asString()) { diff --git a/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/AbstractK2BindToElementTest.kt b/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/AbstractK2BindToElementTest.kt index 031c6c2b6c7f..2aa40c1e0259 100644 --- a/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/AbstractK2BindToElementTest.kt +++ b/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/AbstractK2BindToElementTest.kt @@ -18,27 +18,17 @@ import org.jetbrains.kotlin.idea.test.KotlinMultiFileLightCodeInsightFixtureTest import org.jetbrains.kotlin.idea.test.ProjectDescriptorWithStdlibSources import org.jetbrains.kotlin.idea.util.application.executeWriteCommand import org.jetbrains.kotlin.kdoc.psi.impl.KDocName +import org.jetbrains.kotlin.psi.KtElement import org.jetbrains.kotlin.psi.KtSimpleNameExpression -abstract class AbstractK2BindToElementTest : KotlinMultiFileLightCodeInsightFixtureTestCase() { - override fun isFirPlugin() = true - - override fun getProjectDescriptor() = ProjectDescriptorWithStdlibSources.getInstanceWithStdlibSources() - - @OptIn(KtAllowAnalysisOnEdt::class) - override fun doMultiFileTest(files: List, globalDirectives: Directives) = allowAnalysisOnEdt { - val mainFile = files.first() - myFixture.configureFromExistingVirtualFile(mainFile.virtualFile) - val elem = mainFile.findElementAt(myFixture.caretOffset) ?: error("Couldn't find element at caret") - val refElement = elem.parentOfType(withSelf = true) - ?: elem.parentOfType() - ?: error("Element at caret isn't of type 'KtSimpleNameExpression'") - val mainReference = refElement.mainReference ?: error("Ref element doesn't have a main reference") - val bindTarget = findElementToBind()?.unwrapped ?: error("Could not find element to bind") - myFixture.project.executeWriteCommand("bindToElement") { - mainReference.bindToElement(bindTarget) - } - myFixture.checkResultByFile("${dataFile().name}.after") +abstract class AbstractK2BindToElementTest : AbstractK2BindToTest() { + override fun bindElement(refElement: KtElement) { + val mainReference = refElement.mainReference ?: error("Ref element doesn't have a main reference") + val bindTarget = findElementToBind()?.unwrapped ?: error("Could not find element to bind") + myFixture.project.executeWriteCommand("bindToElement") { + mainReference.bindToElement(bindTarget) + } + myFixture.checkResultByFile("${dataFile().name}.after") } private fun findElementToBind(): PsiElement? { @@ -48,8 +38,4 @@ abstract class AbstractK2BindToElementTest : KotlinMultiFileLightCodeInsightFixt ?: KotlinTopLevelFunctionFqnNameIndex[nameToBind, myFixture.project, projectScope].firstOrNull() ?: KotlinTopLevelPropertyFqnNameIndex[nameToBind, myFixture.project, projectScope].firstOrNull() } - - private companion object { - const val BIND_TO = "BIND_TO" - } } \ No newline at end of file diff --git a/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/AbstractK2BindToFqnTest.kt b/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/AbstractK2BindToFqnTest.kt new file mode 100644 index 000000000000..c42a2d14e075 --- /dev/null +++ b/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/AbstractK2BindToFqnTest.kt @@ -0,0 +1,21 @@ +// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package org.jetbrains.kotlin.idea.k2.refactoring.bindToElement + +import org.jetbrains.kotlin.idea.references.mainReference +import org.jetbrains.kotlin.idea.base.test.InTextDirectivesUtils +import org.jetbrains.kotlin.idea.references.KtSimpleNameReference +import org.jetbrains.kotlin.idea.util.application.executeWriteCommand +import org.jetbrains.kotlin.name.FqName +import org.jetbrains.kotlin.psi.KtElement + +abstract class AbstractK2BindToFqnTest : AbstractK2BindToTest() { + override fun bindElement(refElement: KtElement) { + val nameToBind = InTextDirectivesUtils.findStringWithPrefixes(file.text, BIND_TO) ?: return + val mainReference = refElement.mainReference ?: error("Ref element doesn't have a main reference") + myFixture.project.executeWriteCommand("bindToElement") { + if (mainReference !is KtSimpleNameReference) error("Main reference should be simple name reference") + mainReference.bindToFqName(FqName(nameToBind)) + } + myFixture.checkResultByFile("${dataFile().name}.after") + } +} \ No newline at end of file diff --git a/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/AbstractK2BindToTest.kt b/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/AbstractK2BindToTest.kt new file mode 100644 index 000000000000..6d8125dc571d --- /dev/null +++ b/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/AbstractK2BindToTest.kt @@ -0,0 +1,36 @@ +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +package org.jetbrains.kotlin.idea.k2.refactoring.bindToElement + +import com.intellij.psi.PsiFile +import com.intellij.psi.util.parentOfType +import org.jetbrains.kotlin.analysis.api.KtAllowAnalysisOnEdt +import org.jetbrains.kotlin.analysis.api.lifetime.allowAnalysisOnEdt +import org.jetbrains.kotlin.idea.test.Directives +import org.jetbrains.kotlin.idea.test.KotlinMultiFileLightCodeInsightFixtureTestCase +import org.jetbrains.kotlin.idea.test.ProjectDescriptorWithStdlibSources +import org.jetbrains.kotlin.kdoc.psi.impl.KDocName +import org.jetbrains.kotlin.psi.KtElement +import org.jetbrains.kotlin.psi.KtSimpleNameExpression + +abstract class AbstractK2BindToTest : KotlinMultiFileLightCodeInsightFixtureTestCase() { + override fun isFirPlugin() = true + + override fun getProjectDescriptor() = ProjectDescriptorWithStdlibSources.getInstanceWithStdlibSources() + + @OptIn(KtAllowAnalysisOnEdt::class) + override fun doMultiFileTest(files: List, globalDirectives: Directives) = allowAnalysisOnEdt { + val mainFile = files.first() + myFixture.configureFromExistingVirtualFile(mainFile.virtualFile) + val elem = mainFile.findElementAt(myFixture.caretOffset) ?: error("Couldn't find element at caret") + val refElement = elem.parentOfType(withSelf = true) + ?: elem.parentOfType() + ?: error("Element at caret isn't of type 'KtSimpleNameExpression'") + bindElement(refElement) + } + + abstract fun bindElement(refElement: KtElement) + + protected companion object { + const val BIND_TO = "BIND_TO" + } +} \ No newline at end of file diff --git a/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/K2BindToElementTestGenerated.java b/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/K2BindToElementTestGenerated.java index c7a5f8f3a568..9fa384da16b1 100644 --- a/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/K2BindToElementTestGenerated.java +++ b/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/K2BindToElementTestGenerated.java @@ -17,601 +17,621 @@ import org.junit.runner.RunWith; @TestRoot("refactorings/kotlin.refactorings.tests.k2") @TestDataPath("$CONTENT_ROOT") @RunWith(JUnit3RunnerWithInners.class) -@TestMetadata("../../idea/tests/testData/refactoring/bindToElement") public abstract class K2BindToElementTestGenerated extends AbstractK2BindToElementTest { @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/annotationCall") - public static class AnnotationCall extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn") + public abstract static class BindToFqn extends AbstractK2BindToElementTest { + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/annotationCall") + public static class AnnotationCall extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/annotationCall/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/annotationCall/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/annotationCall/UnQualified.kt"); + } } - @TestMetadata("FullyQualified.kt") - public void testFullyQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/annotationCall/FullyQualified.kt"); + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/annotationReference") + public static class AnnotationReference extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/annotationReference/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/annotationReference/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/annotationReference/UnQualified.kt"); + } } - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/annotationCall/RootPkg.kt"); + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject") + public static class CallOnCompanionObject extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/UnQualified.kt"); + } } - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/annotationCall/UnQualified.kt"); + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/callOnObject") + public static class CallOnObject extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/callOnObject/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/callOnObject/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/callOnObject/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/constructorCall") + public static class ConstructorCall extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("ChangeImport.kt") + public void testChangeImport() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/constructorCall/ChangeImport.kt"); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/constructorCall/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/constructorCall/RootPkg.kt"); + } + + @TestMetadata("TypeArgument.kt") + public void testTypeArgument() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/constructorCall/TypeArgument.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/constructorCall/UnQualified.kt"); + } + + @TestMetadata("UnQualifiedInCallChain.kt") + public void testUnQualifiedInCallChain() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/constructorCall/UnQualifiedInCallChain.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference") + public static class DelegatedSuperTypeReference extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/RootPkg.kt"); + } + + @TestMetadata("Unqualified.kt") + public void testUnqualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/Unqualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/importReference") + public static class ImportReference extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("ImportReference.kt") + public void testImportReference() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/importReference/ImportReference.kt"); + } + + @TestMetadata("ImportReferenceWithAlias.kt") + public void testImportReferenceWithAlias() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/importReference/ImportReferenceWithAlias.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/objectProperty") + public static class ObjectProperty extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/objectProperty/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/objectProperty/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/objectProperty/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/propertyTypeReference") + public static class PropertyTypeReference extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualified.kt"); + } + + @TestMetadata("FullyQualifiedWithLongerFqn.kt") + public void testFullyQualifiedWithLongerFqn() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualifiedWithLongerFqn.kt"); + } + + @TestMetadata("FullyQualifiedWithShorterFqn.kt") + public void testFullyQualifiedWithShorterFqn() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualifiedWithShorterFqn.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/returnTypeReference") + public static class ReturnTypeReference extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/returnTypeReference/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/returnTypeReference/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/returnTypeReference/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/superTypeCall") + public static class SuperTypeCall extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/superTypeCall/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/superTypeCall/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/superTypeCall/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/superTypeReference") + public static class SuperTypeReference extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/superTypeReference/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/superTypeReference/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/superTypeReference/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall") + public static class TopLevelFunctionCall extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("Qualified.kt") + public void testQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/Qualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/topLevelProperty") + public static class TopLevelProperty extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("Qualified.kt") + public void testQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/topLevelProperty/Qualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/topLevelProperty/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/topLevelProperty/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/typeArgs") + public static class TypeArgs extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("AllTypeArguments.kt") + public void testAllTypeArguments() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/typeArgs/AllTypeArguments.kt"); + } + + @TestMetadata("FirstLastTypeArguments.kt") + public void testFirstLastTypeArguments() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/typeArgs/FirstLastTypeArguments.kt"); + } + + @TestMetadata("SingleRef.kt") + public void testSingleRef() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/typeArgs/SingleRef.kt"); + } } } @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/annotationReference") - public static class AnnotationReference extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("FullyQualified.kt") - public void testFullyQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/annotationReference/FullyQualified.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/annotationReference/RootPkg.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/annotationReference/UnQualified.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/callOnCompanionObject") - public static class CallOnCompanionObject extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("FullyQualified.kt") - public void testFullyQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callOnCompanionObject/FullyQualified.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callOnCompanionObject/RootPkg.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callOnCompanionObject/UnQualified.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/callOnObject") - public static class CallOnObject extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("FullyQualified.kt") - public void testFullyQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callOnObject/FullyQualified.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callOnObject/RootPkg.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callOnObject/UnQualified.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/callableMemberReference") - public static class CallableMemberReference extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("FullyQualified.kt") - public void testFullyQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callableMemberReference/FullyQualified.kt"); - } - - @TestMetadata("FullyQualifiedToTopLevel.kt") - public void testFullyQualifiedToTopLevel() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callableMemberReference/FullyQualifiedToTopLevel.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callableMemberReference/RootPkg.kt"); - } - - @TestMetadata("RootPkgToTopLevel.kt") - public void testRootPkgToTopLevel() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callableMemberReference/RootPkgToTopLevel.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callableMemberReference/UnQualified.kt"); - } - - @TestMetadata("UnQualifiedToTopLevel.kt") - public void testUnQualifiedToTopLevel() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callableMemberReference/UnQualifiedToTopLevel.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/callableTopLevelReference") - public static class CallableTopLevelReference extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("ConflictingImport.kt") - public void testConflictingImport() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callableTopLevelReference/ConflictingImport.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callableTopLevelReference/RootPkg.kt"); - } - - @TestMetadata("RootPkgToMember.kt") - public void testRootPkgToMember() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callableTopLevelReference/RootPkgToMember.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callableTopLevelReference/UnQualified.kt"); - } - - @TestMetadata("UnQualifiedToMember.kt") - public void testUnQualifiedToMember() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/callableTopLevelReference/UnQualifiedToMember.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/constructorCall") - public static class ConstructorCall extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("ChangeImport.kt") - public void testChangeImport() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/constructorCall/ChangeImport.kt"); - } - - @TestMetadata("FullyQualified.kt") - public void testFullyQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/constructorCall/FullyQualified.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/constructorCall/RootPkg.kt"); - } - - @TestMetadata("TypeArgument.kt") - public void testTypeArgument() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/constructorCall/TypeArgument.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/constructorCall/UnQualified.kt"); - } - - @TestMetadata("UnQualifiedInCallChain.kt") - public void testUnQualifiedInCallChain() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/constructorCall/UnQualifiedInCallChain.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference") - public static class DelegatedSuperTypeReference extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("FullyQualified.kt") - public void testFullyQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference/FullyQualified.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference/RootPkg.kt"); - } - - @TestMetadata("Unqualified.kt") - public void testUnqualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/delegatedSuperTypeReference/Unqualified.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/docReference") - public static class DocReference extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("FullyQualified.kt") - public void testFullyQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/docReference/FullyQualified.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/docReference/RootPkg.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/docReference/UnQualified.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/extensionFunctionCall") - public static class ExtensionFunctionCall extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("ChangeImport.kt") - public void testChangeImport() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionFunctionCall/ChangeImport.kt"); - } - - @TestMetadata("ConflictingImport.kt") - public void testConflictingImport() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionFunctionCall/ConflictingImport.kt"); - } - - @TestMetadata("ExtensionOverload.kt") - public void testExtensionOverload() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionFunctionCall/ExtensionOverload.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionFunctionCall/RootPkg.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionFunctionCall/UnQualified.kt"); - } - - @TestMetadata("UnQualifiedToTopLevel.kt") - public void testUnQualifiedToTopLevel() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionFunctionCall/UnQualifiedToTopLevel.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/extensionProperty") - public static class ExtensionProperty extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("ChangeImport.kt") - public void testChangeImport() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionProperty/ChangeImport.kt"); - } - - @TestMetadata("ConflictingImport.kt") - public void testConflictingImport() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionProperty/ConflictingImport.kt"); - } - - @TestMetadata("ExtensionOverload.kt") - public void testExtensionOverload() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionProperty/ExtensionOverload.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionProperty/RootPkg.kt"); - } - - @TestMetadata("SafeAccess.kt") - public void testSafeAccess() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionProperty/SafeAccess.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionProperty/UnQualified.kt"); - } - - @TestMetadata("UnQualifiedToTopLevel.kt") - public void testUnQualifiedToTopLevel() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionProperty/UnQualifiedToTopLevel.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall") - public static class ExtensionVariableAccessCall extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("ChangeImport.kt") - public void testChangeImport() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/ChangeImport.kt"); - } - - @TestMetadata("ConflictingImport.kt") - public void testConflictingImport() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/ConflictingImport.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/RootPkg.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/UnQualified.kt"); - } - - @TestMetadata("UnQualifiedWithoutExplicitType.kt") - public void testUnQualifiedWithoutExplicitType() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/UnQualifiedWithoutExplicitType.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/importReference") - public static class ImportReference extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("ImportReference.kt") - public void testImportReference() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/importReference/ImportReference.kt"); - } - - @TestMetadata("ImportReferenceWithAlias.kt") - public void testImportReferenceWithAlias() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/importReference/ImportReferenceWithAlias.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/objectProperty") - public static class ObjectProperty extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("FullyQualified.kt") - public void testFullyQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/objectProperty/FullyQualified.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/objectProperty/RootPkg.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/objectProperty/UnQualified.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/operationReference") - public static class OperationReference extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/operationReference/RootPkg.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/operationReference/UnQualified.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/propertyTypeReference") - public static class PropertyTypeReference extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("FullyQualified.kt") - public void testFullyQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/propertyTypeReference/FullyQualified.kt"); - } - - @TestMetadata("FullyQualifiedWithLongerFqn.kt") - public void testFullyQualifiedWithLongerFqn() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/propertyTypeReference/FullyQualifiedWithLongerFqn.kt"); - } - - @TestMetadata("FullyQualifiedWithShorterFqn.kt") - public void testFullyQualifiedWithShorterFqn() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/propertyTypeReference/FullyQualifiedWithShorterFqn.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/propertyTypeReference/RootPkg.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/propertyTypeReference/UnQualified.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/returnTypeReference") - public static class ReturnTypeReference extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("FullyQualified.kt") - public void testFullyQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/returnTypeReference/FullyQualified.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/returnTypeReference/RootPkg.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/returnTypeReference/UnQualified.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/superTypeCall") - public static class SuperTypeCall extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("FullyQualified.kt") - public void testFullyQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/superTypeCall/FullyQualified.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/superTypeCall/RootPkg.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/superTypeCall/UnQualified.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/superTypeReference") - public static class SuperTypeReference extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("FullyQualified.kt") - public void testFullyQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/superTypeReference/FullyQualified.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/superTypeReference/RootPkg.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/superTypeReference/UnQualified.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall") - public static class TopLevelFunctionCall extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("Qualified.kt") - public void testQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/Qualified.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/RootPkg.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/UnQualified.kt"); - } - - @TestMetadata("UnQualifiedToExtensionFunction.kt") - public void testUnQualifiedToExtensionFunction() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/UnQualifiedToExtensionFunction.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/topLevelProperty") - public static class TopLevelProperty extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("Qualified.kt") - public void testQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/topLevelProperty/Qualified.kt"); - } - - @TestMetadata("RootPkg.kt") - public void testRootPkg() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/topLevelProperty/RootPkg.kt"); - } - - @TestMetadata("UnQualified.kt") - public void testUnQualified() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/topLevelProperty/UnQualified.kt"); - } - } - - @RunWith(JUnit3RunnerWithInners.class) - @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/typeArgs") - public static class TypeArgs extends AbstractK2BindToElementTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - @TestMetadata("AllTypeArguments.kt") - public void testAllTypeArguments() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/typeArgs/AllTypeArguments.kt"); - } - - @TestMetadata("FirstLastTypeArguments.kt") - public void testFirstLastTypeArguments() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/typeArgs/FirstLastTypeArguments.kt"); - } - - @TestMetadata("SingleRef.kt") - public void testSingleRef() throws Exception { - runTest("../../idea/tests/testData/refactoring/bindToElement/typeArgs/SingleRef.kt"); + @TestMetadata("../../idea/tests/testData/refactoring/bindToElement") + public abstract static class BindToElement extends AbstractK2BindToElementTest { + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/callableMemberReference") + public static class CallableMemberReference extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/callableMemberReference/FullyQualified.kt"); + } + + @TestMetadata("FullyQualifiedToTopLevel.kt") + public void testFullyQualifiedToTopLevel() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/callableMemberReference/FullyQualifiedToTopLevel.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/callableMemberReference/RootPkg.kt"); + } + + @TestMetadata("RootPkgToTopLevel.kt") + public void testRootPkgToTopLevel() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/callableMemberReference/RootPkgToTopLevel.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/callableMemberReference/UnQualified.kt"); + } + + @TestMetadata("UnQualifiedToTopLevel.kt") + public void testUnQualifiedToTopLevel() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/callableMemberReference/UnQualifiedToTopLevel.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/callableTopLevelReference") + public static class CallableTopLevelReference extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("ConflictingImport.kt") + public void testConflictingImport() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/callableTopLevelReference/ConflictingImport.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/callableTopLevelReference/RootPkg.kt"); + } + + @TestMetadata("RootPkgToMember.kt") + public void testRootPkgToMember() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/callableTopLevelReference/RootPkgToMember.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/callableTopLevelReference/UnQualified.kt"); + } + + @TestMetadata("UnQualifiedToMember.kt") + public void testUnQualifiedToMember() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/callableTopLevelReference/UnQualifiedToMember.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/docReference") + public static class DocReference extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/docReference/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/docReference/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/docReference/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/extensionFunctionCall") + public static class ExtensionFunctionCall extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("ChangeImport.kt") + public void testChangeImport() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionFunctionCall/ChangeImport.kt"); + } + + @TestMetadata("ConflictingImport.kt") + public void testConflictingImport() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionFunctionCall/ConflictingImport.kt"); + } + + @TestMetadata("ExtensionOverload.kt") + public void testExtensionOverload() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionFunctionCall/ExtensionOverload.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionFunctionCall/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionFunctionCall/UnQualified.kt"); + } + + @TestMetadata("UnQualifiedToTopLevel.kt") + public void testUnQualifiedToTopLevel() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionFunctionCall/UnQualifiedToTopLevel.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/extensionProperty") + public static class ExtensionProperty extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("ChangeImport.kt") + public void testChangeImport() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionProperty/ChangeImport.kt"); + } + + @TestMetadata("ConflictingImport.kt") + public void testConflictingImport() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionProperty/ConflictingImport.kt"); + } + + @TestMetadata("ExtensionOverload.kt") + public void testExtensionOverload() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionProperty/ExtensionOverload.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionProperty/RootPkg.kt"); + } + + @TestMetadata("SafeAccess.kt") + public void testSafeAccess() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionProperty/SafeAccess.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionProperty/UnQualified.kt"); + } + + @TestMetadata("UnQualifiedToTopLevel.kt") + public void testUnQualifiedToTopLevel() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionProperty/UnQualifiedToTopLevel.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall") + public static class ExtensionVariableAccessCall extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("ChangeImport.kt") + public void testChangeImport() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/ChangeImport.kt"); + } + + @TestMetadata("ConflictingImport.kt") + public void testConflictingImport() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/ConflictingImport.kt"); + } + + @TestMetadata("ExtensionOverload.kt") + public void testExtensionOverload() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/ExtensionOverload.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/UnQualified.kt"); + } + + @TestMetadata("UnQualifiedWithoutExplicitType.kt") + public void testUnQualifiedWithoutExplicitType() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/extensionVariableAccessCall/UnQualifiedWithoutExplicitType.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/operationReference") + public static class OperationReference extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/operationReference/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/operationReference/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall") + public static class TopLevelFunctionCall extends AbstractK2BindToElementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("UnQualifiedToExtensionFunction.kt") + public void testUnQualifiedToExtensionFunction() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToElement/topLevelFunctionCall/UnQualifiedToExtensionFunction.kt"); + } } } } diff --git a/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/K2BindToFqnTestGenerated.java b/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/K2BindToFqnTestGenerated.java new file mode 100644 index 000000000000..431e321afa23 --- /dev/null +++ b/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/bindToElement/K2BindToFqnTestGenerated.java @@ -0,0 +1,386 @@ +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. + +package org.jetbrains.kotlin.idea.k2.refactoring.bindToElement; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.idea.test.JUnit3RunnerWithInners; +import org.jetbrains.kotlin.idea.test.KotlinTestUtils; +import org.jetbrains.kotlin.test.TestMetadata; +import org.jetbrains.kotlin.idea.base.test.TestRoot; +import org.junit.runner.RunWith; + +/** + * This class is generated by {@link org.jetbrains.kotlin.testGenerator.generator.TestGenerator}. + * DO NOT MODIFY MANUALLY. + */ +@SuppressWarnings("all") +@TestRoot("refactorings/kotlin.refactorings.tests.k2") +@TestDataPath("$CONTENT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +@TestMetadata("../../idea/tests/testData/refactoring/bindToFqn") +public abstract class K2BindToFqnTestGenerated extends AbstractK2BindToFqnTest { + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/annotationCall") + public static class AnnotationCall extends AbstractK2BindToFqnTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/annotationCall/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/annotationCall/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/annotationCall/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/annotationReference") + public static class AnnotationReference extends AbstractK2BindToFqnTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/annotationReference/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/annotationReference/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/annotationReference/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject") + public static class CallOnCompanionObject extends AbstractK2BindToFqnTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/callOnCompanionObject/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/callOnObject") + public static class CallOnObject extends AbstractK2BindToFqnTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/callOnObject/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/callOnObject/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/callOnObject/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/constructorCall") + public static class ConstructorCall extends AbstractK2BindToFqnTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("ChangeImport.kt") + public void testChangeImport() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/constructorCall/ChangeImport.kt"); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/constructorCall/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/constructorCall/RootPkg.kt"); + } + + @TestMetadata("TypeArgument.kt") + public void testTypeArgument() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/constructorCall/TypeArgument.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/constructorCall/UnQualified.kt"); + } + + @TestMetadata("UnQualifiedInCallChain.kt") + public void testUnQualifiedInCallChain() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/constructorCall/UnQualifiedInCallChain.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference") + public static class DelegatedSuperTypeReference extends AbstractK2BindToFqnTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/RootPkg.kt"); + } + + @TestMetadata("Unqualified.kt") + public void testUnqualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/delegatedSuperTypeReference/Unqualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/importReference") + public static class ImportReference extends AbstractK2BindToFqnTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("ImportReference.kt") + public void testImportReference() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/importReference/ImportReference.kt"); + } + + @TestMetadata("ImportReferenceWithAlias.kt") + public void testImportReferenceWithAlias() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/importReference/ImportReferenceWithAlias.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/objectProperty") + public static class ObjectProperty extends AbstractK2BindToFqnTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/objectProperty/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/objectProperty/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/objectProperty/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/propertyTypeReference") + public static class PropertyTypeReference extends AbstractK2BindToFqnTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualified.kt"); + } + + @TestMetadata("FullyQualifiedWithLongerFqn.kt") + public void testFullyQualifiedWithLongerFqn() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualifiedWithLongerFqn.kt"); + } + + @TestMetadata("FullyQualifiedWithShorterFqn.kt") + public void testFullyQualifiedWithShorterFqn() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/FullyQualifiedWithShorterFqn.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/propertyTypeReference/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/returnTypeReference") + public static class ReturnTypeReference extends AbstractK2BindToFqnTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/returnTypeReference/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/returnTypeReference/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/returnTypeReference/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/superTypeCall") + public static class SuperTypeCall extends AbstractK2BindToFqnTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/superTypeCall/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/superTypeCall/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/superTypeCall/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/superTypeReference") + public static class SuperTypeReference extends AbstractK2BindToFqnTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("FullyQualified.kt") + public void testFullyQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/superTypeReference/FullyQualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/superTypeReference/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/superTypeReference/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall") + public static class TopLevelFunctionCall extends AbstractK2BindToFqnTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("Qualified.kt") + public void testQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/Qualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/topLevelFunctionCall/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/topLevelProperty") + public static class TopLevelProperty extends AbstractK2BindToFqnTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("Qualified.kt") + public void testQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/topLevelProperty/Qualified.kt"); + } + + @TestMetadata("RootPkg.kt") + public void testRootPkg() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/topLevelProperty/RootPkg.kt"); + } + + @TestMetadata("UnQualified.kt") + public void testUnQualified() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/topLevelProperty/UnQualified.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../idea/tests/testData/refactoring/bindToFqn/typeArgs") + public static class TypeArgs extends AbstractK2BindToFqnTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("AllTypeArguments.kt") + public void testAllTypeArguments() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/typeArgs/AllTypeArguments.kt"); + } + + @TestMetadata("FirstLastTypeArguments.kt") + public void testFirstLastTypeArguments() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/typeArgs/FirstLastTypeArguments.kt"); + } + + @TestMetadata("SingleRef.kt") + public void testSingleRef() throws Exception { + runTest("../../idea/tests/testData/refactoring/bindToFqn/typeArgs/SingleRef.kt"); + } + } +} diff --git a/plugins/kotlin/util/test-generator-fir/test/org/jetbrains/kotlin/fir/testGenerator/GenerateK2RefactoringsTests.kt b/plugins/kotlin/util/test-generator-fir/test/org/jetbrains/kotlin/fir/testGenerator/GenerateK2RefactoringsTests.kt index e70aebf7e7c1..9ba5e38b1905 100644 --- a/plugins/kotlin/util/test-generator-fir/test/org/jetbrains/kotlin/fir/testGenerator/GenerateK2RefactoringsTests.kt +++ b/plugins/kotlin/util/test-generator-fir/test/org/jetbrains/kotlin/fir/testGenerator/GenerateK2RefactoringsTests.kt @@ -2,6 +2,7 @@ package org.jetbrains.kotlin.fir.testGenerator import org.jetbrains.kotlin.idea.k2.refactoring.bindToElement.AbstractK2BindToElementTest +import org.jetbrains.kotlin.idea.k2.refactoring.bindToElement.AbstractK2BindToFqnTest import org.jetbrains.kotlin.idea.k2.refactoring.inline.AbstractKotlinFirInlineTest import org.jetbrains.kotlin.idea.k2.refactoring.introduce.AbstractK2PsiUnifierTest import org.jetbrains.kotlin.idea.k2.refactoring.introduce.introduceVariable.AbstractK2IntroduceVariableTest @@ -42,8 +43,12 @@ internal fun MutableTWorkspace.generateK2RefactoringsTests() { } testClass { + model("refactoring/bindToFqn") model("refactoring/bindToElement") } + testClass { + model("refactoring/bindToFqn") + } testClass { model("refactoring/inline/inlineVariableOrProperty", isRecursive = false, pattern = Patterns.KT_WITHOUT_DOTS) model("refactoring/inline/inlineVariableOrProperty/addParenthesis", pattern = Patterns.KT_WITHOUT_DOTS)