What is the elegant way to register TypedActionHandler?




I am a newbie and heard that Idea uses some sort of OSGI for plugins but at example I found a hack way with a static section.

There is an AnAction class which contract is not used by me at all. It's used just to reference class from plugin.xml


public class EditorIllustration extends AnAction {
static {

final EditorActionManager actionManager = EditorActionManager.getInstance();
final TypedAction typedAction = actionManager.getTypedAction();
typedAction.setupHandler(new MyTypeHandler());



So is there a way to register MyTypeHandler directly via plugin.xml?


Comment actions Permalink

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

Comment actions Permalink

@Dmitry Batrak 

Can you give me an example



Please sign in to leave a comment.