void (@NotNull PsiElement element, @NotNull ActionContext context, @NotNull ModPsiUpdater updater) { if (!context.selection().isEmpty()) { final List<PsiMethodCallExpression> methodCalls = PsiSelectionSearcher.searchElementsInSelection(element.getContainingFile(), context.selection(), PsiMethodCallExpression.class, false); if (!methodCalls.isEmpty()) { for (PsiMethodCallExpression call : methodCalls) { PsiMethodCallExpression flipped = flipCall(call); if (flipped != null) { updater.highlight(flipped); updater.moveTo(flipped); } } return; } } if (element instanceof PsiMethodCallExpression call) { flipCall(call); } }