private void onChangeRepository() {
    VirtualFile repo = repositorySelector.getRepository().getRoot();
    HgResolveCommand command = new HgResolveCommand(project);
    final ModalityState modalityState = ApplicationManager.getApplication().getModalityStateForComponent(getRootPane());
    command.getListAsynchronously(repo, status -> {
      final DefaultListModel model = new DefaultListModel();
      for (Map.Entry<HgFile, HgResolveStatusEnum> entry : status.entrySet()) {
        if (entry.getValue() == HgResolveStatusEnum.UNRESOLVED) {
          model.addElement(entry.getKey().getRelativePath());
        }
      }
      ApplicationManager.getApplication().invokeLater(() -> {
        setOKActionEnabled(!model.isEmpty());
        if (model.isEmpty()) {
          model.addElement(HgBundle.message("action.hg4idea.run.conflict.resolver.no.conflicts"));
        }
        conflictsList.setModel(model);
      }, modalityState);
    });
  }
private void onChangeRepository()