Hi, I am currently implementing a plugin to add support of Ki Editor ( GitHub - ki-editor/ki-editor ) to Intellij. It is essentially an alternative to Vim plugin. The plugin needs to capture every character typed into the Editor. Documentation describes TypedActionHandler can be used for such cases and it fits my needs, but a way to register it, the com.intellij.editorTypedHandler extension point is marked as deprecated for removal. Javadoc says to use TypedHandlerDelegate which doesn’t fit my needs (because Ki editor has its own handling of multiple carets). Looking at IdeaVim it also uses TypedActionHandler but it is registed in a dynamic way which I do not need. Should I register TypedActionHandler in my custom ProjectActivity or what is the reason for deprecating the extension point?
Please use com.intellij.codeInsight.editorActions.TypedHandlerDelegate
instead if possible. I guess the main reason that the deprecation is that interface is error prone, called on EDT and usually produces freezes because plugins try to do heavy work there
Please avoid the dynamic registration of extensions. This is a rather error prone approach
Thanks for the response. Performance argument doesn’t make sense though, if the TypedHandlerDelegate
did something fundamentally different I would understand but it is just an implementation of TypedActionHandler
with more restricted functionality, same mistake can be made there
Also in TypedHandlerDelegate
it is not possible to prevent characters being entered into the editor which is essential for the functionality of the plugin I am implementing so I can’t use it
I am aware and this is why I am asking this question. The documentation should be changed because it is exactly what is being recommended, which is also why the deprecation of the extension point only (and not the interface) doesn’t make sense as well