protected static @Nullable XmlElement getMeaningfulElementAtOffset(@NotNull PsiFile file, int offset, boolean forward,
                                                                     @NotNull Condition<? super PsiElement> condition) {
    PsiElement element = file.findElementAt(offset);
    if (element instanceof PsiWhiteSpace) {
      element = forward ? PsiTreeUtil.nextLeaf(element) : PsiTreeUtil.prevLeaf(element);
    }
    return ObjectUtils.tryCast(PsiTreeUtil.findFirstParent(element, false, condition), XmlElement.class);
  }
protected static @Nullable XmlElement getMeaningfulElementAtOffset(@NotNull PsiFile file, int offset, boolean forward,
                                                                     @NotNull Condition<? super PsiElement> condition)