From 0d2d76696c569f46d61a36bea59234ae254f4c91 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Mon, 2 Dec 2019 15:21:09 +0300 Subject: [PATCH] Add FirResolution.enabled wrapper --- .../kotlin/idea/fir/FirResolution.kt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 idea/idea-analysis/src/org/jetbrains/kotlin/idea/fir/FirResolution.kt diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/fir/FirResolution.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/fir/FirResolution.kt new file mode 100644 index 00000000000..3e8543d59b0 --- /dev/null +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/fir/FirResolution.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2010-2019 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 + +import com.intellij.ide.util.PropertiesComponent + +// Just a wrapper to see whether resolve works via FIR or not +object FirResolution { + private const val ENABLED_BY_DEFAULT = false + private const val optionName = "kotlin.use.fir.resolution" + + var enabled: Boolean + get() = PropertiesComponent.getInstance().getBoolean(optionName, ENABLED_BY_DEFAULT) + set(value) { + PropertiesComponent.getInstance().setValue(optionName, value, ENABLED_BY_DEFAULT) + } +} \ No newline at end of file