TextRange getFileDirtyScopeForAllPassesCombined(@NotNull Document document) {
    synchronized (myDocumentToStatusMap) {
      FileStatus status = myDocumentToStatusMap.get(document);
      if (status == null) {
        return null;
      }
      int start = Integer.MAX_VALUE;
      int end = Integer.MIN_VALUE;

      for (RangeMarker marker : status.dirtyScopes.values()) {
        if (marker != null && marker != WHOLE_FILE_DIRTY_MARKER && marker.isValid()) {
          start = Math.min(start, marker.getStartOffset());
          end = Math.max(end, marker.getEndOffset());
        }
      }
      return start == Integer.MAX_VALUE ? null : new TextRange(start, end);
    }
  }
TextRange getFileDirtyScopeForAllPassesCombined(@NotNull Document document)