JPanel (final Map<String, SvnMergeInfoRootPanelManual> panels, final Map<String, MergeInfoHolder> holders, List<WCInfoWithBranches> roots) { final JPanel mainPanel = new JPanel(new GridBagLayout()); boolean onlyOneRoot = roots.size() == 1; final GridBagConstraints gb = new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0); mainPanel.add(myToolbarComponent, gb); ++gb.gridy; for (final WCInfoWithBranches root : roots) { if (root == null) { continue; } final SvnMergeInfoRootPanelManual panel = new SvnMergeInfoRootPanelManual(myProject, wcInfoWithBranches -> { final WCInfoWithBranches newInfo = myDataLoader.reloadInfo(wcInfoWithBranches); if (newInfo == null) { // reload all items BackgroundTaskUtil.syncPublisher(myProject, SvnVcs.WC_CONVERTED).run(); // do not reload right now return wcInfoWithBranches; } return newInfo; }, () -> { final MergeInfoHolder holder = getHolder(root.getPath()); if (holder != null) { holder.refresh(false); } }, onlyOneRoot, root); panels.put(root.getPath(), panel); holders.put(root.getPath(), createHolder(panel)); final JPanel contentPanel = panel.getContentPanel(); mainPanel.add(contentPanel, gb); ++gb.gridy; } if (panels.size() == 1) { for (SvnMergeInfoRootPanelManual panel : panels.values()) { panel.setOnlyOneRoot(true); } } return mainPanel; }