ModCommand (ActionContext context) { PsiElement element = context.findLeaf(); if (!(element instanceof PsiIdentifier)) { element = context.findLeafOnTheLeft(); } final PsiReferenceExpression refExpr = PsiTreeUtil.getParentOfType(element, PsiReferenceExpression.class); return doInline(context, (PsiVariable)Objects.requireNonNull(context.element()), refExpr, InlineMode.CHECK_CONFLICTS); }