private @NotNull UnknownSdkTrackerTask newUpdateTask(@NotNull ShowStatusCallback showStatus,
                                                       @NotNull Predicate<? super UnknownSdkSnapshot> shouldProcessSnapshot) {
    return new UnknownSdkTrackerTask() {
      @Override
      public @Nullable UnknownSdkCollector createCollector() {
        if (!isEnabled() || !Registry.is("unknown.sdk.auto")) {
          showStatus.showEmptyStatus();
          return null;
        }
        return new UnknownSdkCollector(myProject);
      }

      @Override
      public void onLookupCompleted(@NotNull UnknownSdkSnapshot snapshot) {
        if (!shouldProcessSnapshot.test(snapshot)) {
          return;
        }

        var action = createProcessSdksAction(snapshot, showStatus);
        if (action == null) {
          return;
        }

        ProgressManager.getInstance()
          .run(new Task.Backgroundable(myProject, ProjectBundle.message("progress.title.resolving.sdks"), false, ALWAYS_BACKGROUND) {
            @Override
            public void run(@NotNull ProgressIndicator indicator) {
              action.run(indicator);
            }
          });
      }
    };
  }
private @NotNull UnknownSdkTrackerTask newUpdateTask(@NotNull ShowStatusCallback showStatus,
                                                       @NotNull Predicate<? super UnknownSdkSnapshot> shouldProcessSnapshot)