Do not hide kotlin class files in source roots
This fixes a problem where file is indexed but querying
index fails with an exception because file has no PSI
#KT-21061 Fixed
This commit is contained in:
-3
@@ -47,11 +47,8 @@ class KotlinClassFileDecompiler : ClassFileDecompilers.Full() {
|
||||
override fun getStubBuilder() = stubBuilder
|
||||
|
||||
override fun createFileViewProvider(file: VirtualFile, manager: PsiManager, physical: Boolean): KotlinDecompiledFileViewProvider {
|
||||
val project = manager.project
|
||||
return KotlinDecompiledFileViewProvider(manager, file, physical) factory@{ provider ->
|
||||
val virtualFile = provider.virtualFile
|
||||
val fileIndex = ServiceManager.getService(project, FileIndexFacade::class.java)
|
||||
if (!fileIndex.isInLibraryClasses(virtualFile) && fileIndex.isInSource(virtualFile)) return@factory null
|
||||
|
||||
if (isKotlinInternalCompiledFile(virtualFile))
|
||||
null
|
||||
|
||||
Reference in New Issue
Block a user