Registering a Custom TypedActionHandler; EditorActionManager.getTypedAction is deprecated

Answered

I am a beginner, I am currently studying,and I developed according to the provided documentation

https://plugins.jetbrains.com/docs/intellij/editor-events.html#registering-a-custom-typedactionhandler

but now it prompts me ‘EditorActionManager.getTypedAction is deprecated’, what method should I use to replace it?
this is my code

    static{
        EditorActionManager actionManager = EditorActionManager.getInstance();
        TypedAction typedAction = actionManager.getTypedAction();
        typedAction.setupHandler(new MyKeyTypedHandler());
    }

 

 

 

This link mentions, https://intellij-support.jetbrains.com/hc/en-us/community/posts/207724009-What-is-the-elegant-way-to-register-TypedActionHandler?input_string=EditorActionManager.getTypedAction%20is%20deprecated

`You can register you MyTypeHandler in plugin.xml as an extension for extension point 'com.intellij.editorTypedHandler'.`

But I tried and got an error of `org. example. editor.EditorEventTest` is not assigned to ‘com. intellij.codeInsight. editorActions. TypedHandlerDelegate’

0
1 comment

Hi,

Deprecation message points to the API that should be used:

Deprecated
Use TypedAction. getInstance() instead

0

Please sign in to leave a comment.