ModCommandAction (PsiVariable candidate, SmartPsiElementPointer<PsiMethodCallExpression> pointer) { return ModCommand.psiUpdateStep( candidate, requireNonNullElse(candidate.getName(), ""), (var, updater) -> { PsiMethodCallExpression call = updater.getWritable(pointer.getElement()); if (call == null) return; replaceWithQualifier(var, call); updater.moveTo(call.getTextOffset() + call.getTextLength()); }, var -> requireNonNullElse(var.getNameIdentifier(), var).getTextRange()) .withPresentation(p -> p.withIcon(candidate.getIcon(0))); }