PsiExpression (@NotNull PsiElement element) { while (element != null) { if (element instanceof PsiWhiteSpace) { element = element.getNextSibling(); continue; } if (element instanceof PsiJavaToken) { IElementType tokenType = ((PsiJavaToken)element).getTokenType(); if (!(tokenType.equals(JavaTokenType.COMMA) || tokenType.equals(TokenType.WHITE_SPACE))) { break; } element = element.getNextSibling(); continue; } if (!(element instanceof PsiComment)) break; element = element.getNextSibling(); } return PsiTreeUtil.getParentOfType(element, PsiExpression.class, false); }