private static @Nullable XmlTag getTag(@NotNull PsiFile file, int offset) {
    if (!HtmlUtil.hasHtml(file)) {
      return null;
    }

    return PsiTreeUtil.getNonStrictParentOfType(file.getViewProvider().findElementAt(offset, HTMLLanguage.INSTANCE), XmlTag.class);
  }
private static @Nullable XmlTag getTag(@NotNull PsiFile file, int offset)