@Override
  public boolean isValid() {
    RangeMarkerTree.RMNode<?> node = myNode;
    if (node == null || !node.isValid()) return false;
    Object file = myDocumentOrFile;
    return file instanceof Document || canHaveDocument((VirtualFile)file);
  }
@Override
  public boolean isValid()