Search: Optimize usage scope of class members
#KT-9285 Fixed
This commit is contained in:
@@ -98,6 +98,7 @@ These artifacts include extensions for the types available in the latter JDKs, s
|
|||||||
- [`KT-9125`](https://youtrack.jetbrains.com/issue/KT-9125) Support Type Hierarchy on references inside of super type call entries
|
- [`KT-9125`](https://youtrack.jetbrains.com/issue/KT-9125) Support Type Hierarchy on references inside of super type call entries
|
||||||
- [`KT-13542`](https://youtrack.jetbrains.com/issue/KT-13542) Rename: Do not search parameter text occurrences outside of its containing declaration
|
- [`KT-13542`](https://youtrack.jetbrains.com/issue/KT-13542) Rename: Do not search parameter text occurrences outside of its containing declaration
|
||||||
- [`KT-8672`](https://youtrack.jetbrains.com/issue/KT-8672) Rename: Optimize search of parameter references in calls with named arguments
|
- [`KT-8672`](https://youtrack.jetbrains.com/issue/KT-8672) Rename: Optimize search of parameter references in calls with named arguments
|
||||||
|
- [`KT-9285`](https://youtrack.jetbrains.com/issue/KT-9285) Rename: Optimize search of private class members
|
||||||
|
|
||||||
#### Refactorings
|
#### Refactorings
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
import org.jetbrains.kotlin.lexer.KtTokens;
|
import org.jetbrains.kotlin.lexer.KtTokens;
|
||||||
import org.jetbrains.kotlin.name.FqName;
|
import org.jetbrains.kotlin.name.FqName;
|
||||||
import org.jetbrains.kotlin.name.Name;
|
import org.jetbrains.kotlin.name.Name;
|
||||||
|
import org.jetbrains.kotlin.psi.psiUtil.KtPsiUtilKt;
|
||||||
import org.jetbrains.kotlin.psi.stubs.KotlinStubWithFqName;
|
import org.jetbrains.kotlin.psi.stubs.KotlinStubWithFqName;
|
||||||
import org.jetbrains.kotlin.types.expressions.OperatorConventions;
|
import org.jetbrains.kotlin.types.expressions.OperatorConventions;
|
||||||
|
|
||||||
@@ -117,7 +118,14 @@ abstract class KtNamedDeclarationStub<T extends KotlinStubWithFqName<?>> extends
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.getUseScope();
|
SearchScope scope = super.getUseScope();
|
||||||
|
|
||||||
|
KtClassOrObject classOrObject = KtPsiUtilKt.getContainingClassOrObject(this);
|
||||||
|
if (classOrObject != null) {
|
||||||
|
scope = scope.intersectWith(classOrObject.getUseScope());
|
||||||
|
}
|
||||||
|
|
||||||
|
return scope;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|||||||
Reference in New Issue
Block a user