Introduce unspecifiedJvmPlatform for clients without jvmTarget
Previously, a lot of clients used JvmPlatform as platform-marker, without thinking about jvmTarget. For the sake of migration, this commits introduced so-called UnspecifiedJvmPlatform, which can be used for a time being, but generally, all usages should be removed in future.
This commit is contained in:
@@ -8,8 +8,7 @@ package org.jetbrains.kotlin.platform
|
|||||||
import org.jetbrains.kotlin.platform.js.JsPlatforms
|
import org.jetbrains.kotlin.platform.js.JsPlatforms
|
||||||
import org.jetbrains.kotlin.platform.js.JsPlatforms.defaultJsPlatform
|
import org.jetbrains.kotlin.platform.js.JsPlatforms.defaultJsPlatform
|
||||||
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms
|
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms
|
||||||
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms.defaultJvmPlatform
|
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms.unspecifiedJvmPlatform
|
||||||
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms.jvm18
|
|
||||||
import org.jetbrains.kotlin.platform.konan.KonanPlatforms
|
import org.jetbrains.kotlin.platform.konan.KonanPlatforms
|
||||||
import org.jetbrains.kotlin.platform.konan.KonanPlatforms.defaultKonanPlatform
|
import org.jetbrains.kotlin.platform.konan.KonanPlatforms.defaultKonanPlatform
|
||||||
|
|
||||||
@@ -17,12 +16,12 @@ import org.jetbrains.kotlin.platform.konan.KonanPlatforms.defaultKonanPlatform
|
|||||||
object CommonPlatforms {
|
object CommonPlatforms {
|
||||||
|
|
||||||
@Deprecated(
|
@Deprecated(
|
||||||
message = "Should be accessed only by compatibility layer, other clients should use 'defaultJvmPlatform'",
|
message = "Should be accessed only by compatibility layer, other clients should use 'unspecifiedJvmPlatform'",
|
||||||
level = DeprecationLevel.ERROR
|
level = DeprecationLevel.ERROR
|
||||||
)
|
)
|
||||||
object CompatCommonPlatform : TargetPlatform(
|
object CompatCommonPlatform : TargetPlatform(
|
||||||
setOf(
|
setOf(
|
||||||
defaultJvmPlatform.single(),
|
unspecifiedJvmPlatform.single(),
|
||||||
defaultJsPlatform.single(),
|
defaultJsPlatform.single(),
|
||||||
defaultKonanPlatform.single()
|
defaultKonanPlatform.single()
|
||||||
)
|
)
|
||||||
|
|||||||
+3
-3
@@ -138,7 +138,7 @@ abstract class AbstractFirDiagnosticsSmokeTest : BaseDiagnosticsTest() {
|
|||||||
when {
|
when {
|
||||||
nameSuffix.isEmpty() -> null // TODO(dsavvinov): this leads to 'null'-platform in ModuleDescriptor
|
nameSuffix.isEmpty() -> null // TODO(dsavvinov): this leads to 'null'-platform in ModuleDescriptor
|
||||||
nameSuffix == "COMMON" -> CommonPlatforms.defaultCommonPlatform
|
nameSuffix == "COMMON" -> CommonPlatforms.defaultCommonPlatform
|
||||||
nameSuffix == "JVM" -> JvmPlatforms.defaultJvmPlatform // TODO(dsavvinov): determine JvmTarget precisely
|
nameSuffix == "JVM" -> JvmPlatforms.unspecifiedJvmPlatform // TODO(dsavvinov): determine JvmTarget precisely
|
||||||
nameSuffix == "JS" -> JsPlatforms.defaultJsPlatform
|
nameSuffix == "JS" -> JsPlatforms.defaultJsPlatform
|
||||||
nameSuffix == "NATIVE" -> KonanPlatforms.defaultKonanPlatform
|
nameSuffix == "NATIVE" -> KonanPlatforms.defaultKonanPlatform
|
||||||
else -> throw IllegalStateException("Can't determine platform by name $nameSuffix")
|
else -> throw IllegalStateException("Can't determine platform by name $nameSuffix")
|
||||||
@@ -148,7 +148,7 @@ abstract class AbstractFirDiagnosticsSmokeTest : BaseDiagnosticsTest() {
|
|||||||
|
|
||||||
class BuiltInModuleInfo(override val name: Name) : ModuleInfo {
|
class BuiltInModuleInfo(override val name: Name) : ModuleInfo {
|
||||||
override val platform: TargetPlatform
|
override val platform: TargetPlatform
|
||||||
get() = JvmPlatforms.defaultJvmPlatform
|
get() = JvmPlatforms.unspecifiedJvmPlatform
|
||||||
|
|
||||||
override val analyzerServices: PlatformDependentAnalyzerServices
|
override val analyzerServices: PlatformDependentAnalyzerServices
|
||||||
get() = JvmPlatformAnalyzerServices
|
get() = JvmPlatformAnalyzerServices
|
||||||
@@ -160,7 +160,7 @@ abstract class AbstractFirDiagnosticsSmokeTest : BaseDiagnosticsTest() {
|
|||||||
|
|
||||||
protected class TestModuleInfo(override val name: Name) : ModuleInfo {
|
protected class TestModuleInfo(override val name: Name) : ModuleInfo {
|
||||||
override val platform: TargetPlatform
|
override val platform: TargetPlatform
|
||||||
get() = JvmPlatforms.defaultJvmPlatform
|
get() = JvmPlatforms.unspecifiedJvmPlatform
|
||||||
|
|
||||||
override val analyzerServices: PlatformDependentAnalyzerServices
|
override val analyzerServices: PlatformDependentAnalyzerServices
|
||||||
get() = JvmPlatformAnalyzerServices
|
get() = JvmPlatformAnalyzerServices
|
||||||
|
|||||||
@@ -22,8 +22,13 @@ object JvmPlatforms {
|
|||||||
private val jvmTargetToJdkPlatform: Map<JvmTarget, TargetPlatform> =
|
private val jvmTargetToJdkPlatform: Map<JvmTarget, TargetPlatform> =
|
||||||
JvmTarget.values().map { it to JdkPlatform(it).toTargetPlatform() }.toMap()
|
JvmTarget.values().map { it to JdkPlatform(it).toTargetPlatform() }.toMap()
|
||||||
|
|
||||||
val defaultJvmPlatform: TargetPlatform
|
// This platform is needed mostly for compatibility and migration of code base,
|
||||||
get() = CompatJvmPlatform
|
// as previously some clients used TargetPlatform just as platform-marker
|
||||||
|
// and didn't care about particular jvmTarget.
|
||||||
|
// TODO(dsavvinov): review all usages and choose proper JvmTarget
|
||||||
|
val unspecifiedJvmPlatform: TargetPlatform = CompatJvmPlatform
|
||||||
|
|
||||||
|
val defaultJvmPlatform: TargetPlatform = jvmTargetToJdkPlatform[JvmTarget.DEFAULT]!!
|
||||||
|
|
||||||
val jvm16: TargetPlatform = jvmTargetToJdkPlatform[JvmTarget.JVM_1_6]!!
|
val jvm16: TargetPlatform = jvmTargetToJdkPlatform[JvmTarget.JVM_1_6]!!
|
||||||
val jvm18: TargetPlatform = jvmTargetToJdkPlatform[JvmTarget.JVM_1_8]!!
|
val jvm18: TargetPlatform = jvmTargetToJdkPlatform[JvmTarget.JVM_1_8]!!
|
||||||
@@ -34,7 +39,7 @@ object JvmPlatforms {
|
|||||||
val allJvmPlatforms: List<TargetPlatform> = jvmTargetToJdkPlatform.values.toList()
|
val allJvmPlatforms: List<TargetPlatform> = jvmTargetToJdkPlatform.values.toList()
|
||||||
|
|
||||||
@Deprecated(
|
@Deprecated(
|
||||||
message = "Should be accessed only by compatibility layer, other clients should use 'defaultJvmPlatform'",
|
message = "Should be accessed only by compatibility layer, other clients should use 'unspecifiedJvmPlatform'",
|
||||||
level = DeprecationLevel.ERROR
|
level = DeprecationLevel.ERROR
|
||||||
)
|
)
|
||||||
object CompatJvmPlatform : TargetPlatform(setOf(UNSPECIFIED_SIMPLE_JVM_PLATFORM)),
|
object CompatJvmPlatform : TargetPlatform(setOf(UNSPECIFIED_SIMPLE_JVM_PLATFORM)),
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.jetbrains.kotlin.resolve.TargetPlatform
|
|||||||
|
|
||||||
@Deprecated(
|
@Deprecated(
|
||||||
message = "This class is deprecated and will be removed soon, use API from 'org.jetbrains.kotlin.platform.*' packages instead",
|
message = "This class is deprecated and will be removed soon, use API from 'org.jetbrains.kotlin.platform.*' packages instead",
|
||||||
replaceWith = ReplaceWith("JvmPlatforms.defaultJvmPlatform", "org.jetbrains.kotlin.platform.jvm.JvmPlatforms"),
|
replaceWith = ReplaceWith("JvmPlatforms.unspecifiedJvmPlatform", "org.jetbrains.kotlin.platform.jvm.JvmPlatforms"),
|
||||||
level = DeprecationLevel.ERROR
|
level = DeprecationLevel.ERROR
|
||||||
)
|
)
|
||||||
interface JvmPlatform : TargetPlatform {
|
interface JvmPlatform : TargetPlatform {
|
||||||
|
|||||||
+1
-1
@@ -594,7 +594,7 @@ abstract class AbstractDiagnosticsTest : BaseDiagnosticsTest() {
|
|||||||
when {
|
when {
|
||||||
nameSuffix.isEmpty() -> null // TODO(dsavvinov): this leads to 'null'-platform in ModuleDescriptor
|
nameSuffix.isEmpty() -> null // TODO(dsavvinov): this leads to 'null'-platform in ModuleDescriptor
|
||||||
nameSuffix == "COMMON" -> CommonPlatforms.defaultCommonPlatform
|
nameSuffix == "COMMON" -> CommonPlatforms.defaultCommonPlatform
|
||||||
nameSuffix == "JVM" -> JvmPlatforms.defaultJvmPlatform // TODO(dsavvinov): determine JvmTarget precisely
|
nameSuffix == "JVM" -> JvmPlatforms.unspecifiedJvmPlatform // TODO(dsavvinov): determine JvmTarget precisely
|
||||||
nameSuffix == "JS" -> JsPlatforms.defaultJsPlatform
|
nameSuffix == "JS" -> JsPlatforms.defaultJsPlatform
|
||||||
nameSuffix == "NATIVE" -> KonanPlatforms.defaultKonanPlatform
|
nameSuffix == "NATIVE" -> KonanPlatforms.defaultKonanPlatform
|
||||||
else -> throw IllegalStateException("Can't determine platform by name $nameSuffix")
|
else -> throw IllegalStateException("Can't determine platform by name $nameSuffix")
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatformAnalyzerServices
|
|||||||
class FirTestModuleInfo(
|
class FirTestModuleInfo(
|
||||||
override val name: Name = Name.identifier("TestModule"),
|
override val name: Name = Name.identifier("TestModule"),
|
||||||
val dependencies: MutableList<ModuleInfo> = mutableListOf(),
|
val dependencies: MutableList<ModuleInfo> = mutableListOf(),
|
||||||
override val platform: TargetPlatform = JvmPlatforms.defaultJvmPlatform,
|
override val platform: TargetPlatform = JvmPlatforms.unspecifiedJvmPlatform,
|
||||||
override val analyzerServices: PlatformDependentAnalyzerServices = JvmPlatformAnalyzerServices
|
override val analyzerServices: PlatformDependentAnalyzerServices = JvmPlatformAnalyzerServices
|
||||||
) : ModuleInfo {
|
) : ModuleInfo {
|
||||||
override fun dependencies(): List<ModuleInfo> = dependencies
|
override fun dependencies(): List<ModuleInfo> = dependencies
|
||||||
|
|||||||
+1
-1
@@ -67,7 +67,7 @@ private class TestModule(val dependsOnBuiltIns: Boolean) : ModuleInfo {
|
|||||||
ModuleInfo.DependencyOnBuiltIns.NONE
|
ModuleInfo.DependencyOnBuiltIns.NONE
|
||||||
|
|
||||||
override val platform: TargetPlatform
|
override val platform: TargetPlatform
|
||||||
get() = JvmPlatforms.defaultJvmPlatform
|
get() = JvmPlatforms.unspecifiedJvmPlatform
|
||||||
|
|
||||||
override val analyzerServices: PlatformDependentAnalyzerServices
|
override val analyzerServices: PlatformDependentAnalyzerServices
|
||||||
get() = JvmPlatformAnalyzerServices
|
get() = JvmPlatformAnalyzerServices
|
||||||
|
|||||||
+1
-1
@@ -62,7 +62,7 @@ class MultiModuleJavaAnalysisCustomTest : KtUsefulTestCase() {
|
|||||||
override val name = Name.special("<$_name>")
|
override val name = Name.special("<$_name>")
|
||||||
|
|
||||||
override val platform: TargetPlatform
|
override val platform: TargetPlatform
|
||||||
get() = JvmPlatforms.defaultJvmPlatform
|
get() = JvmPlatforms.unspecifiedJvmPlatform
|
||||||
|
|
||||||
override val analyzerServices: PlatformDependentAnalyzerServices
|
override val analyzerServices: PlatformDependentAnalyzerServices
|
||||||
get() = JvmPlatformAnalyzerServices
|
get() = JvmPlatformAnalyzerServices
|
||||||
|
|||||||
@@ -362,7 +362,7 @@ data class SdkInfo(val project: Project, val sdk: Sdk) : IdeaModuleInfo {
|
|||||||
override fun dependencies(): List<IdeaModuleInfo> = listOf(this)
|
override fun dependencies(): List<IdeaModuleInfo> = listOf(this)
|
||||||
|
|
||||||
override val platform: TargetPlatform
|
override val platform: TargetPlatform
|
||||||
get() = JvmPlatforms.defaultJvmPlatform // TODO(dsavvinov): provide proper target version
|
get() = JvmPlatforms.unspecifiedJvmPlatform // TODO(dsavvinov): provide proper target version
|
||||||
|
|
||||||
override val analyzerServices: PlatformDependentAnalyzerServices
|
override val analyzerServices: PlatformDependentAnalyzerServices
|
||||||
get() = JvmPlatformAnalyzerServices
|
get() = JvmPlatformAnalyzerServices
|
||||||
|
|||||||
+3
-3
@@ -51,7 +51,7 @@ data class ScriptModuleInfo(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override val platform: TargetPlatform
|
override val platform: TargetPlatform
|
||||||
get() = JvmPlatforms.defaultJvmPlatform // TODO(dsavvinov): choose proper target version
|
get() = JvmPlatforms.unspecifiedJvmPlatform // TODO(dsavvinov): choose proper target version
|
||||||
|
|
||||||
override val analyzerServices: PlatformDependentAnalyzerServices
|
override val analyzerServices: PlatformDependentAnalyzerServices
|
||||||
get() = JvmPlatformAnalyzerServices
|
get() = JvmPlatformAnalyzerServices
|
||||||
@@ -77,7 +77,7 @@ sealed class ScriptDependenciesInfo(val project: Project) : IdeaModuleInfo, Bina
|
|||||||
get() = ScriptDependenciesSourceInfo.ForProject(project)
|
get() = ScriptDependenciesSourceInfo.ForProject(project)
|
||||||
|
|
||||||
override val platform: TargetPlatform
|
override val platform: TargetPlatform
|
||||||
get() = JvmPlatforms.defaultJvmPlatform // TODO(dsavvinov): choose proper TargetVersion
|
get() = JvmPlatforms.unspecifiedJvmPlatform // TODO(dsavvinov): choose proper TargetVersion
|
||||||
|
|
||||||
override val analyzerServices: PlatformDependentAnalyzerServices
|
override val analyzerServices: PlatformDependentAnalyzerServices
|
||||||
get() = JvmPlatformAnalyzerServices
|
get() = JvmPlatformAnalyzerServices
|
||||||
@@ -132,7 +132,7 @@ sealed class ScriptDependenciesSourceInfo(val project: Project) : IdeaModuleInfo
|
|||||||
override fun equals(other: Any?): Boolean = other is ScriptDependenciesSourceInfo && this.project == other.project
|
override fun equals(other: Any?): Boolean = other is ScriptDependenciesSourceInfo && this.project == other.project
|
||||||
|
|
||||||
override val platform: TargetPlatform
|
override val platform: TargetPlatform
|
||||||
get() = JvmPlatforms.defaultJvmPlatform // TODO(dsavvinov): choose proper TargetVersion
|
get() = JvmPlatforms.unspecifiedJvmPlatform // TODO(dsavvinov): choose proper TargetVersion
|
||||||
|
|
||||||
override val analyzerServices: PlatformDependentAnalyzerServices
|
override val analyzerServices: PlatformDependentAnalyzerServices
|
||||||
get() = JvmPlatformAnalyzerServices
|
get() = JvmPlatformAnalyzerServices
|
||||||
|
|||||||
+1
-1
@@ -332,5 +332,5 @@ class IDEKotlinAsJavaSupport(private val project: Project) : KotlinAsJavaSupport
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal fun PsiElement.getModuleInfoPreferringJvmPlatform(): IdeaModuleInfo {
|
internal fun PsiElement.getModuleInfoPreferringJvmPlatform(): IdeaModuleInfo {
|
||||||
return getPlatformModuleInfo(JvmPlatforms.defaultJvmPlatform) ?: getModuleInfo()
|
return getPlatformModuleInfo(JvmPlatforms.unspecifiedJvmPlatform) ?: getModuleInfo()
|
||||||
}
|
}
|
||||||
+1
-1
@@ -126,7 +126,7 @@ internal class ProjectResolutionFacade(
|
|||||||
packagePartProviderFactory = { IDEPackagePartProvider(it.moduleContentScope) },
|
packagePartProviderFactory = { IDEPackagePartProvider(it.moduleContentScope) },
|
||||||
moduleByJavaClass = { javaClass: JavaClass ->
|
moduleByJavaClass = { javaClass: JavaClass ->
|
||||||
val psiClass = (javaClass as JavaClassImpl).psi
|
val psiClass = (javaClass as JavaClassImpl).psi
|
||||||
psiClass.getPlatformModuleInfo(JvmPlatforms.defaultJvmPlatform)?.platformModule ?: psiClass.getNullableModuleInfo()
|
psiClass.getPlatformModuleInfo(JvmPlatforms.unspecifiedJvmPlatform)?.platformModule ?: psiClass.getNullableModuleInfo()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -154,7 +154,7 @@ fun PsiElement.hasJavaResolutionFacade(): Boolean = this.originalElement.contain
|
|||||||
fun PsiElement.javaResolutionFacade() =
|
fun PsiElement.javaResolutionFacade() =
|
||||||
KotlinCacheService.getInstance(project).getResolutionFacadeByFile(
|
KotlinCacheService.getInstance(project).getResolutionFacadeByFile(
|
||||||
this.originalElement.containingFile ?: reportCouldNotCreateJavaFacade(),
|
this.originalElement.containingFile ?: reportCouldNotCreateJavaFacade(),
|
||||||
JvmPlatforms.defaultJvmPlatform
|
JvmPlatforms.unspecifiedJvmPlatform
|
||||||
)
|
)
|
||||||
|
|
||||||
private fun PsiElement.reportCouldNotCreateJavaFacade(): Nothing =
|
private fun PsiElement.reportCouldNotCreateJavaFacade(): Nothing =
|
||||||
|
|||||||
+1
-1
@@ -58,7 +58,7 @@ public class TargetPlatformDetector {
|
|||||||
if (context != null) {
|
if (context != null) {
|
||||||
PsiFile contextFile = context.getContainingFile();
|
PsiFile contextFile = context.getContainingFile();
|
||||||
// TODO(dsavvinov): Get default platform with proper target
|
// TODO(dsavvinov): Get default platform with proper target
|
||||||
return contextFile instanceof KtFile ? getPlatform((KtFile) contextFile) : JvmPlatforms.INSTANCE.getDefaultJvmPlatform();
|
return contextFile instanceof KtFile ? getPlatform((KtFile) contextFile) : JvmPlatforms.INSTANCE.getUnspecifiedJvmPlatform();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file.isScript()) {
|
if (file.isScript()) {
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ import org.jetbrains.kotlin.idea.test.SdkAndMockLibraryProjectDescriptor
|
|||||||
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms
|
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms
|
||||||
|
|
||||||
abstract class AbstractCompiledKotlinInJavaCompletionTest : KotlinFixtureCompletionBaseTestCase() {
|
abstract class AbstractCompiledKotlinInJavaCompletionTest : KotlinFixtureCompletionBaseTestCase() {
|
||||||
override fun getPlatform() = JvmPlatforms.defaultJvmPlatform
|
override fun getPlatform() = JvmPlatforms.unspecifiedJvmPlatform
|
||||||
|
|
||||||
override fun getProjectDescriptor() =
|
override fun getProjectDescriptor() =
|
||||||
SdkAndMockLibraryProjectDescriptor(COMPLETION_TEST_DATA_BASE_PATH + "/injava/mockLib", false)
|
SdkAndMockLibraryProjectDescriptor(COMPLETION_TEST_DATA_BASE_PATH + "/injava/mockLib", false)
|
||||||
|
|||||||
+1
-1
@@ -82,7 +82,7 @@ abstract class AbstractCompletionIncrementalResolveTest : KotlinLightCodeInsight
|
|||||||
}
|
}
|
||||||
|
|
||||||
testCompletion(FileUtil.loadFile(file, true),
|
testCompletion(FileUtil.loadFile(file, true),
|
||||||
JvmPlatforms.defaultJvmPlatform,
|
JvmPlatforms.unspecifiedJvmPlatform,
|
||||||
{ completionType, count -> myFixture.complete(completionType, count) },
|
{ completionType, count -> myFixture.complete(completionType, count) },
|
||||||
additionalValidDirectives = listOf(TYPE_DIRECTIVE_PREFIX, BACKSPACES_DIRECTIVE_PREFIX))
|
additionalValidDirectives = listOf(TYPE_DIRECTIVE_PREFIX, BACKSPACES_DIRECTIVE_PREFIX))
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@ public abstract class AbstractJvmBasicCompletionTest extends KotlinFixtureComple
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public TargetPlatform getPlatform() {
|
public TargetPlatform getPlatform() {
|
||||||
return JvmPlatforms.INSTANCE.getDefaultJvmPlatform();
|
return JvmPlatforms.INSTANCE.getUnspecifiedJvmPlatform();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@ public abstract class AbstractJvmSmartCompletionTest extends KotlinFixtureComple
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public TargetPlatform getPlatform() {
|
public TargetPlatform getPlatform() {
|
||||||
return JvmPlatforms.INSTANCE.getDefaultJvmPlatform();
|
return JvmPlatforms.INSTANCE.getUnspecifiedJvmPlatform();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
+1
-1
@@ -21,6 +21,6 @@ abstract class AbstractJvmWithLibBasicCompletionTest : KotlinFixtureCompletionBa
|
|||||||
return SdkAndMockLibraryProjectDescriptor(TEST_PATH + "/" + getTestName(false) + "Src", false)
|
return SdkAndMockLibraryProjectDescriptor(TEST_PATH + "/" + getTestName(false) + "Src", false)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getPlatform() = JvmPlatforms.defaultJvmPlatform
|
override fun getPlatform() = JvmPlatforms.unspecifiedJvmPlatform
|
||||||
override fun defaultCompletionType() = CompletionType.BASIC
|
override fun defaultCompletionType() = CompletionType.BASIC
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ import org.jetbrains.kotlin.idea.test.KotlinProjectDescriptorWithFacet
|
|||||||
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms
|
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms
|
||||||
|
|
||||||
abstract class AbstractKeywordCompletionTest : KotlinFixtureCompletionBaseTestCase() {
|
abstract class AbstractKeywordCompletionTest : KotlinFixtureCompletionBaseTestCase() {
|
||||||
override fun getPlatform() = JvmPlatforms.defaultJvmPlatform
|
override fun getPlatform() = JvmPlatforms.unspecifiedJvmPlatform
|
||||||
|
|
||||||
override fun defaultCompletionType() = CompletionType.BASIC
|
override fun defaultCompletionType() = CompletionType.BASIC
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ import org.jetbrains.kotlin.platform.jvm.JvmPlatforms
|
|||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
abstract class AbstractKotlinSourceInJavaCompletionTest : KotlinFixtureCompletionBaseTestCase() {
|
abstract class AbstractKotlinSourceInJavaCompletionTest : KotlinFixtureCompletionBaseTestCase() {
|
||||||
override fun getPlatform() = JvmPlatforms.defaultJvmPlatform
|
override fun getPlatform() = JvmPlatforms.unspecifiedJvmPlatform
|
||||||
|
|
||||||
override fun doTest(testPath: String) {
|
override fun doTest(testPath: String) {
|
||||||
val mockPath = RELATIVE_COMPLETION_TEST_DATA_BASE_PATH + "/injava/mockLib"
|
val mockPath = RELATIVE_COMPLETION_TEST_DATA_BASE_PATH + "/injava/mockLib"
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescrip
|
|||||||
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms
|
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms
|
||||||
|
|
||||||
abstract class AbstractKotlinStdLibInJavaCompletionTest : KotlinFixtureCompletionBaseTestCase() {
|
abstract class AbstractKotlinStdLibInJavaCompletionTest : KotlinFixtureCompletionBaseTestCase() {
|
||||||
override fun getPlatform() = JvmPlatforms.defaultJvmPlatform
|
override fun getPlatform() = JvmPlatforms.unspecifiedJvmPlatform
|
||||||
override fun getProjectDescriptor() = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
|
override fun getProjectDescriptor() = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
|
||||||
override fun defaultCompletionType() = CompletionType.BASIC
|
override fun defaultCompletionType() = CompletionType.BASIC
|
||||||
}
|
}
|
||||||
+1
-1
@@ -14,7 +14,7 @@ abstract class AbstractMultiFileJvmBasicCompletionTest : KotlinCompletionTestCas
|
|||||||
configureByFile(getTestName(false) + ".kt", "")
|
configureByFile(getTestName(false) + ".kt", "")
|
||||||
val shouldFail = testPath.contains("NoSpecifiedType")
|
val shouldFail = testPath.contains("NoSpecifiedType")
|
||||||
AstAccessControl.testWithControlledAccessToAst(shouldFail, getFile().getVirtualFile(), getProject(), getTestRootDisposable(), {
|
AstAccessControl.testWithControlledAccessToAst(shouldFail, getFile().getVirtualFile(), getProject(), getTestRootDisposable(), {
|
||||||
testCompletion(file.text, JvmPlatforms.defaultJvmPlatform, { completionType, invocationCount ->
|
testCompletion(file.text, JvmPlatforms.unspecifiedJvmPlatform, { completionType, invocationCount ->
|
||||||
setType(completionType)
|
setType(completionType)
|
||||||
complete(invocationCount)
|
complete(invocationCount)
|
||||||
myItems
|
myItems
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ abstract class AbstractMultiFileSmartCompletionTest : KotlinCompletionTestCase()
|
|||||||
protected fun doTest(testPath: String) {
|
protected fun doTest(testPath: String) {
|
||||||
configureByFile(getTestName(false) + ".kt", "")
|
configureByFile(getTestName(false) + ".kt", "")
|
||||||
AstAccessControl.testWithControlledAccessToAst(false, getFile().getVirtualFile(), getProject(), getTestRootDisposable(), {
|
AstAccessControl.testWithControlledAccessToAst(false, getFile().getVirtualFile(), getProject(), getTestRootDisposable(), {
|
||||||
testCompletion(file.text, JvmPlatforms.defaultJvmPlatform, { completionType, invocationCount ->
|
testCompletion(file.text, JvmPlatforms.unspecifiedJvmPlatform, { completionType, invocationCount ->
|
||||||
setType(completionType)
|
setType(completionType)
|
||||||
complete(invocationCount)
|
complete(invocationCount)
|
||||||
myItems
|
myItems
|
||||||
|
|||||||
+1
-1
@@ -89,7 +89,7 @@ object ExpectedCompletionUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val UNSUPPORTED_PLATFORM_MESSAGE = "Only ${JvmPlatforms.defaultJvmPlatform} and ${JsPlatforms.defaultJsPlatform} platforms are supported"
|
private val UNSUPPORTED_PLATFORM_MESSAGE = "Only ${JvmPlatforms.unspecifiedJvmPlatform} and ${JsPlatforms.defaultJsPlatform} platforms are supported"
|
||||||
|
|
||||||
private val EXIST_LINE_PREFIX = "EXIST:"
|
private val EXIST_LINE_PREFIX = "EXIST:"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@ class KotlinGradleModuleConfigurator : KotlinWithGradleConfigurator() {
|
|||||||
get() = NAME
|
get() = NAME
|
||||||
|
|
||||||
override val targetPlatform: TargetPlatform
|
override val targetPlatform: TargetPlatform
|
||||||
get() = JvmPlatforms.defaultJvmPlatform
|
get() = JvmPlatforms.unspecifiedJvmPlatform
|
||||||
|
|
||||||
@Suppress("DEPRECATION_ERROR")
|
@Suppress("DEPRECATION_ERROR")
|
||||||
override fun getTargetPlatform() = JvmPlatforms.CompatJvmPlatform
|
override fun getTargetPlatform() = JvmPlatforms.CompatJvmPlatform
|
||||||
|
|||||||
+2
-5
@@ -48,9 +48,6 @@ import org.jetbrains.kotlin.idea.project.languageVersionSettings
|
|||||||
import org.jetbrains.kotlin.idea.util.projectStructure.allModules
|
import org.jetbrains.kotlin.idea.util.projectStructure.allModules
|
||||||
import org.jetbrains.kotlin.idea.util.projectStructure.sdk
|
import org.jetbrains.kotlin.idea.util.projectStructure.sdk
|
||||||
import org.jetbrains.kotlin.platform.TargetPlatform
|
import org.jetbrains.kotlin.platform.TargetPlatform
|
||||||
import org.jetbrains.kotlin.platform.impl.JvmIdePlatformKind
|
|
||||||
import org.jetbrains.kotlin.platform.impl.isCommon
|
|
||||||
import org.jetbrains.kotlin.platform.impl.isJavaScript
|
|
||||||
import org.jetbrains.kotlin.platform.js.JsPlatforms
|
import org.jetbrains.kotlin.platform.js.JsPlatforms
|
||||||
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms
|
import org.jetbrains.kotlin.platform.jvm.JvmPlatforms
|
||||||
import org.jetbrains.kotlin.platform.js.isJs
|
import org.jetbrains.kotlin.platform.js.isJs
|
||||||
@@ -947,8 +944,8 @@ class GradleFacetImportTest : GradleImportingTestCase() {
|
|||||||
configureByFiles()
|
configureByFiles()
|
||||||
importProject()
|
importProject()
|
||||||
|
|
||||||
checkStableModuleName("project_main", "project", JvmPlatforms.defaultJvmPlatform, isProduction = true)
|
checkStableModuleName("project_main", "project", JvmPlatforms.unspecifiedJvmPlatform, isProduction = true)
|
||||||
checkStableModuleName("project_test", "project", JvmPlatforms.defaultJvmPlatform, isProduction = false)
|
checkStableModuleName("project_test", "project", JvmPlatforms.unspecifiedJvmPlatform, isProduction = false)
|
||||||
|
|
||||||
assertAllModulesConfigured()
|
assertAllModulesConfigured()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ object JvmIdePlatformKind : IdePlatformKind<JvmIdePlatformKind>() {
|
|||||||
return K2JVMCompilerArguments()
|
return K2JVMCompilerArguments()
|
||||||
}
|
}
|
||||||
|
|
||||||
override val platforms: List<TargetPlatform> = JvmTarget.values().map { ver -> JvmPlatforms.jvmPlatformByTargetVersion(ver) } + listOf(JvmPlatforms.defaultJvmPlatform)
|
override val platforms: List<TargetPlatform> = JvmTarget.values().map { ver -> JvmPlatforms.jvmPlatformByTargetVersion(ver) } + listOf(JvmPlatforms.unspecifiedJvmPlatform)
|
||||||
override val defaultPlatform get() = JvmPlatforms.defaultJvmPlatform
|
override val defaultPlatform get() = JvmPlatforms.defaultJvmPlatform
|
||||||
|
|
||||||
override val argumentsClass get() = K2JVMCompilerArguments::class.java
|
override val argumentsClass get() = K2JVMCompilerArguments::class.java
|
||||||
|
|||||||
+1
-1
@@ -71,7 +71,7 @@ open class KotlinJavaModuleConfigurator protected constructor() : KotlinWithLibr
|
|||||||
get() = NAME
|
get() = NAME
|
||||||
|
|
||||||
override val targetPlatform: TargetPlatform
|
override val targetPlatform: TargetPlatform
|
||||||
get() = JvmPlatforms.defaultJvmPlatform
|
get() = JvmPlatforms.unspecifiedJvmPlatform
|
||||||
|
|
||||||
@Suppress("DEPRECATION_ERROR")
|
@Suppress("DEPRECATION_ERROR")
|
||||||
override fun getTargetPlatform() = JvmPlatforms.CompatJvmPlatform
|
override fun getTargetPlatform() = JvmPlatforms.CompatJvmPlatform
|
||||||
|
|||||||
+1
-1
@@ -179,7 +179,7 @@ private object DebugLabelModuleDescriptor
|
|||||||
}
|
}
|
||||||
|
|
||||||
override val platform: TargetPlatform?
|
override val platform: TargetPlatform?
|
||||||
get() = JvmPlatforms.defaultJvmPlatform
|
get() = JvmPlatforms.unspecifiedJvmPlatform
|
||||||
|
|
||||||
override fun getSubPackagesOf(fqName: FqName, nameFilter: (Name) -> Boolean): Collection<FqName> {
|
override fun getSubPackagesOf(fqName: FqName, nameFilter: (Name) -> Boolean): Collection<FqName> {
|
||||||
return emptyList()
|
return emptyList()
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class KotlinTemplatesFactory : ProjectTemplatesFactory() {
|
|||||||
val result = mutableListOf<ProjectTemplate>(
|
val result = mutableListOf<ProjectTemplate>(
|
||||||
BuilderBasedTemplate(
|
BuilderBasedTemplate(
|
||||||
KotlinModuleBuilder(
|
KotlinModuleBuilder(
|
||||||
JvmPlatforms.defaultJvmPlatform,
|
JvmPlatforms.unspecifiedJvmPlatform,
|
||||||
"JVM | IDEA",
|
"JVM | IDEA",
|
||||||
"Kotlin project with a JVM target based on the IntelliJ IDEA build system",
|
"Kotlin project with a JVM target based on the IntelliJ IDEA build system",
|
||||||
KotlinIcons.SMALL_LOGO
|
KotlinIcons.SMALL_LOGO
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ class KotlinBytecodeToolWindow(private val myProject: Project, private val toolW
|
|||||||
if (!platform.isCommon() && !platform.isJvm()) return null
|
if (!platform.isCommon() && !platform.isJvm()) return null
|
||||||
|
|
||||||
val resolutionFacade = KotlinCacheService.getInstance(ktFile.project)
|
val resolutionFacade = KotlinCacheService.getInstance(ktFile.project)
|
||||||
.getResolutionFacadeByFile(ktFile, JvmPlatforms.defaultJvmPlatform)
|
.getResolutionFacadeByFile(ktFile, JvmPlatforms.unspecifiedJvmPlatform)
|
||||||
?: return null
|
?: return null
|
||||||
|
|
||||||
val bindingContextForFile = resolutionFacade.analyzeWithAllCompilerChecks(listOf(ktFile)).bindingContext
|
val bindingContextForFile = resolutionFacade.analyzeWithAllCompilerChecks(listOf(ktFile)).bindingContext
|
||||||
|
|||||||
+1
-1
@@ -68,7 +68,7 @@ class KotlinJavaMavenConfigurator : KotlinMavenConfigurator(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override val targetPlatform: TargetPlatform
|
override val targetPlatform: TargetPlatform
|
||||||
get() = JvmPlatforms.defaultJvmPlatform
|
get() = JvmPlatforms.unspecifiedJvmPlatform
|
||||||
|
|
||||||
@Suppress("DEPRECATION_ERROR")
|
@Suppress("DEPRECATION_ERROR")
|
||||||
override fun getTargetPlatform() = JvmPlatforms.CompatJvmPlatform
|
override fun getTargetPlatform() = JvmPlatforms.CompatJvmPlatform
|
||||||
|
|||||||
@@ -2529,7 +2529,7 @@ class KotlinMavenImporterTest : MavenImportingTestCase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
with(facetSettings("my-jvm-module")) {
|
with(facetSettings("my-jvm-module")) {
|
||||||
Assert.assertEquals(JvmPlatforms.defaultJvmPlatform, platform)
|
Assert.assertEquals(JvmPlatforms.jvm16, platform)
|
||||||
Assert.assertEquals(listOf("my-common-module1", "my-common-module2"), implementedModuleNames)
|
Assert.assertEquals(listOf("my-common-module1", "my-common-module2"), implementedModuleNames)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2974,8 +2974,8 @@ class KotlinMavenImporterTest : MavenImportingTestCase() {
|
|||||||
|
|
||||||
assertImporterStatePresent()
|
assertImporterStatePresent()
|
||||||
|
|
||||||
checkStableModuleName("project", "project", JvmPlatforms.defaultJvmPlatform, isProduction = true)
|
checkStableModuleName("project", "project", JvmPlatforms.unspecifiedJvmPlatform, isProduction = true)
|
||||||
checkStableModuleName("project", "project", JvmPlatforms.defaultJvmPlatform, isProduction = false)
|
checkStableModuleName("project", "project", JvmPlatforms.unspecifiedJvmPlatform, isProduction = false)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testStableModuleNameWhileUsngMaven_JS() {
|
fun testStableModuleNameWhileUsngMaven_JS() {
|
||||||
|
|||||||
+1
-1
@@ -365,7 +365,7 @@ class KotlinElementActionsFactory : JvmElementActionsFactory() {
|
|||||||
if (!modifierBuilder.isValid) return emptyList()
|
if (!modifierBuilder.isValid) return emptyList()
|
||||||
|
|
||||||
val resolutionFacade = KotlinCacheService.getInstance(targetContainer.project)
|
val resolutionFacade = KotlinCacheService.getInstance(targetContainer.project)
|
||||||
.getResolutionFacadeByFile(targetContainer.containingFile, JvmPlatforms.defaultJvmPlatform) ?: return emptyList()
|
.getResolutionFacadeByFile(targetContainer.containingFile, JvmPlatforms.unspecifiedJvmPlatform) ?: return emptyList()
|
||||||
val returnTypeInfo = request.returnType.toKotlinTypeInfo(resolutionFacade)
|
val returnTypeInfo = request.returnType.toKotlinTypeInfo(resolutionFacade)
|
||||||
val parameters = request.parameters as List<Pair<SuggestedNameInfo, List<ExpectedType>>>
|
val parameters = request.parameters as List<Pair<SuggestedNameInfo, List<ExpectedType>>>
|
||||||
val parameterInfos = parameters.map { (suggestedNames, expectedTypes) ->
|
val parameterInfos = parameters.map { (suggestedNames, expectedTypes) ->
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class KotlinNonJvmSourceRootConverterProvider : ConverterProvider("kotlin-non-jv
|
|||||||
|
|
||||||
// TODO(dsavvinov): review how it behaves in HMPP environment
|
// TODO(dsavvinov): review how it behaves in HMPP environment
|
||||||
private val PLATFORM_TO_STDLIB_DETECTORS: Map<TargetPlatform, (Array<VirtualFile>) -> Boolean> = mapOf(
|
private val PLATFORM_TO_STDLIB_DETECTORS: Map<TargetPlatform, (Array<VirtualFile>) -> Boolean> = mapOf(
|
||||||
JvmPlatforms.defaultJvmPlatform to { roots: Array<VirtualFile> -> JavaRuntimeDetectionUtil.getRuntimeJar(roots.toList()) != null },
|
JvmPlatforms.unspecifiedJvmPlatform to { roots: Array<VirtualFile> -> JavaRuntimeDetectionUtil.getRuntimeJar(roots.toList()) != null },
|
||||||
JsPlatforms.defaultJsPlatform to { roots: Array<VirtualFile> -> JsLibraryStdDetectionUtil.getJsStdLibJar(roots.toList()) != null },
|
JsPlatforms.defaultJsPlatform to { roots: Array<VirtualFile> -> JsLibraryStdDetectionUtil.getJsStdLibJar(roots.toList()) != null },
|
||||||
CommonPlatforms.defaultCommonPlatform to { roots: Array<VirtualFile> -> getLibraryJar(roots, PathUtil.KOTLIN_STDLIB_COMMON_JAR_PATTERN) != null }
|
CommonPlatforms.defaultCommonPlatform to { roots: Array<VirtualFile> -> getLibraryJar(roots, PathUtil.KOTLIN_STDLIB_COMMON_JAR_PATTERN) != null }
|
||||||
)
|
)
|
||||||
@@ -167,7 +167,7 @@ class KotlinNonJvmSourceRootConverterProvider : ConverterProvider("kotlin-non-jv
|
|||||||
private fun ModuleSettings.detectPlatform(): TargetPlatform {
|
private fun ModuleSettings.detectPlatform(): TargetPlatform {
|
||||||
return detectPlatformByFacet()
|
return detectPlatformByFacet()
|
||||||
?: detectPlatformByDependencies()
|
?: detectPlatformByDependencies()
|
||||||
?: JvmPlatforms.defaultJvmPlatform
|
?: JvmPlatforms.unspecifiedJvmPlatform
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun ModuleSettings.getSourceFolderElements(): List<Element> {
|
private fun ModuleSettings.getSourceFolderElements(): List<Element> {
|
||||||
|
|||||||
+1
-1
@@ -78,7 +78,7 @@ abstract class AbstractCodeInsightActionTest : KotlinLightCodeInsightFixtureTest
|
|||||||
val targetPlatformName = InTextDirectivesUtils.findStringWithPrefixes(fileText, "// PLATFORM: ")
|
val targetPlatformName = InTextDirectivesUtils.findStringWithPrefixes(fileText, "// PLATFORM: ")
|
||||||
if (targetPlatformName != null) {
|
if (targetPlatformName != null) {
|
||||||
val targetPlatform = when (targetPlatformName) {
|
val targetPlatform = when (targetPlatformName) {
|
||||||
"JVM" -> JvmPlatforms.defaultJvmPlatform
|
"JVM" -> JvmPlatforms.unspecifiedJvmPlatform
|
||||||
"JavaScript" -> JsPlatforms.defaultJsPlatform
|
"JavaScript" -> JsPlatforms.defaultJsPlatform
|
||||||
"Common" -> CommonPlatforms.defaultCommonPlatform
|
"Common" -> CommonPlatforms.defaultCommonPlatform
|
||||||
else -> error("Unexpected platform name: $targetPlatformName")
|
else -> error("Unexpected platform name: $targetPlatformName")
|
||||||
|
|||||||
+1
-1
@@ -61,7 +61,7 @@ class CodeFragmentCompletionInLibraryTest : AbstractJvmBasicCompletionTest() {
|
|||||||
setupFixtureByCodeFragment(fragmentText)
|
setupFixtureByCodeFragment(fragmentText)
|
||||||
val directives = completionDirectives.map { "//$it" }.joinToString(separator = "\n")
|
val directives = completionDirectives.map { "//$it" }.joinToString(separator = "\n")
|
||||||
testCompletion(directives,
|
testCompletion(directives,
|
||||||
JvmPlatforms.defaultJvmPlatform, { completionType, count -> myFixture.complete(completionType, count) })
|
JvmPlatforms.unspecifiedJvmPlatform, { completionType, count -> myFixture.complete(completionType, count) })
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupFixtureByCodeFragment(fragmentText: String) {
|
private fun setupFixtureByCodeFragment(fragmentText: String) {
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import com.intellij.openapi.roots.ModuleRootModificationUtil
|
|||||||
import com.intellij.openapi.vfs.LocalFileSystem
|
import com.intellij.openapi.vfs.LocalFileSystem
|
||||||
import junit.framework.TestCase
|
import junit.framework.TestCase
|
||||||
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime
|
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime
|
||||||
import org.jetbrains.kotlin.config.JvmTarget
|
|
||||||
import org.jetbrains.kotlin.idea.framework.CommonLibraryKind
|
import org.jetbrains.kotlin.idea.framework.CommonLibraryKind
|
||||||
import org.jetbrains.kotlin.idea.framework.JSLibraryKind
|
import org.jetbrains.kotlin.idea.framework.JSLibraryKind
|
||||||
import org.jetbrains.kotlin.idea.stubs.AbstractMultiModuleTest
|
import org.jetbrains.kotlin.idea.stubs.AbstractMultiModuleTest
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ abstract class AbstractIdeReplCompletionTest : KotlinFixtureCompletionBaseTestCa
|
|||||||
super.tearDown()
|
super.tearDown()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getPlatform() = JvmPlatforms.defaultJvmPlatform
|
override fun getPlatform() = JvmPlatforms.unspecifiedJvmPlatform
|
||||||
override fun defaultCompletionType() = CompletionType.BASIC
|
override fun defaultCompletionType() = CompletionType.BASIC
|
||||||
|
|
||||||
override fun doTest(testPath: String) {
|
override fun doTest(testPath: String) {
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ abstract class AbstractScriptConfigurationCompletionTest : AbstractScriptConfigu
|
|||||||
configureScriptFile(path)
|
configureScriptFile(path)
|
||||||
testCompletion(
|
testCompletion(
|
||||||
file.text,
|
file.text,
|
||||||
JvmPlatforms.defaultJvmPlatform,
|
JvmPlatforms.unspecifiedJvmPlatform,
|
||||||
additionalValidDirectives = switches,
|
additionalValidDirectives = switches,
|
||||||
complete = { completionType, count ->
|
complete = { completionType, count ->
|
||||||
setType(completionType)
|
setType(completionType)
|
||||||
|
|||||||
Reference in New Issue
Block a user