boolean (@NotNull Editor editor, DataContext dataContext, boolean next) { if (editor.getCaretModel().getCaretCount() > 1) return false; KeymapManager keymapManager = KeymapManager.getInstance(); if (keymapManager != null && ClientId.isCurrentlyUnderLocalId()) { Shortcut @NotNull [] shortcuts = keymapManager.getActiveKeymap().getShortcuts(next ? "NextTemplateParameter" : "PrevTemplateParameter"); if (shortcuts.length > 0) { return false; } } Project project = dataContext.getData(CommonDataKeys.PROJECT); PsiFile psiFile = dataContext.getData(CommonDataKeys.PSI_FILE); if (project == null || psiFile == null) return false; TemplateParameterTraversalPolicy policy = findSuitableTraversalPolicy(editor, psiFile); if (policy != null) { policy.invoke(editor, psiFile, next); return true; } else { return false; } }