List of usage examples for com.intellij.openapi.editor.actionSystem TypedAction getRawHandler
@NotNull
public TypedActionHandler getRawHandler()
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 va2 s .com 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); }
From source file:com.maddyhome.idea.vim.VimPlugin.java
License:Open Source License
@Override public void initComponent() { LOG.debug("initComponent"); Notifications.Bus.register(IDEAVIM_STICKY_NOTIFICATION_ID, NotificationDisplayType.STICKY_BALLOON); ApplicationManager.getApplication().invokeLater(new Runnable() { public void run() { updateState();// w ww . j a v a 2 s . co m } }); final TypedAction typedAction = EditorActionManager.getInstance().getTypedAction(); EventFacade.getInstance().setupTypedActionHandler(new VimTypedActionHandler(typedAction.getRawHandler())); // Register vim actions in command mode RegisterActions.registerActions(); // Add some listeners so we can handle special events setupListeners(); // Register ex handlers CommandParser.getInstance().registerHandlers(); if (!ApplicationManager.getApplication().isUnitTestMode()) { final File ideaVimRc = VimScriptParser.findIdeaVimRc(); if (ideaVimRc != null) { VimScriptParser.executeFile(ideaVimRc); } } LOG.debug("done"); }