Revert temporary commit "-- Attempt to fix completion for extensions"

This reverts commit b70f9cd675.
This commit is contained in:
Nikolay Krasko
2014-06-25 14:52:41 +04:00
parent c98ec96194
commit 3f2d65762b
3 changed files with 14 additions and 36 deletions
@@ -194,7 +194,7 @@ public final class TipsManager {
private static Set<DeclarationDescriptor> includeExternalCallableExtensions(
@NotNull Collection<DeclarationDescriptor> descriptors,
@NotNull JetScope externalScope,
@NotNull ReceiverValue receiverValue
@NotNull final ReceiverValue receiverValue
) {
// It's impossible to add extension function for package
JetType receiverType = receiverValue.getType();
@@ -203,7 +203,15 @@ public final class TipsManager {
}
Set<DeclarationDescriptor> descriptorsSet = Sets.newHashSet(descriptors);
descriptorsSet.addAll(ExpressionTypingUtils.filterCallableExtensions(receiverValue, JetScopeUtils.getAllExtensions(externalScope)));
descriptorsSet.addAll(
Collections2.filter(JetScopeUtils.getAllExtensions(externalScope),
new Predicate<CallableDescriptor>() {
@Override
public boolean apply(CallableDescriptor callableDescriptor) {
return ExpressionTypingUtils.checkIsExtensionCallable(receiverValue, callableDescriptor);
}
}));
return descriptorsSet;
}