Commit Graph

451322 Commits

Author SHA1 Message Date
Max Medvedev
7750d38f8d nullability for InspectionProfileWrapper
GitOrigin-RevId: 36861372fd4c124fd245fdf3602476a30e4326da
2024-08-09 20:25:06 +00:00
Max Medvedev
4d6e4a513b mention injection pass in doc
GitOrigin-RevId: c0616c8c1e4e591f4d417f675ca8c694546f5bb5
2024-08-09 20:25:06 +00:00
Max Medvedev
84186d3117 delete outdated Pass.WHOLE_FILE_LOCAL_INSPECTIONS
GitOrigin-RevId: 6a09bff0c8464359da1ea891cfec76ad4a04216b
2024-08-09 20:25:06 +00:00
Max Medvedev
d688db983b add hints to Pass ids
GitOrigin-RevId: 2a225eb085bd8db84ab9930bc0b4154d37c59b6f
2024-08-09 20:25:06 +00:00
Max Medvedev
8e5516d5de cleanup nanoxml
GitOrigin-RevId: 58f3de6ecb1b6049ce22d8658f0ca6a6b3a99b0a
2024-08-09 20:25:05 +00:00
roman.ivanitskii
e5407c859d [ide-testing] Rename 'script-errors' to 'errors'
Changed directory name from 'script-errors' to 'errors' across multiple modules. This standardizes error directories' names and improves consistency.

GitOrigin-RevId: 222674fac4f850066abf0ab4d3fcddccd0e20ed6
2024-08-09 20:17:34 +00:00
Alexey Kudravtsev
f4d0aaa353 more canceling my own progress to avoid "daemon started and died without daemon canceled events" situation
GitOrigin-RevId: 6633df08e0b37fd71b44abb87c62f63b79dd2694
2024-08-09 20:17:13 +00:00
Ilya Kazakevich
6d1f3800dd PY-74425: Detect system pythons + pythons on .virtualenvs with NPW
`PythonSdkFlavor` detects pythons.

It uses `VirtualEnvReader` under the hood (see virtual env flavor) and system pythons (see other flavors).

We use it in `PythonLocalAddInterpreterModel` and cover it with tests

PY-74425 WIP, PY-74236: `VirtualEnvReader` shouldn't return `null` nor should it check for dir existence, use `getVEnvRootDir` as a default dir for venv.

The whole logic behind `VirtualEnvReader` is the following: we check for some env variable, and if it points to the correct path -- we use it. We fall back to the home directory otherwise.

Directory doesn't need to exist (hence, no need to check `isDirectory`) because a client might always create it.

Even worse: directory would probably not exist on a fresh OS, but a user still wants to create virtual envs there.

PY-74425 WIP: Encapsulate python names and patterns inside `VirtualEnvReader`.

`VirtualEnvReader` seems to be the main entry point to look for virtual envs on the local file system.

Historically, flavors did that, so they had a set of names and patterns to filter python by name, however:

1. `UnixPythonSdkFlavor` had named for **nix only, and `VirtualEnvSdkFlavor` had names both for Windows and **nix. It is unlikely to see a `.exe ` file on **nix or file, without an extension on Windows, so this check is useless and broken (`VirtualEnvSdkFlavor` checks for both names on both OSes)

2. `UnixPythonSdkFlavor` had regex to filter Python2, but this python was removed 4 years ago and could hardly be met on any new OS; hence this check is useless.

3. New Project Wizard needs to find pythons, but knows nothing about names and patterns.


Merge-request: IJ-MR-142040
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>

GitOrigin-RevId: ce649b4f12f7c7b60a25d8e1fb1222e075337844
2024-08-09 19:46:31 +00:00
Alexey Belkov
0aba5a4e72 [kotlin] J2K: unignore K2 tests with K2-specific testdata
KTIJ-30693
KTIJ-30760

GitOrigin-RevId: 80dacdc6dcd7667d5b19771eb3ff192c577bd7d9
2024-08-09 19:19:40 +00:00
Alexey Belkov
3f9fd4a187 [kotlin] J2K: unignore identical K2 tests
KTIJ-30693
KTIJ-30760

GitOrigin-RevId: d736f543140b3aac080e15db6131178697c80b8d
2024-08-09 19:19:40 +00:00
Alexey Belkov
555118fe99 [kotlin] J2K: Support K2 MergePropertyWithConstructorParameterProcessing
KTIJ-30760

GitOrigin-RevId: 451e22b57140ad9d56b84a3a3b56510d6e9188d0
2024-08-09 19:19:40 +00:00
Alexey Belkov
bfe72d1ba0 [kotlin] J2K: move MergePropertyWithConstructorParameterProcessing to common module
KTIJ-30760

GitOrigin-RevId: 1536a8b117fbfcdebce2b1b294dfc41c76d08c79
2024-08-09 19:19:40 +00:00
Alexey Belkov
d746994dcd [kotlin] J2K: move function to common module
KTIJ-30760

