void onSdkDownloadCompletedSuccessfully() {
        // we handle ModalityState explicitly to handle the case,
        // when the next ProjectSettings dialog is shown, and we still want to
        // notify all current viewers to reflect our SDK changes, thus we need
        // it's newer ModalityState to invoke. Using ModalityState.any is not
        // an option as we do update Sdk instances in the call
        myModalityTracker.invokeLater(() -> WriteAction.run(() -> {
          for (Sdk sdk : myEditableSdks.copy()) {
            try {
              SdkType sdkType = (SdkType)sdk.getSdkType();
              configureSdk(sdk);

              String actualVersion = null;
              try {
                actualVersion = sdkType.getVersionString(sdk);
                if (actualVersion != null) {
                  SdkModificator modificator = sdk.getSdkModificator();
                  modificator.setVersionString(actualVersion);
                  modificator.commitChanges();
                }
              } catch (Exception e) {
                LOG.warn("Failed to configure a version " + actualVersion + " for downloaded SDK. " + e.getMessage(), e);
              }

              sdkType.setupSdkPaths(sdk);

              for (Project project: ProjectManager.getInstance().getOpenProjects()) {
                final var rootManager = ProjectRootManagerImpl.getInstanceImpl(project);
                final Sdk projectSdk = rootManager.getProjectSdk();
                if (projectSdk != null && projectSdk.getName().equals(sdk.getName())) {
                  rootManager.projectJdkChanged();
                }
              }
            }
            catch (Exception e) {
              LOG.warn("Failed to set up SDK " + sdk + ". " + e.getMessage(), e);
            }
          }
        }));
    }
void onSdkDownloadCompletedSuccessfully()