Example usage for com.intellij.openapi.editor.actionSystem TypedAction setupRawHandler

List of usage examples for com.intellij.openapi.editor.actionSystem TypedAction setupRawHandler

Introduction

In this page you can find the example usage for com.intellij.openapi.editor.actionSystem TypedAction setupRawHandler.

Prototype

public TypedActionHandler setupRawHandler(@NotNull TypedActionHandler handler) 

Source Link

Document

Replaces current 'raw' typing handler with the specified handler.

Usage

From source file:com.bmesta.powermode.PowerMode.java

License:Apache License

@Override
public void initComponent() {

    final EditorActionManager editorActionManager = EditorActionManager.getInstance();
    final EditorFactory editorFactory = EditorFactory.getInstance();
    particleContainerManager = new ParticleContainerManager();
    editorFactory.addEditorFactoryListener(particleContainerManager, new Disposable() {
        @Override//from ww  w  . ja  v a 2s. c o  m
        public void dispose() {

        }
    });
    final TypedAction typedAction = editorActionManager.getTypedAction();
    final TypedActionHandler rawHandler = typedAction.getRawHandler();
    typedAction.setupRawHandler(new TypedActionHandler() {
        @Override
        public void execute(@NotNull final Editor editor, final char c,
                @NotNull final DataContext dataContext) {
            updateEditor(editor);
            rawHandler.execute(editor, c, dataContext);
        }
    });
}

From source file:com.maddyhome.idea.vim.EventFacade.java

License:Open Source License

public void setupTypedActionHandler(@NotNull TypedActionHandler handler) {
    final TypedAction typedAction = getTypedAction();
    myOriginalTypedActionHandler = typedAction.getRawHandler();
    typedAction.setupRawHandler(handler);
}