Commit Graph

872 Commits

Author SHA1 Message Date
Vera Petrenkova
6ad30c1cc0 [find in files] IJPL-202349 Replace try/catch with runAndLogException to improve exception logging and rethrowing
(cherry picked from commit a51c760c1bfae581d96377b1018bad6f82f8a892)


(cherry picked from commit b069cd620809e896d0ef73a94ee64ca8d7ec5645)

IJ-MR-173754

GitOrigin-RevId: 893ad79572ba06144d41e3dfaa3e92dcf7b34d36
2025-08-28 20:04:21 +00:00
Vera Petrenkova
0a399cc92b [find in files] IJPL-198653 don't restart search if only replace-params are changed
model check should be triggered on:
- toggle filters (a preserve case is filter)
- typing (it trigger update on switching state to find/replace)

 No need to update results if switched
 - replace state
 - preserve case
 - string to replace changed

(cherry picked from commit 3ed8b144579e63728fd5e06372bf35c6eb5aea37)


(cherry picked from commit b2431ed9e5f1ea6fc22d40017156a4d7447cc681)

IJ-MR-173754

GitOrigin-RevId: 1a6bd8381cb6f4419b65340faebf4fd40b7f081a
2025-08-28 20:04:20 +00:00
Vera Petrenkova
4648976c82 [find in files] IJ-CR-168030 IJPL-186012 Introduce FrontendScopeChooserCombo for remote development
- Added APIs and services to allow the backend to expose available search scopes to the frontend (ScopeModelService)
- created ScopesStateService that keeps map scopeId to ScopeDescriptor
- added scopeId to FindModel for getting scope on the backend using ScopesStateService
- refactored FindPopupScopeUIImpl for using FrontendScopeChooserCombo instead of ScopeChooserCombo in case when FindKey is enabled

(cherry picked from commit 4d44d7aaadff23a0a3bb4262ea4d6f5a7dfe1f85)

GitOrigin-RevId: 7a1174256fc723c3373c7924a4d028fd6e3d1285
2025-07-04 16:42:52 +00:00
Vladimir Krivosheev
ef0323d07c IJ-MR-162467 don't export intellij.platform.core
GitOrigin-RevId: 05f350c1c087be1bf9b46d8bdac5345a65f55958
2025-06-13 21:52:48 +00:00
Vera Petrenkova
f27183a157 [find in files] annotate SearchContext enum with @Serializable for serialization support
GitOrigin-RevId: a954d538113ef01c7a695b9f351bd64107aa240e
2025-06-05 11:41:17 +00:00
Mikhail Filippov
40e854e522 IJPL-188826 bump Kotlin language version to 2.2
GitOrigin-RevId: 61c9fecae6a713d7e328e74b83186bc5d2f6bf66
2025-05-26 13:41:54 +00:00
Vladimir Krivosheev
68ccf7381c update kotlinx-serialization from 1.7.3 to 1.8.1
GitOrigin-RevId: 3e3a0743901d5177898b1ccb2ab20874dad75fd2
2025-05-26 08:45:10 +00:00
Mikhail Filippov
02e8f10727 IJPL-188202 update API dumps
GitOrigin-RevId: 787d9e79a9b6b3cad8b2c5645551c92861e399cd
2025-05-21 19:53:51 +00:00
Vladimir Krivosheev
0ebf188620 update bazel files
GitOrigin-RevId: 45494cb4e35b44b6b901a20c0fd89f8edb55cfd3
2025-05-20 08:59:49 +00:00
Vera Petrenkova
fdbdb802d0 IJPL-184285 [find in files] fix search context cycled setting
GitOrigin-RevId: 909b8418b4e17e4530d8fc393bbfea34907a00c8
2025-05-20 07:42:12 +00:00
Vera Petrenkova
7c98d857d0 IJPL-184285 [find in files] update visibility and api-dumps
GitOrigin-RevId: 1d61a92a4c5f58ba3de943b6acf23da0059ca59c
2025-05-20 07:42:12 +00:00
Vera Petrenkova
9405dff19b IJPL-184285 [find in files] update package names and restructure module dependencies for consistency
- add clarification comments
- remove package attribute in find and find.backend modules
- adjust module structure
- Refactor `UsageInfoModel` initialization for better concurrency handling and caching

