Simplify VirtualFileFinder and their factories' hierarchy
Since there's no JsVirtualFileFinder anymore, inline JvmVirtualFileFinder into VirtualFileFinder and drop "Jvm" prefix everywhere
This commit is contained in:
@@ -39,7 +39,7 @@ import org.jetbrains.kotlin.descriptors.*;
|
||||
import org.jetbrains.kotlin.fileClasses.FileClasses;
|
||||
import org.jetbrains.kotlin.fileClasses.JvmFileClassesProvider;
|
||||
import org.jetbrains.kotlin.load.java.JvmAbi;
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinder;
|
||||
import org.jetbrains.kotlin.load.kotlin.VirtualFileFinder;
|
||||
import org.jetbrains.kotlin.name.ClassId;
|
||||
import org.jetbrains.kotlin.name.FqName;
|
||||
import org.jetbrains.kotlin.name.Name;
|
||||
@@ -179,7 +179,7 @@ public class InlineCodegenUtil {
|
||||
|
||||
@Nullable
|
||||
public static VirtualFile findVirtualFile(@NotNull GenerationState state, @NotNull ClassId classId) {
|
||||
return JvmVirtualFileFinder.SERVICE.getInstance(state.getProject()).findVirtualFileWithHeader(classId);
|
||||
return VirtualFileFinder.SERVICE.getInstance(state.getProject()).findVirtualFileWithHeader(classId);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import org.jetbrains.kotlin.serialization.deserialization.MetadataPackageFragmen
|
||||
import org.jetbrains.kotlin.utils.addToStdlib.check
|
||||
import java.io.InputStream
|
||||
|
||||
class JvmCliVirtualFileFinder(
|
||||
class CliVirtualFileFinder(
|
||||
private val index: JvmDependenciesIndex,
|
||||
private val scope: GlobalSearchScope
|
||||
) : VirtualFileKotlinClassFinder() {
|
||||
+4
-4
@@ -18,10 +18,10 @@ package org.jetbrains.kotlin.cli.jvm.compiler
|
||||
|
||||
import com.intellij.psi.search.GlobalSearchScope
|
||||
import org.jetbrains.kotlin.cli.jvm.index.JvmDependenciesIndex
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinder
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinderFactory
|
||||
import org.jetbrains.kotlin.load.kotlin.VirtualFileFinder
|
||||
import org.jetbrains.kotlin.load.kotlin.VirtualFileFinderFactory
|
||||
|
||||
// TODO: create different JvmDependenciesIndex instances for different sets of source roots to improve performance
|
||||
class JvmCliVirtualFileFinderFactory(private val index: JvmDependenciesIndex) : JvmVirtualFileFinderFactory {
|
||||
override fun create(scope: GlobalSearchScope): JvmVirtualFileFinder = JvmCliVirtualFileFinder(index, scope)
|
||||
class CliVirtualFileFinderFactory(private val index: JvmDependenciesIndex) : VirtualFileFinderFactory {
|
||||
override fun create(scope: GlobalSearchScope): VirtualFileFinder = CliVirtualFileFinder(index, scope)
|
||||
}
|
||||
@@ -86,7 +86,7 @@ import org.jetbrains.kotlin.config.*
|
||||
import org.jetbrains.kotlin.extensions.DeclarationAttributeAltererExtension
|
||||
import org.jetbrains.kotlin.extensions.StorageComponentContainerContributor
|
||||
import org.jetbrains.kotlin.idea.KotlinFileType
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinderFactory
|
||||
import org.jetbrains.kotlin.load.kotlin.VirtualFileFinderFactory
|
||||
import org.jetbrains.kotlin.load.kotlin.KotlinBinaryClassCache
|
||||
import org.jetbrains.kotlin.load.kotlin.MetadataFinderFactory
|
||||
import org.jetbrains.kotlin.load.kotlin.ModuleVisibilityManager
|
||||
@@ -175,9 +175,9 @@ class KotlinCoreEnvironment private constructor(
|
||||
(ServiceManager.getService(project, CoreJavaFileManager::class.java)
|
||||
as KotlinCliJavaFileManagerImpl).initIndex(rootsIndex)
|
||||
|
||||
val finderFactory = JvmCliVirtualFileFinderFactory(rootsIndex)
|
||||
val finderFactory = CliVirtualFileFinderFactory(rootsIndex)
|
||||
project.registerService(MetadataFinderFactory::class.java, finderFactory)
|
||||
project.registerService(JvmVirtualFileFinderFactory::class.java, finderFactory)
|
||||
project.registerService(VirtualFileFinderFactory::class.java, finderFactory)
|
||||
|
||||
ExpressionCodegenExtension.registerExtensionPoint(project)
|
||||
SyntheticResolveExtension.registerExtensionPoint(project)
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.jetbrains.kotlin.load.java.lazy.ModuleClassResolver
|
||||
import org.jetbrains.kotlin.load.java.sam.SamConversionResolverImpl
|
||||
import org.jetbrains.kotlin.load.java.sam.SamWithReceiverResolver
|
||||
import org.jetbrains.kotlin.load.kotlin.DeserializationComponentsForJava
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinderFactory
|
||||
import org.jetbrains.kotlin.load.kotlin.VirtualFileFinderFactory
|
||||
import org.jetbrains.kotlin.platform.JvmBuiltIns
|
||||
import org.jetbrains.kotlin.resolve.*
|
||||
import org.jetbrains.kotlin.resolve.jvm.JavaDescriptorResolver
|
||||
@@ -60,7 +60,7 @@ private fun StorageComponentContainer.configureJavaTopDownAnalysis(
|
||||
useImpl<JavaDescriptorResolver>()
|
||||
useImpl<DeserializationComponentsForJava>()
|
||||
|
||||
useInstance(JvmVirtualFileFinderFactory.SERVICE.getInstance(project).create(moduleContentScope))
|
||||
useInstance(VirtualFileFinderFactory.getInstance(project).create(moduleContentScope))
|
||||
|
||||
useImpl<FileScopeProviderImpl>()
|
||||
|
||||
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.load.kotlin
|
||||
|
||||
import com.intellij.openapi.components.ServiceManager
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.search.GlobalSearchScope
|
||||
|
||||
interface JvmVirtualFileFinderFactory : VirtualFileFinderFactory, MetadataFinderFactory {
|
||||
override fun create(scope: GlobalSearchScope): JvmVirtualFileFinder
|
||||
|
||||
object SERVICE {
|
||||
@JvmStatic fun getInstance(project: Project): JvmVirtualFileFinderFactory =
|
||||
ServiceManager.getService(project, JvmVirtualFileFinderFactory::class.java)
|
||||
}
|
||||
}
|
||||
+8
-1
@@ -16,9 +16,16 @@
|
||||
|
||||
package org.jetbrains.kotlin.load.kotlin
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.psi.search.GlobalSearchScope
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
|
||||
interface VirtualFileFinder {
|
||||
interface VirtualFileFinder : KotlinClassFinder {
|
||||
fun findVirtualFileWithHeader(classId: ClassId): VirtualFile?
|
||||
|
||||
companion object SERVICE {
|
||||
fun getInstance(project: Project): VirtualFileFinder =
|
||||
VirtualFileFinderFactory.getInstance(project).create(GlobalSearchScope.allScope(project))
|
||||
}
|
||||
}
|
||||
+6
-4
@@ -20,9 +20,11 @@ import com.intellij.openapi.components.ServiceManager
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.search.GlobalSearchScope
|
||||
|
||||
interface JvmVirtualFileFinder : VirtualFileFinder, KotlinClassFinder {
|
||||
object SERVICE {
|
||||
@JvmStatic fun getInstance(project: Project): JvmVirtualFileFinder =
|
||||
ServiceManager.getService(project, JvmVirtualFileFinderFactory::class.java).create(GlobalSearchScope.allScope(project))
|
||||
interface VirtualFileFinderFactory : MetadataFinderFactory {
|
||||
override fun create(scope: GlobalSearchScope): VirtualFileFinder
|
||||
|
||||
companion object SERVICE {
|
||||
fun getInstance(project: Project): VirtualFileFinderFactory =
|
||||
ServiceManager.getService(project, VirtualFileFinderFactory::class.java)
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -21,7 +21,7 @@ import org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.utils.sure
|
||||
|
||||
abstract class VirtualFileKotlinClassFinder : JvmVirtualFileFinder {
|
||||
abstract class VirtualFileKotlinClassFinder : VirtualFileFinder {
|
||||
override fun findKotlinClass(classId: ClassId): KotlinJvmBinaryClass? {
|
||||
val file = findVirtualFileWithHeader(classId) ?: return null
|
||||
return KotlinBinaryClassCache.getKotlinBinaryClass(file)
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.load.kotlin
|
||||
|
||||
import com.intellij.psi.search.GlobalSearchScope
|
||||
|
||||
interface VirtualFileFinderFactory {
|
||||
fun create(scope: GlobalSearchScope): VirtualFileFinder
|
||||
}
|
||||
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
|
||||
import org.jetbrains.kotlin.cli.jvm.config.JavaSourceRoot
|
||||
import org.jetbrains.kotlin.cli.jvm.index.JavaRoot
|
||||
import org.jetbrains.kotlin.cli.jvm.index.JvmDependenciesIndexImpl
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinder
|
||||
import org.jetbrains.kotlin.load.kotlin.VirtualFileFinder
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind
|
||||
@@ -195,7 +195,7 @@ class KotlinCliJavaFileManagerTest : KotlinTestWithEnvironment() {
|
||||
File(fooPackageDir, "$className.java").writeText(text)
|
||||
|
||||
@Suppress("UNUSED_VARIABLE") // used to implicitly initialize classpath/index in the manager
|
||||
val coreJavaFileFinder = JvmVirtualFileFinder.SERVICE.getInstance(project)
|
||||
val coreJavaFileFinder = VirtualFileFinder.SERVICE.getInstance(project)
|
||||
val coreJavaFileManager = ServiceManager.getService(project, CoreJavaFileManager::class.java) as KotlinCliJavaFileManagerImpl
|
||||
|
||||
val root = environment.contentRootToVirtualFile(JavaSourceRoot(javaFilesDir!!, null))!!
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.jetbrains.kotlin.asJava.classes.KtLightClass
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
|
||||
import org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinder
|
||||
import org.jetbrains.kotlin.load.kotlin.VirtualFileFinder
|
||||
import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
@@ -59,7 +59,7 @@ class KotlinClassFinderTest : KotlinTestWithEnvironmentManagement() {
|
||||
assertNotNull(psiClass, "Psi class not found for $className")
|
||||
assertTrue(psiClass !is KtLightClass, "Kotlin light classes are not not expected")
|
||||
|
||||
val binaryClass = JvmVirtualFileFinder.SERVICE.getInstance(project).findKotlinClass(JavaClassImpl(psiClass!!))
|
||||
val binaryClass = VirtualFileFinder.SERVICE.getInstance(project).findKotlinClass(JavaClassImpl(psiClass!!))
|
||||
assertNotNull(binaryClass, "No binary class for $className")
|
||||
|
||||
assertEquals("test/A.B.C", binaryClass?.classId?.toString())
|
||||
|
||||
+2
-3
@@ -21,13 +21,12 @@ import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.psi.search.GlobalSearchScope
|
||||
import com.intellij.util.indexing.FileBasedIndex
|
||||
import com.intellij.util.indexing.ID
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinder
|
||||
import org.jetbrains.kotlin.load.kotlin.VirtualFileKotlinClassFinder
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import java.io.InputStream
|
||||
|
||||
class JvmIDEVirtualFileFinder(private val scope: GlobalSearchScope) : VirtualFileKotlinClassFinder(), JvmVirtualFileFinder {
|
||||
class IDEVirtualFileFinder(private val scope: GlobalSearchScope) : VirtualFileKotlinClassFinder() {
|
||||
override fun findMetadata(classId: ClassId): InputStream? {
|
||||
return findVirtualFileWithHeader(classId, KotlinMetadataFileIndex.KEY)?.inputStream
|
||||
}
|
||||
@@ -55,6 +54,6 @@ class JvmIDEVirtualFileFinder(private val scope: GlobalSearchScope) : VirtualFil
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val LOG = Logger.getInstance(JvmIDEVirtualFileFinder::class.java)
|
||||
private val LOG = Logger.getInstance(IDEVirtualFileFinder::class.java)
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -17,9 +17,9 @@
|
||||
package org.jetbrains.kotlin.idea.vfilefinder
|
||||
|
||||
import com.intellij.psi.search.GlobalSearchScope
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinder
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinderFactory
|
||||
import org.jetbrains.kotlin.load.kotlin.VirtualFileFinder
|
||||
import org.jetbrains.kotlin.load.kotlin.VirtualFileFinderFactory
|
||||
|
||||
class JvmIDEVirtualFileFinderFactory : JvmVirtualFileFinderFactory {
|
||||
override fun create(scope: GlobalSearchScope): JvmVirtualFileFinder = JvmIDEVirtualFileFinder(scope)
|
||||
class IDEVirtualFileFinderFactory : VirtualFileFinderFactory {
|
||||
override fun create(scope: GlobalSearchScope): VirtualFileFinder = IDEVirtualFileFinder(scope)
|
||||
}
|
||||
@@ -233,10 +233,10 @@
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.caches.resolve.KotlinCacheServiceImpl"/>
|
||||
|
||||
<projectService serviceInterface="org.jetbrains.kotlin.load.kotlin.MetadataFinderFactory"
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.vfilefinder.JvmIDEVirtualFileFinderFactory"/>
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.vfilefinder.IDEVirtualFileFinderFactory"/>
|
||||
|
||||
<projectService serviceInterface="org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinderFactory"
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.vfilefinder.JvmIDEVirtualFileFinderFactory"/>
|
||||
<projectService serviceInterface="org.jetbrains.kotlin.load.kotlin.VirtualFileFinderFactory"
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.vfilefinder.IDEVirtualFileFinderFactory"/>
|
||||
|
||||
<projectService serviceInterface="org.jetbrains.kotlin.load.kotlin.ModuleVisibilityManager"
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.util.IdeModuleVisibilityManagerImpl"/>
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.jetbrains.kotlin.idea.configuration.ui.notifications.ConfigureKotlinN
|
||||
import org.jetbrains.kotlin.idea.util.projectStructure.allModules
|
||||
import org.jetbrains.kotlin.idea.versions.getKotlinJvmRuntimeMarkerClass
|
||||
import org.jetbrains.kotlin.idea.versions.hasKotlinJsKjsmFile
|
||||
import org.jetbrains.kotlin.idea.vfilefinder.JvmIDEVirtualFileFinder
|
||||
import org.jetbrains.kotlin.idea.vfilefinder.IDEVirtualFileFinder
|
||||
import org.jetbrains.kotlin.utils.ifEmpty
|
||||
|
||||
data class RepositoryDescription(val id: String, val name: String, val url: String, val isSnapshot: Boolean)
|
||||
@@ -147,7 +147,7 @@ fun hasKotlinJsRuntimeInScope(module: Module): Boolean {
|
||||
}
|
||||
|
||||
fun hasKotlinCommonRuntimeInScope(scope: GlobalSearchScope): Boolean {
|
||||
return JvmIDEVirtualFileFinder(scope).hasMetadataPackage(KotlinBuiltIns.BUILT_INS_PACKAGE_FQ_NAME)
|
||||
return IDEVirtualFileFinder(scope).hasMetadataPackage(KotlinBuiltIns.BUILT_INS_PACKAGE_FQ_NAME)
|
||||
}
|
||||
|
||||
fun hasKotlinFilesOnlyInTests(module: Module): Boolean {
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.jetbrains.kotlin.idea.refactoring.toPsiFile
|
||||
import org.jetbrains.kotlin.idea.util.ProjectRootsUtil
|
||||
import org.jetbrains.kotlin.idea.util.application.runReadAction
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinder
|
||||
import org.jetbrains.kotlin.load.kotlin.VirtualFileFinder
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
@@ -139,7 +139,7 @@ private fun readClassFileImpl(project: Project,
|
||||
|
||||
val classId = ClassId(jvmName.packageFqName, Name.identifier(fqNameWithInners.asString()))
|
||||
|
||||
val fileFinder = JvmVirtualFileFinder.SERVICE.getInstance(project)
|
||||
val fileFinder = VirtualFileFinder.getInstance(project)
|
||||
val classFile = fileFinder.findVirtualFileWithHeader(classId) ?: return null
|
||||
return classFile.contentsToByteArray()
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ public abstract class AbstractPositionManagerTest extends KotlinLightCodeInsight
|
||||
}
|
||||
|
||||
CompilerConfiguration configuration = KotlinTestUtils.newConfiguration(ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK);
|
||||
// TODO: delete this once JvmIDEVirtualFileFinder supports loading .kotlin_builtins files
|
||||
// TODO: delete this once IDEVirtualFileFinder supports loading .kotlin_builtins files
|
||||
configuration.put(JVMConfigurationKeys.ADD_BUILT_INS_FROM_COMPILER_TO_DEPENDENCIES, true);
|
||||
|
||||
GenerationState state = GenerationUtils.compileFiles(
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ import org.jetbrains.kotlin.idea.decompiler.classFile.KotlinClsStubBuilder
|
||||
import org.jetbrains.kotlin.idea.decompiler.classFile.buildDecompiledTextForClassFile
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinder
|
||||
import org.jetbrains.kotlin.load.kotlin.VirtualFileFinder
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.psi.KtPsiFactory
|
||||
@@ -31,7 +31,7 @@ import org.junit.Assert
|
||||
|
||||
class ClsStubConsistencyTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
private fun doTest(id: ClassId) {
|
||||
val packageFile = JvmVirtualFileFinder.SERVICE.getInstance(project).findVirtualFileWithHeader(id)
|
||||
val packageFile = VirtualFileFinder.SERVICE.getInstance(project).findVirtualFileWithHeader(id)
|
||||
?: throw AssertionError("File not found for id: $id")
|
||||
val decompiledText = buildDecompiledTextForClassFile(packageFile).text
|
||||
val fileWithDecompiledText = KtPsiFactory(project).createFile(decompiledText)
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescrip
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import org.jetbrains.kotlin.incremental.components.NoLookupLocation
|
||||
import org.jetbrains.kotlin.load.java.descriptors.isFromJvmPackagePart
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmVirtualFileFinder
|
||||
import org.jetbrains.kotlin.load.kotlin.VirtualFileFinder
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.resolve.BindingTraceContext
|
||||
@@ -52,7 +52,7 @@ class DecompiledTextConsistencyTest : LightCodeInsightFixtureTestCase() {
|
||||
FqName("kotlin.collections.TypeAliasesKt") to null
|
||||
)) {
|
||||
val classId = ClassId.topLevel(packageFacadeFqName)
|
||||
val classFile = JvmVirtualFileFinder.SERVICE.getInstance(project).findVirtualFileWithHeader(classId)!!
|
||||
val classFile = VirtualFileFinder.SERVICE.getInstance(project).findVirtualFileWithHeader(classId)!!
|
||||
|
||||
val module = TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(
|
||||
project, listOf(), BindingTraceContext(), KotlinTestUtils.newConfiguration(), ::IDEPackagePartProvider
|
||||
|
||||
Reference in New Issue
Block a user