Method rename
This commit is contained in:
@@ -85,7 +85,7 @@ abstract class JetNamedDeclarationStub<T extends NamedStub> extends JetDeclarati
|
||||
@NotNull
|
||||
@Override
|
||||
public SearchScope getUseScope() {
|
||||
JetElement enclosingBlock = JetPsiUtil.getEnclosingBlockForLocalDeclaration(this);
|
||||
JetElement enclosingBlock = JetPsiUtil.getEnclosingElementForLocalDeclaration(this);
|
||||
if (enclosingBlock != null) {
|
||||
return new LocalSearchScope(enclosingBlock);
|
||||
}
|
||||
|
||||
@@ -1005,7 +1005,7 @@ public class JetPsiUtil {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static JetElement getEnclosingBlockForLocalDeclaration(@Nullable JetNamedDeclaration declaration) {
|
||||
public static JetElement getEnclosingElementForLocalDeclaration(@Nullable JetNamedDeclaration declaration) {
|
||||
if (declaration instanceof JetTypeParameter || declaration instanceof JetParameter) {
|
||||
declaration = PsiTreeUtil.getParentOfType(declaration, JetNamedDeclaration.class);
|
||||
}
|
||||
@@ -1021,7 +1021,7 @@ public class JetPsiUtil {
|
||||
}
|
||||
|
||||
public static boolean isLocal(@NotNull JetNamedDeclaration declaration) {
|
||||
return getEnclosingBlockForLocalDeclaration(declaration) != null;
|
||||
return getEnclosingElementForLocalDeclaration(declaration) != null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -27,9 +27,9 @@ public abstract class KotlinCallTreeStructure extends HierarchyTreeStructure {
|
||||
this.scopeType = scopeType;
|
||||
}
|
||||
|
||||
protected static JetElement getEnclosingBlockForLocalDeclaration(PsiElement element) {
|
||||
protected static JetElement getEnclosingElementForLocalDeclaration(PsiElement element) {
|
||||
return element instanceof JetNamedDeclaration
|
||||
? JetPsiUtil.getEnclosingBlockForLocalDeclaration((JetNamedDeclaration) element)
|
||||
? JetPsiUtil.getEnclosingElementForLocalDeclaration((JetNamedDeclaration) element)
|
||||
: null;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -215,7 +215,7 @@ public abstract class KotlinCallerMethodsTreeStructure extends KotlinCallTreeStr
|
||||
}
|
||||
|
||||
public static KotlinCallerMethodsTreeStructure newInstance(@NotNull Project project, @NotNull PsiElement element, String scopeType) {
|
||||
JetElement codeBlockForLocalDeclaration = getEnclosingBlockForLocalDeclaration(element);
|
||||
JetElement codeBlockForLocalDeclaration = getEnclosingElementForLocalDeclaration(element);
|
||||
if (codeBlockForLocalDeclaration != null) return new WithLocalRoot(project, element, scopeType, codeBlockForLocalDeclaration);
|
||||
|
||||
PsiMethod representativeMethod = getRepresentativePsiMethod(element);
|
||||
|
||||
Reference in New Issue
Block a user