Files
openide/java/java-indexing-impl
Ilya Kirillov 3e42f78fcc [kotlin] Do not use resolve/LC in go to class/symbol for Kotlin
Instead, implement the functionality via Kotlin declarations. Previously, it worked in a mixed mode: some declarations were provided via LC, some via Kotlin declarations.

Additionally, this change makes Kotlin "go to symbol/class" fully dumb-aware.

New behavior:
- All declarations are now provided via plain Kotlin declarations.
- No Light Classes are used:
  - To avoid using LC, `PsiShortNamesCache` is adapted in a way that it can ignore `PsiShortNamesCache` implementations which are explicitly marked as producing generated declarations instead of existing Java-based PSI like `PsiClass`, `PsiMethod`, etc.
    - `KotlinShortNamesCache` is marked as such, so it's ignored.
- As no resolve is used, all Kotlin contributors work in dumb mode.
- For facade declarations, like callables (functions or properties) from a facade or a facade class itself, new Kotlin contributors create new `PsiElementBasedNavigationItem`:
   - It points to the original Kotlin declaration (or to a `KtFile` in the case of a facade class itself).
   - In go to class/symbol action, duplicated declarations are merged with the original ones, so they are used only for text search purposes.
     - It's reflected in the tesdata updates
- `GotoSymbolModel2.getFullName` is updated so it can handle not only `PsiElement` but also a `PsiElementNavigationItem`
- Behaviour of qualified name is stabilized:
  - Previously, it produced `(in Container).Foo` for LC-based classes and `Container.Foo` for plain Kotlin classes.
  - Now, it always produces `Container.Foo`
       - It's reflected in the tesdata updates

^KTIJ-30913 fixed
^KTIJ-30842 fixed

GitOrigin-RevId: c671f6e161dd530e19e8abbbc7046f1cd121908d
2024-08-09 19:06:53 +00:00
..