Refactor: Remove context parameter from BindingContextUtils.descriptorToDeclaration utilities family
This commit is contained in:
+1
-1
@@ -117,7 +117,7 @@ public final class AnalyzerWithCompilerReport {
|
||||
if (!descriptorsWithErrors.isEmpty()) {
|
||||
StringBuilder message = new StringBuilder("The following Java entities have annotations with wrong Kotlin signatures:\n");
|
||||
for (DeclarationDescriptor descriptor : descriptorsWithErrors) {
|
||||
PsiElement declaration = BindingContextUtils.descriptorToDeclaration(bc, descriptor);
|
||||
PsiElement declaration = BindingContextUtils.descriptorToDeclaration(descriptor);
|
||||
assert declaration instanceof PsiModifierListOwner;
|
||||
|
||||
List<String> errors = bc.get(JavaBindingContext.LOAD_FROM_JAVA_SIGNATURE_ERRORS, descriptor);
|
||||
|
||||
+1
-1
@@ -125,7 +125,7 @@ public class CliLightClassGenerationSupport extends LightClassGenerationSupport
|
||||
public Collection<JetClassOrObject> findClassOrObjectDeclarations(@NotNull FqName fqName, @NotNull GlobalSearchScope searchScope) {
|
||||
ClassDescriptor classDescriptor = getTrace().get(BindingContext.FQNAME_TO_CLASS_DESCRIPTOR, fqName.toUnsafe());
|
||||
if (classDescriptor != null) {
|
||||
PsiElement element = BindingContextUtils.classDescriptorToDeclaration(trace.getBindingContext(), classDescriptor);
|
||||
PsiElement element = BindingContextUtils.classDescriptorToDeclaration(classDescriptor);
|
||||
if (element != null && PsiSearchScopeUtil.isInScope(searchScope, element)) {
|
||||
return Collections.singletonList((JetClassOrObject) element);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user