FIR IDE: disable some script stuff in FIR plugin as causes exceptions

This commit is contained in:
Ilya Kirillov
2020-12-21 12:47:00 +01:00
parent 70b1edb81d
commit d06a5fb413
6 changed files with 52 additions and 0 deletions
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.idea.core.script.ucache
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.application.runInEdt
import com.intellij.openapi.components.service
import com.intellij.openapi.fileEditor.FileEditorManager
import com.intellij.openapi.progress.ProgressIndicator
import com.intellij.openapi.progress.ProgressManager
@@ -27,6 +28,7 @@ import org.jetbrains.kotlin.idea.core.script.ScriptDependenciesModificationTrack
import org.jetbrains.kotlin.idea.core.script.configuration.CompositeScriptConfigurationManager
import org.jetbrains.kotlin.idea.core.script.scriptingDebugLog
import org.jetbrains.kotlin.idea.core.util.EDT
import org.jetbrains.kotlin.idea.util.FirPluginOracleService
import org.jetbrains.kotlin.idea.util.application.runReadAction
import org.jetbrains.kotlin.idea.util.application.runWriteAction
import org.jetbrains.kotlin.psi.KtFile
@@ -243,6 +245,14 @@ abstract class ScriptClassRootsUpdater(
if (openedScripts.isEmpty()) return
/**
* Scripts guts are everywhere in the plugin code, without them some functionality does not work,
* And with them some other fir plugin related is broken
* As FIR plugin does not have scripts support yet, just disabling not working one for now
*/
@Suppress("DEPRECATION")
if (project.service<FirPluginOracleService>().isFirPlugin()) return
GlobalScope.launch(EDT(project)) {
if (project.isDisposed) return@launch