boolean (@NotNull FileContent content) { CharSequence text = content.getContentAsText(); int idx = 0; while (true) { // find open tag idx = CharArrayUtil.indexOf(text, "<", idx); if (idx == -1) return false; // ignore processing & comment tags if (CharArrayUtil.regionMatches(text, idx, "<!--") || CharArrayUtil.regionMatches(text, idx, "<?")) { idx++; continue; } return CharArrayUtil.regionMatches(text, idx, "<idea-plugin"); //NON-NLS } }