public static @Nullable DomElement getDomElement(final @NotNull Editor editor, final @NotNull PsiFile file) {
     return getDomElement(file.findElementAt(editor.getCaretModel().getOffset()));
  }
public static @Nullable DomElement getDomElement(final @NotNull Editor editor, final @NotNull PsiFile file)