public void addPanel(final RootsAndBranches action) {
    if (myMergeInfoRefreshActions == null) {
      myMergeInfoRefreshActions = new ArrayList<>();
      myMergeInfoRefreshActions.add(action);

      myConnection.subscribe(BRANCHES_CHANGED, (project, vcsRoot) -> callReloadMergeInfo());
      final Consumer<Boolean> reloadConsumer = aBoolean -> {
        if (Boolean.TRUE.equals(aBoolean)) {
          callReloadMergeInfo();
        }
      };
      final Runnable reloadRunnable = () -> callReloadMergeInfo();
      myConnection.subscribe(SvnVcs.WC_CONVERTED, reloadRunnable);
      myConnection.subscribe(RootsAndBranches.REFRESH_REQUEST, reloadRunnable);

      myConnection.subscribe(SvnVcs.ROOTS_RELOADED, reloadConsumer);

      myConnection.subscribe(VCS_CONFIGURATION_CHANGED, () -> callReloadMergeInfo());

      myConnection.subscribe(CommittedChangesTreeBrowser.ITEMS_RELOADED, new CommittedChangesTreeBrowser.CommittedChangesReloadListener() {
        @Override
        public void itemsReloaded() {
          reloadRunnable.run();
        }
        @Override
        public void emptyRefresh() {
        }
      });

      myConnection
        .subscribe(SvnMergeInfoCache.SVN_MERGE_INFO_CACHE, () -> doForEachInitialized(rootsAndBranches -> rootsAndBranches.fireRepaint()));

      myConnection.subscribe(Merger.COMMITTED_CHANGES_MERGED_STATE,
                             list -> doForEachInitialized(rootsAndBranches -> rootsAndBranches.refreshByLists(list)));
    } else {
      myMergeInfoRefreshActions.add(action);
    }
  }
public void addPanel(final RootsAndBranches action)