Renamed methods in MemberScope from getSmth to getContributedSmth
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@ object PackageDirectiveCompletion {
|
||||
|
||||
val packageMemberScope = resolutionFacade.moduleDescriptor.getPackage(file.packageFqName.parent()).memberScope
|
||||
|
||||
val variants = packageMemberScope.getDescriptors(DescriptorKindFilter.PACKAGES, prefixMatcher.asNameFilter())
|
||||
val variants = packageMemberScope.getContributedDescriptors(DescriptorKindFilter.PACKAGES, prefixMatcher.asNameFilter())
|
||||
val lookupElementFactory = BasicLookupElementFactory(resolutionFacade.project, InsertHandlerProvider(callType = CallType.PACKAGE_DIRECTIVE, expectedInfosCalculator = { emptyList() }))
|
||||
for (variant in variants) {
|
||||
val lookupElement = lookupElementFactory.createLookupElement(variant)
|
||||
|
||||
+3
-3
@@ -90,16 +90,16 @@ class StaticMembers(
|
||||
}
|
||||
}
|
||||
|
||||
classDescriptor.getStaticScope().getDescriptors().forEach(::processMember)
|
||||
classDescriptor.getStaticScope().getContributedDescriptors().forEach(::processMember)
|
||||
|
||||
val companionObject = classDescriptor.getCompanionObjectDescriptor()
|
||||
if (companionObject != null) {
|
||||
companionObject.getDefaultType().getMemberScope().getDescriptors()
|
||||
companionObject.getDefaultType().getMemberScope().getContributedDescriptors()
|
||||
.filter { !it.isExtension }
|
||||
.forEach(::processMember)
|
||||
}
|
||||
|
||||
var members = classDescriptor.getDefaultType().getMemberScope().getDescriptors()
|
||||
var members = classDescriptor.getDefaultType().getMemberScope().getContributedDescriptors()
|
||||
if (classDescriptor.getKind() != ClassKind.ENUM_CLASS) {
|
||||
members = members.filter { DescriptorUtils.isNonCompanionObject(it) }
|
||||
}
|
||||
|
||||
+1
-1
@@ -278,7 +278,7 @@ class TypeInstantiationItems(
|
||||
is ClassDescriptor -> container.getStaticScope()
|
||||
else -> return
|
||||
}
|
||||
val samConstructor = scope.getFunctions(`class`.name, NoLookupLocation.FROM_IDE)
|
||||
val samConstructor = scope.getContributedFunctions(`class`.name, NoLookupLocation.FROM_IDE)
|
||||
.filterIsInstance<SamConstructorDescriptor>()
|
||||
.singleOrNull() ?: return
|
||||
lookupElementFactory.createLookupElementsInSmartCompletion(samConstructor, bindingContext, useReceiverTypes = false)
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ class TypesWithContainsDetector(
|
||||
|
||||
private fun hasContainsNoCache(type: FuzzyType): Boolean {
|
||||
return type.nullability() != TypeNullability.NULLABLE &&
|
||||
type.type.memberScope.getFunctions(containsName, NoLookupLocation.FROM_IDE).any { isGoodContainsFunction(it, type.freeParameters) }
|
||||
type.type.memberScope.getContributedFunctions(containsName, NoLookupLocation.FROM_IDE).any { isGoodContainsFunction(it, type.freeParameters) }
|
||||
|| typesWithExtensionContains.any { type.checkIsSubtypeOf(it) != null }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user