protected @Nullable XmlElement getSourceElement(@NotNull PsiFile file, int offset, boolean forward) {
    return getMeaningfulElementAtOffset(file, offset, forward, t -> t instanceof XmlTag || t instanceof XmlAttribute);
  }
protected @Nullable XmlElement getSourceElement(@NotNull PsiFile file, int offset, boolean forward)