GitOrigin-RevId: f0327acbabf6a2a3fd039a43e90afb948b98c5eb
2025-05-20 07:42:11 +00:00
Vera Petrenkova
5563ac4198 IJPL-184285 [find in files] Convert FindModel to Kotlin and make it serializable to support remote development
GitOrigin-RevId: b164a9b86bb452b5408fe466f0cdaca23e64c3ee
2025-05-20 07:42:10 +00:00
Vladimir Krivosheev
73ded65cc1 Revert "restore com.intellij.util.Java11Shim$Companion.getINSTANCE() method for kotlin compiler (if util used from modern JPS)"
This reverts commit c639b009eb7e65aed30ee62921be5c7459b1d0e6.

GitOrigin-RevId: fc08a2b69999dc96a0bbf557048ca95f8ff59e95
2025-05-17 18:28:20 +00:00
Vladimir Krivosheev
fbc9805e89 IJ-MR-162467 don't export intellij.platform.jps.model
GitOrigin-RevId: ebaebc90d514e5f3046fe2b973647da4bf156625
2025-05-14 18:10:23 +00:00
Ruslan Cheremin
9d7095b0eb [indexes][cleanup] IJPL-188: field re-ordering and renaming
preparation for bruteforce search impl:
+ docs, field re-ordering and renaming
+ remove my-prefix from field names

GitOrigin-RevId: 6a438afdaef91e652c28c440a45b12018f4d6dd0
2025-05-08 17:01:38 +00:00
Ilya Korennoy
abaeeabcb0 [indexing] IJPL-186704: Respect IdFilter in FileBasedIndex.processAllKeys if it is not project filter
GitOrigin-RevId: ca8903ea9237b531bba91948da0807e867914172
2025-05-05 16:44:56 +00:00
Ruslan Cheremin
ad74c6be73 [indexes] IJPL-181002, IDEA-327594: re-designed input filtering for IdIndex
+ if `IdIndexer` (`IdIndex` sub-indexer) implements `FileTypeIndexingHint` -- it is used by `IdInputFilter` to customize input files filtering
+ this feature is used to re-implement `index.ids.from.java.sources.in.jar` (instead of extension points)
+ test for `JavaIdIndexer` filtering
+ adjust `IdIndex`: processes .class-files only conditionally

+ rename registry keys (unify naming):
+ `ide.index.id.skip.java.sources.in.libs`: enables/disables indexing of java sources in libraries (index .class-files instead)
+ `ide.index.trigram.enable.exclude.extensions`: enable/disable excluding of .java-sources in libraries from trigram index

GitOrigin-RevId: 8b8e40d621e01466854364c282d00a4731d5f4de
2025-05-03 21:06:35 +00:00
Ruslan Cheremin
814fd0db32 [indexes] IJPL-181002, IJPL-188: refactoring & preparation
+ extracting common `IndexFilterExcludingExtension` and `ExtensionCustomizableExcludes` helper to be used by both Id & Trigram indexes (and maybe others)
+ renaming and moving classes for mental clarity

GitOrigin-RevId: e01b712072e0453253495c263573672414619bdc
2025-05-03 21:06:35 +00:00
Bas Leijdekkers
42aec9799d RegExp: ability to set modifiers/flags for Custom Regexp inspection (IJPL-101797)
GitOrigin-RevId: 7b0c503c7e2d95082cbac0a56285b5048f3c180a
2025-04-18 12:02:17 +00:00
Bas Leijdekkers
2b623a442b [search] fix FindModel.hashCode() breaking contract
GitOrigin-RevId: 8dfcd9ae1757509068774f15fc9014a36aa3a0bb
2025-04-18 12:02:17 +00:00
Tagir Valeev
01ebbc638e [indexing-api] SingleTargetRequestResultProcessor: save service in the field
The processor is created per search session in background thread, so it's a relatively short-living thing. It's unlikely that the service should be unloaded during its function. On the other hand, processTextOccurrence might be called too often, which affects the overall search performance.
May help IDEA-368981 Renaming package never finishes, stuck "Looking for Usages"

