void (char c) { ApplicationManager.getApplication().invokeAndWait(() -> { EditorActionManager.getInstance(); if (c == '\b') { performEditorAction(IdeActions.ACTION_EDITOR_BACKSPACE); return; } if (c == '\n') { if (performEditorAction(IdeActions.ACTION_CHOOSE_LOOKUP_ITEM)) { return; } if (performEditorAction(IdeActions.ACTION_EDITOR_NEXT_TEMPLATE_VARIABLE)) { return; } performEditorAction(IdeActions.ACTION_EDITOR_ENTER); return; } if (c == '\t') { if (performEditorAction(IdeActions.ACTION_CHOOSE_LOOKUP_ITEM_REPLACE)) { return; } if (performEditorAction(IdeActions.ACTION_EXPAND_LIVE_TEMPLATE_BY_TAB)) { return; } if (performEditorAction(IdeActions.ACTION_EDITOR_NEXT_TEMPLATE_VARIABLE)) { return; } if (performEditorAction(IdeActions.ACTION_EDITOR_TAB)) { return; } } if (c == Lookup.COMPLETE_STATEMENT_SELECT_CHAR) { if (performEditorAction(IdeActions.ACTION_CHOOSE_LOOKUP_ITEM_COMPLETE_STATEMENT)) { return; } } ActionManagerEx.getInstanceEx().fireBeforeEditorTyping(c, getEditorDataContext()); TypedAction.getInstance().actionPerformed(myEditor, c, getEditorDataContext()); ActionManagerEx.getInstanceEx().fireAfterEditorTyping(c, getEditorDataContext()); }); }