GitOrigin-RevId: 7f0c4b537b0f9f057c93bbecaa706b8d7ca19948
2024-08-09 19:19:40 +00:00
Alexey Belkov
eabbd496e2 [kotlin] J2K: Migrate MergePropertyWithConstructorParameterProcessing to AAPI
KTIJ-30760

GitOrigin-RevId: ff18e0f9ecf09fc570f8a208043b03010c2212c6
2024-08-09 19:19:40 +00:00
Alexey Belkov
de80468e0a [kotlin] J2K: Migrate K2ConvertGettersAndSettersToPropertyProcessing to AAPI
KTIJ-30693

GitOrigin-RevId: 0f1292061d2ba69c7781cdca45901a9ff36173a8
2024-08-09 19:19:40 +00:00
Alexey Belkov
73e6a9b95d [kotlin] J2K: Rename file
KTIJ-30693

GitOrigin-RevId: 217f25805840d342f835b743a9fa4904054f128e
2024-08-09 19:19:40 +00:00
Alexey Belkov
01268d55e7 [kotlin] J2K: Recreate K1 ConvertGettersAndSettersToPropertyProcessing
KTIJ-30693

GitOrigin-RevId: ba43a38ee01fdbc894b0c19ce00dc4ae368a76d0
2024-08-09 19:19:40 +00:00
Alexey Belkov
ed954c5ca9 [kotlin] J2K: Move ConvertGettersAndSettersToPropertyProcessing to K2
This is an intermediate commit to preserve git file history.
The code doesn't compile yet.

KTIJ-30693

GitOrigin-RevId: 6a56798bc1b0396b519f15005f59e5cfee08c68b
2024-08-09 19:19:40 +00:00
Alexey Kudravtsev
6a74b2ff01 highlighting cleanup: rename for clarity
GitOrigin-RevId: 548003cab49fd81077cd43b767a74688cb260383
2024-08-09 19:14:35 +00:00
Peter Gromov
6d9f37b644 [grazie] IJPL-89683 Don't check files with too much text
GitOrigin-RevId: 8a69c41dacaeb70e334bd8868d704847d1db7c5e
2024-08-09 19:13:56 +00:00
Ilya Kirillov
e6dee04311 [kotlin] fix exception VfsRootAccess$VfsRootAccessNotAllowedError: File accessed outside allowed roots in GotoWithMultipleLibrariesTest
Reproduced locally, the fix is to compile the jar into a known allowed tmp test dir.

GitOrigin-RevId: 3a218a8f1437d55a266bf959e362331fc3a74837
2024-08-09 19:06:53 +00:00
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
Ilya Kirillov
893f5823dd [kotlin] add new tests for go to symbol
KTIJ-30913

GitOrigin-RevId: bec344b54790bb60b5f34afc237e5ff6a49e5c1f
2024-08-09 19:06:53 +00:00
Ilya Kirillov
4a326b22bf [kotlin] Check more information in GotoTest
Additionally, move the expected output to a separate file

KTIJ-30913

GitOrigin-RevId: 0c3aeca921f42b2245ced74aefbc20fdbc016899
2024-08-09 19:06:53 +00:00
Konstantin Aleev
69b6a980fa [yaml] key completion insert handler: fix removing lookup if the rest is compound value
GitOrigin-RevId: dc7fdf233b0e13ce3d3b7035e0231f07ab3b9296
2024-08-09 18:43:50 +00:00
Peter Gromov
9462202200 speed up indexing: don't intern AST leaf texts when parsing
GitOrigin-RevId: eecd30340170fea26620fc244a2114e3c7881983
2024-08-09 18:32:16 +00:00
Peter Gromov
61a2df00b5 IJPL-156597 Grammar rules should not be triggered on HTML classes
GitOrigin-RevId: 53010d82b8945d0c90a360b201664beabdd8417e
2024-08-09 18:32:16 +00:00
Peter Gromov
a3a6657b74 [grazie] IJPL-149625 Inconsistency between inspection details and settings
GitOrigin-RevId: 9996d1236d0595fe299c27703444624e0a868813
2024-08-09 18:32:16 +00:00
Ruslan Cheremin
8889c00ee9 [indexes] IJP-1365: specialized serializer for IdIndex inputMap
+ 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
2024-08-09 18:26:38 +00:00
Ruslan Cheremin
edb733a038 [indexes] refactor IdDataConsumer
+ extract explicit int->int map wrapper (IdEntryToScopeMapImpl), extract an IdEntryToScopeMap interface for it

GitOrigin-RevId: cd2cc114425121a945bdf82e3e0ff7a5769a52b4
2024-08-09 18:26:38 +00:00
Ruslan Cheremin
1388045ac4 [monitoring] allow customizing OTel metrics reporting periodicity
+ `-Didea.diagnostic.opentelemetry.metrics-reporting-period-ms=...`, with default=1 min (as before)

