Commit Graph

106 Commits

Author SHA1 Message Date
Sergei Tachenov
7f3d737867 IJPL-197188 Fix Switcher hint popup update
PSI_ELEMENT.getData returns an outdated PSI element
if called in-place in the same EDT event the selection changes.
Fix by postponing the update using a state flow.


(cherry picked from commit e8568cdadbb2ee1332a2aedfd60a20c072840537)

IJ-CR-169482

GitOrigin-RevId: 1d4ddecba8c44dee25bcfe31b24518eedde2f7fd
2025-07-31 12:02:23 +00:00
Mikhail Filippov
68e20d9aa8 IJPL-188202 bump Kotlin version to 2.2.0
(cherry picked from commit 4086267a8b175d5cd1fb1c0ee77b4e0ddf999524)

IJ-CR-168727

GitOrigin-RevId: 96790b1a0aa125c07767685caa008369fb7496b6
2025-07-12 00:51:47 +00:00
Sergei Tachenov
73c5e818bc IJPL-187934 Fix the Switcher preferred size
The Switcher preferred size used to be computed
in the monolith using the number of files,
through the visibleRowCount property.
It was lost at some point when splitting the feature.
Bring it back.

There were some other UI code next to this line
that was also lost, that part is to be investigated
and discussed. But this line alone fixes the regression.


(cherry picked from commit 61eaa52e0742f6c450d35a2fdfe65cfa69b2894c)

IJ-CR-167210

GitOrigin-RevId: 8a16f3718a217db8583e22d9ae3cff29e715ac9f
2025-06-28 00:47:50 +00:00
Nikita Katkov
4bb9b3448c [recent files] IJPL-188466 Do not unconditionally add any renamed file to the model
Since the rename events occur really frequently and often without explicit user action (e.g. regenerated resource files - hello bazel!), they should not be added to the model after the rename itself.


(cherry picked from commit ded078a8592f34712f84678bdc801cd1a2c88853)

IJ-CR-166394

GitOrigin-RevId: 6c1416fe6675c45e8c159d3ab69f436b2d2c4d5e
2025-06-27 20:23:47 +00:00
Vladimir Krivosheev
b935234c91 IJ-MR-162467 don't export intellij.platform.projectModel
GitOrigin-RevId: 11c0bf5ca0f3a6d892658a2b149d85cace9aa2b8
2025-06-14 13:00:48 +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
Nikita Katkov
b8d10a223a [recent files] Add even more trace logs just in case
GitOrigin-RevId: fad232b31f01dac39b7dc79a19dc21fbce85c4c6
2025-06-13 18:30:06 +00:00
Nikita Katkov
ecd2177b45 [recent files] IJPL-188466 Apply changes with valid virtual files only
Since virtual files can be invalidated after it is added to the model (e.g. add file -> invoke recent files -> remove file and immediately invoke recent files before buld VFS listener gets notified about the change), outdated files might be visible in the list. Same applies to external changes reflected in the VFS snapshot after a while.

Additional explicit validity check is needed when the model gets updated.

GitOrigin-RevId: fb391dcb364cc7c8acdbfc52365a0370bdd70c17
2025-06-13 18:30:06 +00:00
Mikhail Filippov
0f89491c75 update Kotlin compiler to 2.2.0-RC2
GitOrigin-RevId: a0f1737d76f4501fc4f7b4435c625a55cf1f199b
2025-06-08 11:02:07 +00:00
Konstantin Nisht
e056321fd1 [threading] IJPL-190260: Remove blockingContext #10
GitOrigin-RevId: 397154159e65a65b6a55fbdeabf30176eb58ca40
2025-06-05 10:59:31 +00:00
Vladimir Krivosheev
65fe061584 IJ-MR-162467 don't export intellij.platform.analysis
GitOrigin-RevId: fcbcb68010b58cb507fee2c47473758b999e471b
2025-06-04 11:16:33 +00:00
Vladimir Krivosheev
ab69d8455c IJ-MR-162467 don't export intellij.platform.indexing
GitOrigin-RevId: 5065d7f10610d024e4a89a379be3de68caf55dc3
2025-05-29 17:55:17 +00:00
Nikita Katkov
b6a4995214 [recent files] IJPL-189526 Do not forget to resort files when selected editor gets changed.
Also, support force pushing frontend-initiated updates to the backend model. This is needed to avoid relying on the backend editor to be opened - if at some point there will be no backend editor, the logic will still work as expected

GitOrigin-RevId: 03b76f8a0fffebcc1755aad2d9cba359efd55902
2025-05-27 16:35:13 +00:00
Nikita Katkov
ad065be46a [recent files] IJPL-188466 Do not add files to the model on selection change event
Assuming that selection changed might happen only for already existing editors, we want to make sure that if an event contains file that has not been opened, it does not get added to the model. The assumtion is based on a report from the issue that unrelated files appear in the switcher. From the logs it seems that files initially appear on the frontend side among the `frontendRecentFiles` list. The list in its turn gets assembled either from frontend editor selection history, or from a few events. Events like editor is opened/closed are not suspicious, but the selection update is. Thus, we are going to avoid adding files from the event to the model, only update those already present in it

