boolean (PsiElement element) { if (!(element instanceof PsiComment comment)) { return false; } if (element instanceof PsiDocComment) { return false; } final IElementType type = comment.getTokenType(); if (!JavaTokenType.END_OF_LINE_COMMENT.equals(type)) { return false; } final String text = comment.getText(); final Matcher matcher = NO_INSPECTION_PATTERN.matcher(text); return !matcher.matches() && !text.startsWith("#!"); }