diff --git a/idea/resources/META-INF/jvm.xml b/idea/resources/META-INF/jvm.xml index 5005ee32789..d7009cafe14 100644 --- a/idea/resources/META-INF/jvm.xml +++ b/idea/resources/META-INF/jvm.xml @@ -176,11 +176,6 @@ defaultValue="true" restartRequired="false"/> - - > { val contextElement = sourcePsi - - if (!Registry.`is`("kotlin.uast.multiresolve.enabled", true)) { - val calleeExpression = contextElement.calleeExpression ?: return emptyList() - return calleeExpression.multiResolveResults() - .mapNotNull { it.element.safeAs()?.let { TypedResolveResult(it) } } - .asIterable() - } - val calleeExpression = contextElement.calleeExpression as? KtReferenceExpression ?: return emptyList() val methodName = methodName ?: calleeExpression.text ?: return emptyList() val variants = getReferenceVariants(calleeExpression, methodName) diff --git a/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/internal/kotlinUastMultiresolve.kt b/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/internal/kotlinUastMultiresolve.kt index 2434337d160..e0be1a5525b 100644 --- a/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/internal/kotlinUastMultiresolve.kt +++ b/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/internal/kotlinUastMultiresolve.kt @@ -6,7 +6,6 @@ package org.jetbrains.uast.kotlin.internal import com.intellij.openapi.components.ServiceManager -import com.intellij.openapi.util.registry.Registry import com.intellij.psi.PsiElement import com.intellij.psi.PsiPolyVariantReference import com.intellij.psi.PsiSubstitutor @@ -29,8 +28,6 @@ internal fun getReferenceVariants(ktElement: KtElement, nameHint: String): Seque internal fun UElement.getResolveResultVariants(ktExpression: KtExpression?): Iterable { ktExpression ?: return emptyList() - if (!Registry.`is`("kotlin.uast.multiresolve.enabled", true)) return ktExpression.multiResolveResults().asIterable() - val referenceVariants = getReferenceVariants(ktExpression, ktExpression.name ?: ktExpression.text) fun asCandidateInfo(descriptor: DeclarationDescriptor): CandidateInfo? = diff --git a/plugins/uast-kotlin/tests/AbstractKotlinUastLightCodeInsightFixtureTest.kt b/plugins/uast-kotlin/tests/AbstractKotlinUastLightCodeInsightFixtureTest.kt index d209116a5fd..6947d011c81 100644 --- a/plugins/uast-kotlin/tests/AbstractKotlinUastLightCodeInsightFixtureTest.kt +++ b/plugins/uast-kotlin/tests/AbstractKotlinUastLightCodeInsightFixtureTest.kt @@ -5,7 +5,6 @@ package org.jetbrains.uast.test.kotlin -import com.intellij.openapi.util.registry.Registry import com.intellij.openapi.vfs.VirtualFile import com.intellij.openapi.vfs.VirtualFileManager import com.intellij.testFramework.LightProjectDescriptor @@ -21,11 +20,6 @@ abstract class AbstractKotlinUastLightCodeInsightFixtureTest : KotlinLightCodeIn override fun getProjectDescriptor(): LightProjectDescriptor = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE_FULL_JDK - override fun setUp() { - super.setUp() - Registry.get("kotlin.uast.multiresolve.enabled").setValue(true, testRootDisposable) - } - fun getVirtualFile(testName: String): VirtualFile { val testFile = TEST_KOTLIN_MODEL_DIR.listFiles { pathname -> pathname.nameWithoutExtension == testName }.first() val vfs = VirtualFileManager.getInstance().getFileSystem(URLUtil.FILE_PROTOCOL) diff --git a/plugins/uast-kotlin/tests/AbstractKotlinUastLightCodeInsightFixtureTest.kt.191 b/plugins/uast-kotlin/tests/AbstractKotlinUastLightCodeInsightFixtureTest.kt.191 index d43fe9fd4b1..724b7a40c45 100644 --- a/plugins/uast-kotlin/tests/AbstractKotlinUastLightCodeInsightFixtureTest.kt.191 +++ b/plugins/uast-kotlin/tests/AbstractKotlinUastLightCodeInsightFixtureTest.kt.191 @@ -21,11 +21,6 @@ abstract class AbstractKotlinUastLightCodeInsightFixtureTest : KotlinLightCodeIn override fun getProjectDescriptor(): LightProjectDescriptor = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE_FULL_JDK - override fun setUp() { - super.setUp() - Registry.get("kotlin.uast.multiresolve.enabled").setValue(true, testRootDisposable) - } - fun getVirtualFile(testName: String): VirtualFile { val testFile = TEST_KOTLIN_MODEL_DIR.listFiles { pathname -> pathname.nameWithoutExtension == testName }.first() val vfs = VirtualFileManager.getInstance().getFileSystem(URLUtil.FILE_PROTOCOL) diff --git a/plugins/uast-kotlin/tests/KotlinUastResolveApiTest.kt b/plugins/uast-kotlin/tests/KotlinUastResolveApiTest.kt index feffaba2535..4786f3ec25f 100644 --- a/plugins/uast-kotlin/tests/KotlinUastResolveApiTest.kt +++ b/plugins/uast-kotlin/tests/KotlinUastResolveApiTest.kt @@ -5,7 +5,6 @@ package org.jetbrains.uast.test.kotlin -import com.intellij.openapi.util.registry.Registry import com.intellij.psi.PsiClassType import com.intellij.psi.PsiType import com.intellij.testFramework.LightProjectDescriptor @@ -29,10 +28,6 @@ class KotlinUastResolveApiTest : KotlinLightCodeInsightFixtureTestCase() { override fun getProjectDescriptor(): LightProjectDescriptor = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE - override fun setUp() { - super.setUp() - Registry.get("kotlin.uast.multiresolve.enabled").setValue(true, testRootDisposable) - } fun testResolveStringFromUast() { val file = myFixture.addFileToProject(