void (@NotNull Editor editor) { ThreadingAssertions.assertEventDispatchThread(); Shortcut[] shortcuts = KeymapUtil.getActiveKeymapShortcuts(IdeActions.ACTION_GOTO_DECLARATION).getShortcuts(); CustomShortcutSet shortcutSet = new CustomShortcutSet(ArrayUtil.mergeArrays(shortcuts, CommonShortcuts.ENTER.getShortcuts())); new HyperlinkNavigationAction().registerCustomShortcutSet(shortcutSet, editor.getContentComponent()); if (!myIsViewer) { new EnterHandler().registerCustomShortcutSet(CommonShortcuts.ENTER, editor.getContentComponent()); registerActionHandler(editor, IdeActions.ACTION_EDITOR_PASTE, new PasteHandler()); registerActionHandler(editor, IdeActions.ACTION_EDITOR_BACKSPACE, new DeleteBackspaceHandler(-1, IdeActions.ACTION_EDITOR_BACKSPACE)); registerActionHandler(editor, IdeActions.ACTION_EDITOR_DELETE, new DeleteBackspaceHandler(0, IdeActions.ACTION_EDITOR_DELETE)); registerActionHandler(editor, IdeActions.ACTION_EDITOR_TAB, new TabHandler()); registerActionHandler(editor, EOFAction.ACTION_ID); } }