PsiElement (PsiFile psiFile, int caretOffset) { PsiElement element = findNextAtOffset(psiFile, caretOffset, PsiWhiteSpace.class); if (element == null) { element = findPrevAtOffset(psiFile, caretOffset - 1, PsiWhiteSpace.class); } return element; }