API stable since 2017 is marked as experimental.
Answered
In my Missing In Actions plugin, I have an option to disable editor parameter hints in multi-caret mode. The hints are great except when using multi-caret mode because they mess up the text position and make it difficult to work in multi-caret mode.
For this purpose, I disable the hints when multi-caret mode is detected and enable them when it is exited, in the current editor. I also call HighlightHintsFactory.forceHintsUpdateOnNextPass(editor) to have the changes updated.
Plugin verifier complains that this API use is experimental:
Experimental API class com.intellij.codeInsight.hints.ParameterHintsPassFactory is referenced in com.vladsch.MissingInActions.Plugin.updateEditorParameterHints(Editor, boolean) : void. This class can be changed in a future release leading to incompatibilities
Experimental API method com.intellij.codeInsight.hints.ParameterHintsPassFactory.forceHintsUpdateOnNextPass(com.intellij.openapi.editor.Editor editor) : void is invoked in com.vladsch.MissingInActions.Plugin.updateEditorParameterHints(Editor, boolean) : void. This method can be changed in a future release leading to incompatibilities
I checked the source and that part of the API has not changed since 2017. Maybe it is time to call the experiment a success and remove the experimental warning on this API?
Please sign in to leave a comment.
What API version are you building against?
NOT TRUE, SEE BELOW COMMENT At least in master I do not see any hints as to `com.intellij.codeInsight.hints.ParameterHintsPassFactory` being marked as Experimental API.
Hi Yann,
I am building against 2021.2, compatible unbounded. So the PluginVerifier tests it against all latest builds up to 2023.1.
I too, saw no annotations for experimental in the sources, I checked a few versions, but the plugin verifier reports show it for all versions. This is both in my gradle build and once the plugin is uploaded: see: 1.8.231.4Apr 23, 2023
Yann,
In the hints directory there are a few experimental api status annotations, there is even a TODO: comment saying that this needs rewriting for new implementation in the ParameterHintsPass. Including this one, hoping that it will be changed in 2020.2, we are in 2023.2 development, and it has not changed.
I am familiar with best hopes and wishes in code, not panning out, similar to these ones.
I guess I am just going to ignore these verifier warnings, for a while.
Ok I figured I looked in the wrong place. There’s
package-info.java
specifyingApiStatus.Experimental
in lang-api module (community/platform/lang-api/src/com/intellij/codeInsight/hints/package-info.java), so all the warnings are correct indeed. I’ll ping the developer about a possible removal, thanks.Hi! Yes, that's the API, which we want to get rid off in the future, but so far it is present because we don't have better alternative for all cases.
If you need just to disable/enable hints there is API for this: `com.intellij.codeInsight.hints.InlayHintsSwitch`.
Thanks, Roman. Unfortunately for me, the IntlayHintsSwitch is only available since Nov 2022. I try to make my plugins working on versions 2020.3 and up, or 2021.3 in worst case, without resorting to dedicated versions for each release.
For me, a plugin per IDE release would mean I am not using an API, but coding to the implementation. ;)