fix(java): show a re-installed SNAPSHOT's classes after reloading the project

A SNAPSHOT installed again replaces its jar in place, so the path, the URIs
of its classes and jdtls' class handles stay the same. The compile model
picked up the new jar on reload, but an open decompiled class kept the old
contents, and reopening it did too: the backend's virtual document cache,
the editor's cache and jdtls' decompiler cache (keyed by class handle) all
still held what was read from the old jar.

The backend now records the archive's modification time with each cached
library class and reads the class again once it changed. After a build tool
sync it asks jdtls to refresh external archives, close the changed archives'
package fragment roots and drop its decompiled sources
(openidea.java.refreshArchives), then replaces the open classes whose jar
changed. The editor drops its cached virtual documents when project roots
change. Covers jar: and jdt: classes, decompiled or read from the archive.
Цей коміт міститься в:
l0ng-ai committed 2026-11-13 20:00:37 +08:00
1 джерело b971c8b391
коміт 6402bd0bc2
11 files changed
+220 -7

No files matched your search

+3
Переглянути файл
@@ -17,6 +17,9 @@
<delegateCommandHandler class="ai.openidea.implementations.ImplementationsCommand">
<command id="openidea.java.implementations"/>
</delegateCommandHandler>
<delegateCommandHandler class="ai.openidea.archives.RefreshArchivesCommand">
<command id="openidea.java.refreshArchives"/>
</delegateCommandHandler>
<delegateCommandHandler class="ai.openidea.hierarchy.HierarchyCommand">
<command id="openidea.java.hierarchy.members"/>
<command id="openidea.java.hierarchy.refactor"/>