ReferenceSearch searches references to parameters using optimized way too

#KT-8625 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-07-31 16:50:34 +03:00
parent d6f724c55d
commit 397e48a11d
7 changed files with 74 additions and 88 deletions
@@ -20,7 +20,6 @@ import com.intellij.lang.ASTNode;
import com.intellij.navigation.ItemPresentation;
import com.intellij.navigation.ItemPresentationProviders;
import com.intellij.psi.PsiElement;
import com.intellij.psi.search.SearchScope;
import com.intellij.psi.tree.TokenSet;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -176,21 +175,6 @@ public class JetParameter extends JetNamedDeclarationStub<KotlinParameterStub> i
return Collections.emptyList();
}
@NotNull
@Override
public SearchScope getUseScope() {
JetDeclaration function = getOwnerFunction();
if (function != null && !(function instanceof JetFunctionLiteral)) {
return function.getUseScope();
}
return super.getUseScope();
}
@NotNull
public SearchScope getUseScopeExceptNamedArguments() {
return super.getUseScope();
}
@Nullable
public JetFunction getOwnerFunction() {
PsiElement parent = getParent();