KT-1229 Packages should be showed in package derictive

This commit is contained in:
Nikolay Krasko
2012-02-16 15:35:54 +04:00
parent 504beac0fa
commit e4cefd000a
13 changed files with 122 additions and 103 deletions
@@ -97,6 +97,16 @@ public final class TipsManager {
return Collections.emptyList();
}
@NotNull
public static Collection<DeclarationDescriptor> getReferenceVariants(JetNamespaceHeader expression, BindingContext context) {
JetScope resolutionScope = context.get(BindingContext.RESOLUTION_SCOPE, expression);
if (resolutionScope != null) {
return excludeNonPackageDescriptors(resolutionScope.getAllDescriptors());
}
return Collections.emptyList();
}
public static Collection<DeclarationDescriptor> excludePrivateDescriptors(
@NotNull Collection<DeclarationDescriptor> descriptors) {