void (@NotNull PsiExpression expression) { if (expression instanceof PsiPrefixExpression) { final PsiExpression operand = ((PsiPrefixExpression)expression).getOperand(); if (operand instanceof PsiLiteralExpression) expression = operand; } final String replacementText; if (expression instanceof PsiLiteralExpression) { replacementText = expression.getText() + "L"; } else { replacementText = "(long)" + expression.getText(); } PsiReplacementUtil.replaceExpression(expression, replacementText); }