GitOrigin-RevId: 567fa110273a17ec947696e6bb26897dc36ce9b6
2025-05-26 22:34:51 +00:00
Nikita Katkov
c8e82f4714 [recent files] IJPL-188466 Extracted FileChangeKind enum to shared module
GitOrigin-RevId: 6e9844f1f972628fabf7ea53dae45ee3c3110192
2025-05-26 22:34:51 +00:00
Nikita Katkov
4fdf02cf46 [recent files] IJPL-188466 Add more logging
GitOrigin-RevId: bd6d333bbbfd6a77323e71e523c7f9c38dfc676d
2025-05-26 22:34:51 +00:00
Nikita Katkov
b8c87cddf8 [recent files] IJPL-188466 Simplify updating entire model state
Currently there is a mirroring state of recent files model on FE and BE, so when a change with uncertain scope happens, it is enough to tell backend to update presentations for its known state instead of asking frontend for this state  as it was implemented before

GitOrigin-RevId: 4d22c3f23848225249da959ccda0d383ab8e7376
2025-05-26 22:34:51 +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
Nikita Katkov
90aa6ee6b3 [recent files] IJPL-188667 Disallow invalid files navigation, if the file got invalidated between its collection and editor opening
GitOrigin-RevId: 22f9a20a55ce809d95a16676ad5f442d2ef6a60d
2025-05-22 16:22:56 +00:00
Mikhail Filippov
a9ae07e88f IJPL-188202 update Kotlin compiler to 2.2.0-RC
GitOrigin-RevId: 68709d60e9ee0b5b790a2a1cf5349618fc23d6f1
2025-05-21 19:53:51 +00:00
Nikita Katkov
be4654f7cb [recent files] Mark split switcher actions as frontend only to avoid extra round trips before executing an action from the frontend module
GitOrigin-RevId: 95f441666d8e33f65b1ddac5e4512207e188b416
2025-05-20 12:32:49 +00:00
Sergei Sysoev
2cebe9b858 [fleet] bump rhizome compiler plugin version
GitOrigin-RevId: bd9647742c462e1889f42435b6e9e7950e739762
2025-05-16 05:43:14 +00:00
Nikita Katkov
dd4f73f4c9 [recent files] Do not add moved files into recent files model, just update ones that already exist in it
GitOrigin-RevId: 2f5605ac21c964008f1c3fc5340c1f2b13bd90a6
2025-05-14 16:29:38 +00:00
Vladimir Krivosheev
e6503904f1 update bazel files
GitOrigin-RevId: 56d6864910cad2dfe611d38d680ee290d4209f79
2025-05-13 18:02:20 +00:00
Ilia Kirianovskii
a38a19fa65 [bazel] Update build files
GitOrigin-RevId: b3eb595781593209fca189a18c0091f11621bd51
2025-05-13 15:36:09 +00:00
Vladimir Krivosheev
3616fb0a2f simplify bazel labels (another step towards using simple names that reflect directory structure) — handle camelCase case
GitOrigin-RevId: 709eafe49fcb3be48c50440ae19a08e083bc8cb3
2025-05-12 07:18:42 +00:00
Vladimir Krivosheev
7cf9ef2b29 update bazel files
GitOrigin-RevId: e78f86bd17affd7892fd1af8e157f033906b1865
2025-05-09 15:36:06 +00:00
Vladimir Krivosheev
644a6b2e81 IJ-MR-162467 don't export intellij.platform.editor.ui
GitOrigin-RevId: 8894abe16fb347de7649bfb2d7888b6e6fe0232c
2025-05-09 14:20:40 +00:00
Vladimir Krivosheev
6f8ff07ccc simplify bazel labels (another step towards using simple names that reflect directory structure)
GitOrigin-RevId: 12bfb2d0fa315d87c7a4ade363d0f834cf324b71
2025-05-08 16:58:30 +00:00
Alexander Zolotov
d230eaee2f [fleet] upgrade rhizome plugin
GitOrigin-RevId: 4b1f5e0641a496160fdff9f9ba2f76e50d3da24a
2025-05-08 13:09:05 +00:00
Nikita Katkov
d319a8b511 [recent files] IJPL-186498 Do not add any new file to the recent files model. Prefer listening only to editor typing, not VFS
Recently changed files model was previously subsribed to VFS changes and did consume any file added to the VFS snapshot. This is incorrect behaviour, since in our understanding the recently changed files list must only contain files edited manually. Example: if a code generation tool produces N files in the project, they should not appear in the model. But if a user types in one of them, this exact file should.

The implementation now relies on frontend typing listener with a reasonable debounce (1 sec) that must cover only expected cases

GitOrigin-RevId: b9348336aead5171682cdb70fa52cdd08b8f8214
2025-05-06 17:08:48 +00:00
Gregory.Shrago
021581e720 migrate to new ActionUtil methods
GitOrigin-RevId: 5561a61959eeb1510f6b2062f5cf988d8e37ed4a
2025-05-02 23:19:39 +00:00
Nikita Katkov
51c1f63da1 [recent files] Always unconditionally apply changes received from VFS and EditorHistoryManager listeners to the model
This is a fix for problems when a file does not get added to the model because of incorrect assumption that it must already be present there (update -> add)

