PsiElement (@NotNull Editor editor, @NotNull PsiFile file, @Nullable PsiElement contextElement, int targetOffset) { ASTNode node = contextElement == null ? null : contextElement.getNode(); if (node == null || (TreeUtil.isWhitespaceOrComment(node) || node.getElementType() == ShTypes.LINEFEED)) { PsiElement at = targetOffset > 0 ? file.findElementAt(targetOffset - 1) : null; if (wordWithDocumentation(at)) return at; } return contextElement; }