GitOrigin-RevId: 7220d207c555e458987d9e1d6e390f32bdca0fb4
2024-08-09 18:26:38 +00:00
Alexey Kudravtsev
9441e756d3 encapsulate TextEditorBackgroundHighlighter.getPasses, since it's dangerous and very implicit-contract-demanding
GitOrigin-RevId: cefb97e5a7798ad50e7bcc33da048f5e0e580ba3
2024-08-09 18:20:30 +00:00
Gregory.Shrago
3433a23e80 fix DataProvider cast in HighlightingOutputConsole
GitOrigin-RevId: 81ebd7113cdc071f8deb35e240f1609fca69702b
2024-08-09 18:18:23 +00:00
Gregory.Shrago
b54dcb3a6c fix DataProvider cast in lessons
GitOrigin-RevId: 7518e8c1d95c1bc1c269e152b1832e29f09180ee
2024-08-09 18:18:23 +00:00
Gregory.Shrago
9f9e26f421 fix DataProvider cast in LogConsoleBase
GitOrigin-RevId: 973bbcead9d5154fd6d40bcea56e2b339f7292b7
2024-08-09 18:18:23 +00:00
Gregory.Shrago
e3ea3aeb62 simplify SimpleDataContext initialization
GitOrigin-RevId: b6edcfb213008b427423e5315e619328a7d4660f
2024-08-09 18:18:23 +00:00
Frederik Haselmeier
5a08bed5cb [Kotlin] Explicitly enable K1/K2 compilers in KotlinCompilerReferenceTest and adapted tests
KTIJ-30927

GitOrigin-RevId: 09b56f04a5f87507881b551dd7ad5c4931addd04
2024-08-09 17:56:02 +00:00
Elena Shaverdova
36b77d69ab Five minutes for highlighting is long enough, and timeout is a great way to catch eternal highlighting
GitOrigin-RevId: 529765e27c6204ce5eb0770f1cc5363137fa9d84
2024-08-09 17:45:58 +00:00
Peter Gromov
ee614d7329 speed up PsiBuilderImpl during indexing: fewer checkCanceled calls, compare the text length only in debug mode
GitOrigin-RevId: d9c01cb740482b934c797672a81732ee19a51d93
2024-08-09 17:36:57 +00:00
Pavel Porvatov
881b0cee42 IJPL-156507 Make window controls side configurable in IDE
GitOrigin-RevId: 5a4a64ec42448c3caef516cfd2489ed002cda09a
2024-08-09 17:36:42 +00:00
Peter Gromov
6251753100 micro-optimize TrigramBuilder
cache isJavaIdentifier for ASCII characters
split array and CharSequence paths
specify some empirical initial capacity for the set
shorten the algorithm

GitOrigin-RevId: 43886096332ee00be145401a1d285dd41c66e852
2024-08-09 17:31:19 +00:00
Denis Zaichenko
2ffcbf1c24 IJPL-159911 Fixed the "OK" button in the "create patch" dialog. Added ability to overwrite the existing patch file.
GitOrigin-RevId: 8c630bf2cd7d326ca01feafdd5d5ef4a1922d503
2024-08-09 17:30:25 +00:00
Vladimir Kharitonov
533478aa7b IJPL-159336 JCEF: check sandbox enabled before checking apparmor restrictions
GitOrigin-RevId: 1d37f9f97a399a37308a33cb22bc626422579981
2024-08-09 17:27:34 +00:00
Vladimir Kharitonov
fe001b2b31 JBR-7429 JCEF: refactor: remove JBCefOsrHandlerBase
GitOrigin-RevId: a16a6ea8ed6f79a29ea0969eb48f6a8cd8e42d85
2024-08-09 17:27:34 +00:00
Vladimir Kharitonov
0994cb6ad2 JBR-7429 JCEF: refactor: remove unused code
GitOrigin-RevId: e9726b95e7e21b22fc647f9af6f73cb207f58706
2024-08-09 17:27:34 +00:00
Alexander.Glukhov
35ef00051e [IJPL-1050] added prefix for the repackaged jackson-core version property
GitOrigin-RevId: 54d5ad02333e6344136acad4b408214471ce3de3
2024-08-09 17:19:17 +00:00
Yuriy Artamonov
910e5e074f [icons] IJPL-159204 Default plugin icon is grey thus looks "disabled"
GitOrigin-RevId: 169288b4a50024af76f60f54ac507c492732e457
2024-08-09 17:18:08 +00:00
Roman Golyshev
7dcda70d69 KTIJ-27447 [kotlin] Do not optimize import in files which are not under content roots in K2 Mode
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
2024-08-09 16:28:48 +00:00
Roman Shevchenko
026c9d84bf [devkit] checking SDK type in JUnitDevKitPatcher (EA-1014019)
GitOrigin-RevId: fe2e557e631773e07465fab4354f37b96ebb2304
2024-08-09 16:25:10 +00:00
Roman Shevchenko
5876a29bc9 [devkit] replacing multiple 'OpenedPackages.txt' error with a notification (EA-853559)
GitOrigin-RevId: b2754985a8200226026e0b4edbf2931466bbe186
2024-08-09 16:25:10 +00:00