GitOrigin-RevId: 92a13e2823cf9eae699b97b99217b4a7a0112637
2025-04-30 14:19:21 +00:00
Vladimir Krivosheev
fdcd9f7875 update bazel files
GitOrigin-RevId: 1de80c1056fd4e959014434bd38d2b9a577e4163
2025-04-29 05:10:29 +00:00
Nikita Katkov
1c49a0760e [recent files] Filter backend files before sending through the RPC
GitOrigin-RevId: 5bd78c599fe4a8d670b83e85eb08cbd81a3fd00a
2025-04-28 21:13:31 +00:00
Nikita Katkov
cb13c46cd3 [recent files] Subscribe backend model to backend update events
GitOrigin-RevId: 8965b9de16fa83d044e5d235d59cb288791943d4
2025-04-28 21:13:31 +00:00
Nikita Katkov
1963905fd8 [recent files] Introduce backend model that accumulates changes received from all the registered listeners and combines them into an end-user-visible files list
This is required to be able to filter out irrelevant changes, e.g. when a file not present among recently opened files is modified. Thus the model now consists of the gateway that processes all changes and the state that stores the resulting list. On the frontend side only the resulting state is present as well, and it is accumulated just the same way as on the backend side.

GitOrigin-RevId: 5657dd604b7fec128481c76d452e4c31d3af22c2
2025-04-28 21:13:31 +00:00
Nikita Katkov
380a40db32 [recent files] Rename BackendRecentFilesModel to BackendRecentFileEventsModel to describe precisely what the model is responsible for
GitOrigin-RevId: 9256c583ab59d2e0776e378662a4c4dd2f3712d7
2025-04-28 21:13:31 +00:00
Nikita Katkov
a24cf7fa8b [recent files] Implement backend lightweight state to track files as well as their individual updates
GitOrigin-RevId: cdab76467e06c4727d3bcdecaf6b0cb3a5db80bf
2025-04-28 21:13:31 +00:00
Nikita Katkov
6239c7aa5c [recent files] Move abstract state class to the shared module
GitOrigin-RevId: 2d67f6297fac4a4287b46e3c23b8df3e2641aebb
2025-04-28 21:13:31 +00:00
Nikita Katkov
93877b36aa [recent files] Extract model state to a dedicated class to reuse later in the backend module
GitOrigin-RevId: fde02dd1cc75ff7414b7e5346eff082b54da774d
2025-04-28 21:13:31 +00:00
Nikita Katkov
5dfdcd581f [recent files] IJPL-177560 Show recently opened files if recently opened unpinned files list has the only entry in it
GitOrigin-RevId: aa0e51c3ef0add0116ebaa5166dc437e682e99b2
2025-04-28 17:34:22 +00:00
Alexander Zolotov
6f2820bf80 [fleet] update rpc-compiler-plugin
GitOrigin-RevId: 20da43459f2343bb2ce641506ff5f1d5217bca25
2025-04-20 16:10:38 +00:00
Nikita Katkov
629e51ad34 [recent files] IJPL-183649 Check whether the file that's about to be deleted is valid before actually deleting it :D
GitOrigin-RevId: 9d05df8b22cf18361b4c6c7523712e7fd3fdec2c
2025-04-14 13:56:20 +00:00
Nikita Katkov
9881326ddd [recent files] IJPL-183581 Do not manually remove files from editor history if the corresponding editor is closed
GitOrigin-RevId: 7c1ea19849a07b8c28a637bcde878bb027078cad
2025-04-14 13:56:20 +00:00
Ilia.Shulgin
0b01181ccd [diff] IJPL-182568 Optionally exclude diff files from recent files navigation
GitOrigin-RevId: a3f69876cfa8c4aebdd55ff3265ecce815de451e
2025-04-14 12:05:27 +00:00
Ilia.Shulgin
daa8304b9a [diff] IJPL-182568 Respect "Open diff in window" setting when navigating diff from recent files
GitOrigin-RevId: 7b2f97417456f09dd3f0d0672051f21003dced6c
2025-04-14 12:05:27 +00:00
Mikhail Filippov
06c53733db IJPL-182711 bump Kotlin compiler plugins
GitOrigin-RevId: 772fb3c9563b3bc3af4ef15244fd7cbe32cd0763
2025-04-09 20:31:53 +00:00
Mikhail Filippov
493c93a4bf IJPL-182711 bump Kotlin language version
GitOrigin-RevId: 0beaed34efbd3b42a739dddd78de097b4e1d09c5
2025-04-09 14:26:59 +00:00
Nikita Katkov
cf7040310b [recent files] IJPL-183215 Avoid large debug logs and consider files limit in a batch event
GitOrigin-RevId: 796df39600b956149a0e2ad9bb464dde1f65d2ed
2025-04-08 17:34:21 +00:00