Rewrite scripting related API to PsiFile instead of VirtualFile
There were several places where we converted virtualFile to PsiFile. This operation need a read access and may throw ProcessCanceledException, so we want to minimize its usages in IDE
This commit is contained in:
+1
-1
@@ -48,7 +48,7 @@ class GradleBuildFileHighlightingTest : GradleImportingTestCase() {
|
||||
val psiFile = PsiManager.getInstance(myProject).findFile(file) as? KtFile
|
||||
?: error("Couldn't find psiFile for virtual file: ${file.canonicalPath}")
|
||||
|
||||
ScriptDependenciesManager.updateScriptDependenciesSynchronously(file, myProject)
|
||||
ScriptDependenciesManager.updateScriptDependenciesSynchronously(psiFile, myProject)
|
||||
|
||||
val bindingContext = psiFile.analyzeWithContent()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user