This is an intermediate commit to preserve git file history.
The code doesn't compile yet.
KTIJ-30693
GitOrigin-RevId: 6a56798bc1b0396b519f15005f59e5cfee08c68b
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
+ IdIndex produces effectively (int->int) map, but indexes API forces it to be (IdIndexEntry->Integer), which involves a lot of boxing. Try to optimize out some of these boxing by specialized IdEntryMapExternalizer
GitOrigin-RevId: d535c1bc8f9c3eb9878588df8b817d12bd6b3afa
+ extract explicit int->int map wrapper (IdEntryToScopeMapImpl), extract an IdEntryToScopeMap interface for it
GitOrigin-RevId: cd2cc114425121a945bdf82e3e0ff7a5769a52b4
+ `-Didea.diagnostic.opentelemetry.metrics-reporting-period-ms=...`, with default=1 min (as before)
GitOrigin-RevId: 7220d207c555e458987d9e1d6e390f32bdca0fb4
cache isJavaIdentifier for ASCII characters
split array and CharSequence paths
specify some empirical initial capacity for the set
shorten the algorithm
GitOrigin-RevId: 43886096332ee00be145401a1d285dd41c66e852
This can cause unexpected and undesired changes to the files which should
not be considered sources and cannot be properly analyzed (testdata, for example).
The import optimizer might kick in when such files are moved between
folders or renamed.
^KTIJ-27447 Fixed
GitOrigin-RevId: 3b80e63d500f3780fc33334b0f10f0a9ed9bedc7
The bug was introduced in 276f56c4d08940f289657497bc1539dd24b21701 and caused problems like this:
```
java.nio.file.ProviderMismatchException
at java.base/sun.nio.fs.WindowsPath.toWindowsPath(WindowsPath.java:389)
at java.base/sun.nio.fs.WindowsFileSystemProvider.isSameFile(WindowsFileSystemProvider.java:434)
at com.intellij.platform.core.nio.fs.DelegatingFileSystemProvider.isSameFile(DelegatingFileSystemProvider.java:200)
at com.intellij.platform.core.nio.fs.DelegatingFileSystemProvider.isSameFile(DelegatingFileSystemProvider.java:200)
at com.intellij.platform.ijent.community.impl.nio.telemetry.TracingFileSystemProvider.isSameFile(TracingFileSystemProvider.kt:73)
at com.intellij.execution.wsl.ijent.nio.IjentWslNioFileSystemProvider.isSameFile(IjentWslNioFileSystemProvider.kt:190)
at com.intellij.platform.core.nio.fs.DelegatingFileSystemProvider.isSameFile(DelegatingFileSystemProvider.java:200)
at java.base/java.nio.file.Files.isSameFile(Files.java:1539)
...
```
GitOrigin-RevId: af9ea7cddd1768988bcfec9ba49e175ffa23fc99
- top level callables should be already imported
- member callables should be imported explicitly as their fqn is "replaced" with receiver
^KTIJ-30922 fixed
GitOrigin-RevId: 8c4c6319d5fac1a8e7930dbabdd67c3b1a4895b9