@Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (!(o instanceof EditorSelectionLocalSearchScope other)) return false;

    VirtualFile[] files = getVirtualFiles();
    VirtualFile[] otherFiles = other.getVirtualFiles();
    if (!Comparing.equal(files.length, otherFiles.length)) return false;
    if (files.length > 0) {
      if (!Comparing.equal(files[0], otherFiles[0])) return false;
    }

    TextRange[] ranges = getRanges();
    TextRange[] otherRanges = other.getRanges();
    if (ranges.length != otherRanges.length) return false;

    for (int i = 0; i < ranges.length; ++i) {
      if (!Comparing.equal(ranges[i], otherRanges[i])) return false;
    }

    return true;
  }
@Override
  public boolean equals(Object o)