private @NotNull PsiVariable addVariable(PsiElement declaration, @NotNull PsiExpression initializer) {
    declaration = addDeclaration(declaration, initializer, myAnchor);
    declaration = JavaCodeStyleManager.getInstance(myProject).shortenClassReferences(declaration);
    return (PsiVariable)(declaration instanceof PsiDeclarationStatement
                         ? ((PsiDeclarationStatement)declaration).getDeclaredElements()[0]
                         : declaration);
  }
private @NotNull PsiVariable addVariable(PsiElement declaration, @NotNull PsiExpression initializer)