KT-738 No kotlin type completion in extend class scope - Fixes after CR-KT-13 review
This commit is contained in:
@@ -78,7 +78,6 @@ class JetSimpleNameReference extends JetPsiReference {
|
||||
private Object[] collectLookupElements(BindingContext bindingContext, JetScope scope) {
|
||||
List<LookupElement> result = Lists.newArrayList();
|
||||
for (final DeclarationDescriptor descriptor : scope.getAllDescriptors()) {
|
||||
PsiElement declaration = bindingContext.get(BindingContext.DESCRIPTOR_TO_DECLARATION, descriptor.getOriginal());
|
||||
LookupElementBuilder element = LookupElementBuilder.create(descriptor.getName());
|
||||
String typeText = "";
|
||||
String tailText = "";
|
||||
@@ -107,9 +106,12 @@ class JetSimpleNameReference extends JetPsiReference {
|
||||
typeText = DescriptorRenderer.TEXT.render(descriptor);
|
||||
}
|
||||
element = element.setTailText(tailText, tailTextGrayed).setTypeText(typeText);
|
||||
|
||||
PsiElement declaration = bindingContext.get(BindingContext.DESCRIPTOR_TO_DECLARATION, descriptor.getOriginal());
|
||||
if (declaration != null) {
|
||||
element = element.setIcon(declaration.getIcon(Iconable.ICON_FLAG_OPEN | Iconable.ICON_FLAG_VISIBILITY));
|
||||
}
|
||||
|
||||
result.add(element);
|
||||
}
|
||||
return result.toArray();
|
||||
|
||||
Reference in New Issue
Block a user