PsiElement (ASTNode atCaret, Class<? extends PsiElement>... classes) { while (atCaret != null) { atCaret = TreeUtil.prevLeaf(atCaret); if (atCaret != null && atCaret.getElementType() != TokenType.WHITE_SPACE) { return getNonStrictParentOfType(atCaret.getPsi(), classes); } } return null; }