GitOrigin-RevId: f3f9643fd47a948997dbebde05f10b344e63ba53
2025-04-10 13:14:20 +00:00
Alexey Kudravtsev
4068f1bfeb mark some method return types in openapi as immutable to catch more "modifying immutable collections" errors in usages
GitOrigin-RevId: 7dd546d18a464ff3275b03e72b08159623bd3453
2025-04-09 14:23:32 +00:00
Liudmila Kornilova
c259925bc4 Avoid unnecessary iteration over indexable files, reuse existing filter
GitOrigin-RevId: bf7db1db47cde7ea0eec5d0deb3a357cd6399f56
2025-03-26 17:28:49 +00:00
Max Medvedev
9cba241999 IDEA-365317 decouple java psi and stubs using stub registry api
GitOrigin-RevId: 98da6acabfedf1e2bb0c023fb7c5580404c2b06a
2025-03-19 03:45:34 +00:00
Ilya Korennoy
2cbd26d84b IJPL-158470: Get rid of SDK in SdkIndexableFilesIteratorImpl
GitOrigin-RevId: a55a59267a8ef52cb8327d31c7dbd679fdf4d206
2025-03-07 15:05:01 +00:00
Ilya Kirillov
143dc33239 [fleet analyzer, indexes] implement com.intellij.psi.stubs.CharSequenceHashInlineKeyDescriptor.HashWrapper.equals as it's used in analyzed indexes
Otherwise, an unsupported operation exception will be thrown and the analysis will break

The fix was initially written by Andrey Zaytsev <andrey.zaytsev@jetbrains.com> but then reverted

GitOrigin-RevId: 860bde852187871da5592f2da2cbd36de9d3f97b
2025-02-27 09:19:39 +00:00
Alexey Kudravtsev
e4bea1954d cleanup: get rid of deprecated asIterable()
GitOrigin-RevId: 48b83d8bac251181efccbec31feb3ec04971941f
2025-02-19 20:50:35 +00:00
Vladimir Krivosheev
d36e8abc3e restore com.intellij.util.Java11Shim$Companion.getINSTANCE() method for kotlin compiler (if util used from modern JPS)
GitOrigin-RevId: c639b009eb7e65aed30ee62921be5c7459b1d0e6
2025-02-11 21:18:12 +00:00
Andrey Zaytsev
aac8779a8b [wobbler] make JavaFilePackageIndex a string index, using hash there is incorrect
GitOrigin-RevId: 20dc74950158b5a330209210d1e80de36c617b69
2025-02-01 16:06:30 +00:00
Andrey Zaytsev
f3e3f0c4dd [wobbler] get resolution to jdk working
GitOrigin-RevId: 98f16eb5685309cfe15faf92adf1969b7f5a22a6
2025-02-01 16:06:29 +00:00
Vladimir Krivosheev
f1121010f7 cleanup (final, visibility)
GitOrigin-RevId: 8faa58a751c19a553c1ba09763e56795cb36ed38
2025-01-31 08:55:04 +00:00
Daniil Ovchinnikov
50b9776763 IJPL-175872 clean up TextOccurrence API
GitOrigin-RevId: 8be24eadc6c70bf12887e94f5e78b3bd0b4a4f37
2025-01-30 15:46:21 +00:00
Daniil Ovchinnikov
949aac4204 IJPL-175872 drop declaration site variance in LeafOccurrenceMapper
It forces to use `@JvmWildcard` in use sites where `in`/`out` would have been enough.

GitOrigin-RevId: 0fd6d1657ce5513e6d128916b48c3e30f931f9c9
2025-01-30 15:46:21 +00:00
Daniil Ovchinnikov
72adf46ff5 IJPL-175872 clean up SearchService API
GitOrigin-RevId: 4d43dbe52ca14816a27784e2ee249f6b2af6c3b0
2025-01-29 16:02:02 +00:00
Daniil Ovchinnikov
32ea747ed5 IJPL-175872 convert SearchService to kt for better typing
GitOrigin-RevId: 9b4fb7c800209b8019fcb8b75f3c64f1c838847b
2025-01-29 16:02:02 +00:00
Daniil Ovchinnikov
ff3986844a Rename .java to .kt
IJPL-175872

