Repository navigation
Conversation
- JarUriConverter: new URL(uri) becomes new URI(uri).toURL(). A URI that URI rejects and new URL accepted, such as one with spaces, is percent-encoded first, and VfsUtil.findFileByURL decodes it again, so it finds the same file. - LanguageServersRegistry and ServerInstallerManager: the deprecated ExtensionPoint.addExtensionPointListener(listener, false, this) becomes ExtensionPointName.addExtensionPointListener(scope, listener), with a scope that dispose() cancels, so that the listeners still end with the service. - AbstractDelegateInspectionWithExclusions: createOptionsPanel(), with InspectionOptionsPanel, becomes getOptionsPane(), with an OptPane.stringList bound to excludeList, whose name, type and saved XML stay the same.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2088 +/- ##
==========================================
+ Coverage 50.24% 50.43% +0.18%
==========================================
Files 816 816
Lines 33699 33816 +117
Branches 5261 6974 +1713
==========================================
+ Hits 16931 17054 +123
+ Misses 14127 14114 -13
- Partials 2641 2648 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
Action not completed
|
|
@coderabbitai review |
Action not completed
|
|
@coderabbitai review |
Action performed
|
…P4IJ The plugin verifier reported `ExtensionPointName.addExtensionPointListener(CoroutineScope, ExtensionPointListener)` as an internal API usage on 2024.3 to 2026.2, from `LanguageServersRegistry.registerEpListener` and the constructor of `ServerInstallerManager` (35eb012, #2088). No overload is public and not deprecated on all the supported versions, 2024.2 to 2026.3: | Overload | Internal | Deprecated | Missing | |---|---|---|---| | `ExtensionPointName.addExtensionPointListener(CoroutineScope, listener)`, of #2088 | 2024.3 to 2026.2 | | | | `ExtensionPointName.addExtensionPointListener(listener, Disposable)` | | 2025.3 to 2026.3 | | | `ExtensionPoint.addExtensionPointListener(listener, boolean, Disposable)`, of before #2088 | | 2025.2 to 2026.3 | | | `ExtensionPoint.addExtensionPointListener(CoroutineScope, boolean, listener)` | | | 2024.2 to 2025.1 | So both use `ExtensionPointName.addExtensionPointListener(listener, Disposable)`, which is never internal, and deprecated on the fewest versions. A deprecation is a warning, and an internal usage blocks the Marketplace. #2088 said that it's deprecated only in 2026.3; it is from 2025.3. The behaviour is the one of #2088: - The parent of the listeners is a Disposable of the service, which `dispose()` disposes, as it cancelled their scope before: they end when the service is disposed. - The overload calls the listener only for the extensions added later, not those already loaded (`invokeForLoadedExtensions` is false on every version). `ExtensionPointListenerLifetimeTest` checks both services. Without the disposal in `dispose()`, both of its tests fail. Part of #2274
Part of #1971.
new URL(String)inJarUriConverterbecomesnew URI(uri).toURL().URIrejects characters thatnew URLaccepted, such as spaces, so a URI thatURIrejects is percent-encoded first: the characters that no part of a URI allows, a%that starts no escape, a#after the first, and[and]in ajrt:URI.new URLdid, it drops whitespace at the ends and, on Windows, reads the backslashes of ajar:URI as slashes.VfsUtil.findFileByURLdecodes the escapes again, so the URI finds the same file. A URI thatURIaccepts is used as it is.URI.toURL()itself or from odd input: ajrt:URI with several?is cut at the last one instead of the first, and whitespace just before?or#is encoded.ExtensionPoint.addExtensionPointListener(listener, false, this)inLanguageServersRegistryandServerInstallerManagerbecomesExtensionPointName.addExtensionPointListener(scope, listener).dispose()cancels it, so the listeners still end when the service is disposed.CoroutineScopethat a service can get in its constructor: it would end earlier. When LSP4IJ is unloaded, the platform cancels its plugin scope before it removes the extensions of the plugins unloaded with it, so the registry wouldn't hear that their servers go.ExtensionPointName.addExtensionPointListener(listener, Disposable), which is deprecated in 2026.3.InspectionOptionsPanel()inAbstractDelegateInspectionWithExclusions:createOptionsPanel()becomesgetOptionsPane(), withOptPane.stringList("excludeList", label).excludeListin place with the sameListEditFormas before.excludeListkeeps its name and type, and is saved as before, as saving doesn't use the options pane.excludeList, and read and add to it. Neither overrides or callscreateOptionsPanel(), which the subclasses now inherit fromInspectionProfileEntry, as other inspections with an options pane do.Test
JarUriConverterTest(new): it finds a jar entry under a folder with a space,{,},^,`,%,[and]in its name, from an unencoded and from an encoded URI, asnew URLdid. For 13 URIs, it checks that the VFS URL is the onenew URLgave.AbstractDelegateInspectionWithExclusionsTest(new): the exclusions are written and read as the XML of before (these expectations also pass on the code before this change), the options pane bindsexcludeList, and its panel renders.ExtensionPointListenerLifetimeTest(new): the registry and the installer manager hear of extensions that are added and removed until they are disposed, and no longer after. Without the cancel indispose(), both fail.