FIR IDE: remove enabled/disable FirResolution by registry
This separation is made based on plugins now
This commit is contained in:
@@ -17,7 +17,6 @@ abstract class AbstractFirPsiCheckerTest : AbstractPsiCheckerTest() {
|
|||||||
|
|
||||||
override fun setUp() {
|
override fun setUp() {
|
||||||
super.setUp()
|
super.setUp()
|
||||||
FirResolution.enabled = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun doTest(filePath: String) {
|
override fun doTest(filePath: String) {
|
||||||
@@ -48,7 +47,6 @@ abstract class AbstractFirPsiCheckerTest : AbstractPsiCheckerTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun tearDown() {
|
override fun tearDown() {
|
||||||
FirResolution.enabled = false
|
|
||||||
super.tearDown()
|
super.tearDown()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-3
@@ -6,7 +6,6 @@
|
|||||||
package org.jetbrains.kotlin.idea.resolve
|
package org.jetbrains.kotlin.idea.resolve
|
||||||
|
|
||||||
import org.jetbrains.kotlin.idea.completion.test.configureWithExtraFile
|
import org.jetbrains.kotlin.idea.completion.test.configureWithExtraFile
|
||||||
import org.jetbrains.kotlin.idea.fir.low.level.api.FirResolution
|
|
||||||
import org.jetbrains.kotlin.idea.test.KotlinLightProjectDescriptor
|
import org.jetbrains.kotlin.idea.test.KotlinLightProjectDescriptor
|
||||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils
|
import org.jetbrains.kotlin.test.InTextDirectivesUtils
|
||||||
@@ -19,7 +18,6 @@ abstract class AbstractFirReferenceResolveTest : AbstractReferenceResolveTest()
|
|||||||
|
|
||||||
override fun setUp() {
|
override fun setUp() {
|
||||||
super.setUp()
|
super.setUp()
|
||||||
FirResolution.enabled = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun doTest(path: String) {
|
override fun doTest(path: String) {
|
||||||
@@ -37,7 +35,6 @@ abstract class AbstractFirReferenceResolveTest : AbstractReferenceResolveTest()
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun tearDown() {
|
override fun tearDown() {
|
||||||
FirResolution.enabled = false
|
|
||||||
super.tearDown()
|
super.tearDown()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.fir.low.level.api
|
|
||||||
|
|
||||||
import com.intellij.openapi.util.registry.Registry
|
|
||||||
|
|
||||||
// Just a wrapper to see whether resolve works via FIR or not
|
|
||||||
object FirResolution {
|
|
||||||
private const val optionName = "kotlin.use.fir.resolution"
|
|
||||||
|
|
||||||
private val initialEnabledValue: Boolean by lazy {
|
|
||||||
Registry.`is`(optionName, /* defaultValue = */ true)
|
|
||||||
}
|
|
||||||
|
|
||||||
private var changedEnabledValue: Boolean? = null
|
|
||||||
|
|
||||||
var enabled: Boolean
|
|
||||||
get() = changedEnabledValue ?: initialEnabledValue
|
|
||||||
set(value) {
|
|
||||||
changedEnabledValue = value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -113,10 +113,7 @@
|
|||||||
description="Add all transitive dependencies on MPP modules when Android project is imported"
|
description="Add all transitive dependencies on MPP modules when Android project is imported"
|
||||||
defaultValue="true"
|
defaultValue="true"
|
||||||
restartRequired="false"/>
|
restartRequired="false"/>
|
||||||
<registryKey key="kotlin.use.fir.resolution"
|
|
||||||
description="Use Kotlin resolution via frontend IR for reference resolve and diagnostics in IDEA"
|
|
||||||
defaultValue="false"
|
|
||||||
restartRequired="true"/>
|
|
||||||
<registryKey key="kotlin.gradle.scripts.useIdeaProjectImport"
|
<registryKey key="kotlin.gradle.scripts.useIdeaProjectImport"
|
||||||
description="Use IDEA project import mechanics to load Kotlin Gradle scripts configuration"
|
description="Use IDEA project import mechanics to load Kotlin Gradle scripts configuration"
|
||||||
defaultValue="false"
|
defaultValue="false"
|
||||||
|
|||||||
Reference in New Issue
Block a user