GitOrigin-RevId: 7399e6d7d0daf18faa985e5798e61e2f667898df
2025-01-29 16:02:02 +00:00
Daniil Ovchinnikov
ddbc110ab7 IJPL-175872 clean up SearchContext API
GitOrigin-RevId: 10c8a867383e9d42435cc1ec8cdf0562e12efce3
2025-01-28 19:35:25 +00:00
Daniil Ovchinnikov
2c2226e4bc IJPL-175872 drop the ability to search for all references or declarations of a symbol
The generic ability does not make sense because each feature (Find usages, Rename, etc.) is expected to implement its
own search. We've already had `ReferencesSearch` and tried to implement different features on top of it, and it turned
out that it's too generic. For instance, one needs to filter out some of its results during the Rename, but include them
in Find Usages. Instead, we require language support to implement different searchers for different features. If the
code is actually share-able, it's up to the language plugin implementation to share it.

GitOrigin-RevId: 65f719838645d780effcbe80a1aafaf93e756ae0
2025-01-28 17:15:19 +00:00
Daniil Ovchinnikov
79deebbbea IJPL-175872 convert LeafOccurrenceMapper and SearchWordQueryBuilder to kt for the proper generics
GitOrigin-RevId: 62e80a3e49fb53f2ea949cbc5d84d30324684ce7
2025-01-27 22:12:00 +00:00
Daniil Ovchinnikov
59f4e20b10 Rename .java to .kt
IJPL-175872

GitOrigin-RevId: a102470787d90593d61ca46b74ad7afe1e6cd4d0
2025-01-27 22:12:00 +00:00
Yuriy Artamonov
a5c53fae29 [api] IJPL-175872 Remove Experimental status from com.intellij.model.search
GitOrigin-RevId: 524e20066de4cee53c54b383f37ad64e3972d2bc
2025-01-27 11:57:32 +00:00
Liudmila Kornilova
a3767a4450 IJPL-172464 Rewrite assert in getCurrentDumbModeAccessType such that it cannot fail because project is already closed
GitOrigin-RevId: 659db2d47e358aff2fd1fad9560e903ef2576901
2025-01-20 13:31:30 +00:00
Lev Leontev
9c14c1963e [indexes] WEB-70582: Fix LibraryEffectiveKindProvider after adding a call to finishVisitors in UnindexedFilesScanner
GitOrigin-RevId: f6861f298a406eeebe9f2ae5f47c67094e575906
2025-01-18 15:49:46 +00:00
Vladimir Krivosheev
0bc1cf1557 update bazel files
GitOrigin-RevId: 7320d3eff3aba093692ce66839c720ece6d7c4db
2024-12-30 11:28:24 +00:00
Vladimir Krivosheev
7b9ec58009 do not export intellij.database.connectivity.tests
GitOrigin-RevId: a1ef44dfa34cde110c9e6cad19d11b5e3019ab72
2024-12-28 21:45:55 +00:00
Max Medvedev
2853f045a8 IJPL-562 add todo
GitOrigin-RevId: 4b7227325ddbb60dce033df8e6e42991959bbf97
2024-12-27 15:46:53 +00:00
Vladimir Krivosheev
06e5dcf7db cleanup
GitOrigin-RevId: 5508035a2332963d2615f5758fdfa056a3ac034f
2024-12-26 14:56:01 +00:00
Max Medvedev
31affbc834 IJPL-562 Initial implementation for decoupling stub registration from IElementType
See Migration-stubs-from-stub-element-types.md for details.
In short, IStubElementType hierarchy is not necessary for implementing stub support anymore.
Use StubRegistryExtension instead.

GitOrigin-RevId: e5be32d46270678b4ddf7904f5bd3bdd7e2b433d
2024-12-25 13:03:36 +00:00
Max Medvedev
4ad3db2616 IJPL-156431 move lexer implementations to core.impl
GitOrigin-RevId: cccb1404ed895914ae2618a76300c9008f32a69c
2024-12-20 19:15:47 +00:00