Completion to complete non-imported classes on the first invocation
#KT-8527 Fixed
This commit is contained in:
@@ -67,8 +67,7 @@ class ImportableFqNameClassifier(private val file: KtFile) {
|
||||
}
|
||||
|
||||
return when {
|
||||
JavaToKotlinClassMap.INSTANCE.mapPlatformClass(fqName, DefaultBuiltIns.Instance).isNotEmpty()
|
||||
|| JavaAnnotationMapper.javaToKotlinNameMap[fqName] != null -> Classification.notToBeUsedInKotlin
|
||||
isJavaClassNotToBeUsedInKotlin(fqName) -> Classification.notToBeUsedInKotlin
|
||||
|
||||
fqName.parent() == file.packageFqName -> Classification.fromCurrentPackage
|
||||
|
||||
@@ -87,4 +86,7 @@ class ImportableFqNameClassifier(private val file: KtFile) {
|
||||
private fun isImportedWithPreciseImport(name: FqName) = name in preciseImports
|
||||
private fun isImportedWithAllUnderImport(name: FqName) = name.parent() in allUnderImports
|
||||
private fun hasPreciseImportFromPackage(packageName: FqName) = packageName in preciseImportPackages
|
||||
}
|
||||
}
|
||||
|
||||
fun isJavaClassNotToBeUsedInKotlin(fqName: FqName): Boolean
|
||||
= JavaToKotlinClassMap.INSTANCE.mapPlatformClass(fqName, DefaultBuiltIns.Instance).isNotEmpty() || JavaAnnotationMapper.javaToKotlinNameMap[fqName] != null
|
||||
Reference in New Issue
Block a user