private static boolean looksLikeIdeaPluginXml(@NotNull FileContent content) {
    CharSequence text = content.getContentAsText();
    int idx = 0;

    while (true) {
      if (idx == -1) return false;

      // find open tag
      idx = CharArrayUtil.indexOf(text, "<", idx);
      if (idx == -1) return false;

      // ignore processing & comment tags
      if (CharArrayUtil.regionMatches(text, idx, "<!--")) {
        idx = CharArrayUtil.indexOf(text, "-->", idx);
        continue;
      }

      if (CharArrayUtil.regionMatches(text, idx, "<?")) {
        idx = CharArrayUtil.indexOf(text, "?>", idx);
        continue;
      }

      return CharArrayUtil.regionMatches(text, idx, "<idea-plugin"); //NON-NLS
    }
  }
private static boolean looksLikeIdeaPluginXml(@NotNull FileContent content)