Drop ModuleParameters, inline defaultImports everywhere

This commit is contained in:
Alexander Udalov
2016-10-11 10:47:14 +03:00
parent d335aea682
commit 2f616bdd33
13 changed files with 66 additions and 87 deletions
@@ -237,7 +237,7 @@ public class SourceNavigationHelper {
@NotNull Project project
) {
MutableModuleContext newModuleContext = ContextKt.ContextForNewModule(
project, Name.special("<library module>"), JvmPlatform.INSTANCE.getDefaultModuleParameters(), DefaultBuiltIns.getInstance()
project, Name.special("<library module>"), JvmPlatform.INSTANCE.getDefaultImports(), DefaultBuiltIns.getInstance()
);
newModuleContext.setDependencies(newModuleContext.getModule(), newModuleContext.getModule().getBuiltIns().getBuiltInsModule());
@@ -18,7 +18,6 @@ package org.jetbrains.kotlin.idea.decompiler.textBuilder
import com.intellij.openapi.vfs.VirtualFile
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
import org.jetbrains.kotlin.descriptors.ModuleParameters
import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor
import org.jetbrains.kotlin.descriptors.PackageFragmentProvider
import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl
@@ -61,7 +60,7 @@ abstract class DeserializerForDecompilerBase(
protected fun createDummyPackageFragment(fqName: FqName): MutablePackageFragmentDescriptor =
MutablePackageFragmentDescriptor(moduleDescriptor, fqName)
private fun createDummyModule(name: String) = ModuleDescriptorImpl(Name.special("<$name>"), storageManager, ModuleParameters.Empty, builtIns)
private fun createDummyModule(name: String) = ModuleDescriptorImpl(Name.special("<$name>"), storageManager, emptyList(), builtIns)
init {
moduleDescriptor.initialize(packageFragmentProvider)