PsiElement (@Nullable PsiElement element, boolean ignoreComments) { while (element != null && StringUtil.isEmptyOrSpaces(element.getText()) || ignoreComments && element instanceof PsiComment) { element = PsiTreeUtil.prevLeaf(element); } return element; }