boolean (PsiFile file, int caretOffset, String suppressedId) { CharSequence fileText = file.getViewProvider().getContents(); int start = Math.max(0, caretOffset - suppressedId.length()); int end = Math.min(caretOffset + suppressedId.length(), fileText.length()); return StringUtil.indexOf(fileText.subSequence(start, end), suppressedId) >= 0; }