Move Kotlin internal actions to Internal menu and unify modes (KT-23975)

#KT-23975 Fixed
This commit is contained in:
Nikolay Krasko
2018-04-24 12:34:34 +03:00
parent 5af490f5e5
commit 82a21b3955
15 changed files with 193 additions and 325 deletions
@@ -47,8 +47,6 @@ import java.util.*
import kotlin.reflect.full.findAnnotation
abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFixtureTestCaseBase() {
private var kotlinInternalModeOriginalValue = false
private val exceptions = ArrayList<Throwable>()
protected val module: Module get() = myFixture.module
@@ -60,9 +58,6 @@ abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFix
(StartupManager.getInstance(project) as StartupManagerImpl).runPostStartupActivities()
VfsRootAccess.allowRootAccess(KotlinTestUtils.getHomeDirectory())
kotlinInternalModeOriginalValue = KotlinInternalMode.enabled
KotlinInternalMode.enabled = true
project.getComponent(EditorTracker::class.java)?.projectOpened()
invalidateLibraryCache(project)
@@ -81,7 +76,6 @@ abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFix
override fun tearDown() {
LoggedErrorProcessor.restoreDefaultProcessor()
KotlinInternalMode.enabled = kotlinInternalModeOriginalValue
VfsRootAccess.disallowRootAccess(KotlinTestUtils.getHomeDirectory())
doKotlinTearDown(project) {
@@ -47,8 +47,6 @@ import java.util.*
import kotlin.reflect.full.findAnnotation
abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFixtureTestCaseBase() {
private var kotlinInternalModeOriginalValue = false
private val exceptions = ArrayList<Throwable>()
protected val module: Module get() = myFixture.module
@@ -60,9 +58,6 @@ abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFix
(StartupManager.getInstance(project) as StartupManagerImpl).runPostStartupActivities()
VfsRootAccess.allowRootAccess(KotlinTestUtils.getHomeDirectory())
kotlinInternalModeOriginalValue = KotlinInternalMode.enabled
KotlinInternalMode.enabled = true
project.getComponent(EditorTracker::class.java)?.projectOpened()
invalidateLibraryCache(project)
@@ -80,7 +75,6 @@ abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFix
override fun tearDown() {
LoggedErrorProcessor.restoreDefaultProcessor()
KotlinInternalMode.enabled = kotlinInternalModeOriginalValue
VfsRootAccess.disallowRootAccess(KotlinTestUtils.getHomeDirectory())
doKotlinTearDown(project) {
@@ -26,20 +26,14 @@ import org.jetbrains.kotlin.test.TestMetadata
import kotlin.reflect.full.findAnnotation
abstract class KotlinLightPlatformCodeInsightFixtureTestCase: LightPlatformCodeInsightFixtureTestCase() {
private var kotlinInternalModeOriginalValue: Boolean = false
override fun setUp() {
super.setUp()
(StartupManager.getInstance(project) as StartupManagerImpl).runPostStartupActivities()
VfsRootAccess.allowRootAccess(KotlinTestUtils.getHomeDirectory())
invalidateLibraryCache(project)
kotlinInternalModeOriginalValue = KotlinInternalMode.enabled
KotlinInternalMode.enabled = true
}
override fun tearDown() {
KotlinInternalMode.enabled = kotlinInternalModeOriginalValue
VfsRootAccess.disallowRootAccess(KotlinTestUtils.getHomeDirectory())
doKotlinTearDown(project) {