Build stubs for local functions; show them in Goto Symbol
#KT-14161 Fixed
This commit is contained in:
@@ -23,12 +23,12 @@ object KotlinStubVersions {
|
||||
// Though only kotlin declarations (no code in the bodies) are stubbed, please do increase this version
|
||||
// if you are not 100% sure it can be avoided.
|
||||
// Increasing this version will lead to reindexing of all kotlin source files on the first IDE startup with the new version.
|
||||
const val SOURCE_STUB_VERSION = 122
|
||||
const val SOURCE_STUB_VERSION = 123
|
||||
|
||||
// Binary stub version should be increased if stub format (org.jetbrains.kotlin.psi.stubs.impl) is changed
|
||||
// or changes are made to the core stub building code (org.jetbrains.kotlin.idea.decompiler.stubBuilder).
|
||||
// Increasing this version will lead to reindexing of all binary files that are potentially kotlin binaries (including all class files).
|
||||
private const val BINARY_STUB_VERSION = 59
|
||||
private const val BINARY_STUB_VERSION = 60
|
||||
|
||||
// Classfile stub version should be increased if changes are made to classfile stub building subsystem (org.jetbrains.kotlin.idea.decompiler.classFile)
|
||||
// Increasing this version will lead to reindexing of all classfiles.
|
||||
|
||||
+1
-4
@@ -87,12 +87,9 @@ public abstract class KtStubElementType<StubT extends StubElement, PsiT extends
|
||||
@Override
|
||||
public boolean shouldCreateStub(ASTNode node) {
|
||||
PsiElement psi = node.getPsi();
|
||||
if (psi instanceof KtClassOrObject) {
|
||||
if (psi instanceof KtClassOrObject || psi instanceof KtFunction) {
|
||||
return true;
|
||||
}
|
||||
if (psi instanceof KtFunction) {
|
||||
return !((KtFunction) psi).isLocal();
|
||||
}
|
||||
if (psi instanceof KtProperty) {
|
||||
return !((KtProperty) psi).isLocal();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user