JComponent () { SimpleAsyncChangesBrowser changesBrowser = new SimpleAsyncChangesBrowser(myHelper.getProject(), false, true); myHeadToBranchListPanel = new CommitListPanel( getHeadToBranchCommits(myInitialRepo), DvcsBundle.message("label.branch.fully.merged.to.branch", myBranchName, myCurrentBranchName)); myBranchToHeadListPanel = new CommitListPanel( getBranchToHeadCommits(myInitialRepo), DvcsBundle.message("label.branch.fully.merged.to.branch", myCurrentBranchName, myBranchName)); addSelectionListener(myHeadToBranchListPanel, myBranchToHeadListPanel, changesBrowser); addSelectionListener(myBranchToHeadListPanel, myHeadToBranchListPanel, changesBrowser); myHeadToBranchListPanel.registerDiffAction(changesBrowser.getDiffAction()); myBranchToHeadListPanel.registerDiffAction(changesBrowser.getDiffAction()); JPanel htb = layoutCommitListPanel(true); JPanel bth = layoutCommitListPanel(false); JPanel listPanel = switch (getInfoType()) { case HEAD_TO_BRANCH -> htb; case BRANCH_TO_HEAD -> bth; case BOTH -> { Splitter lists = new Splitter(true, 0.5f); lists.setFirstComponent(htb); lists.setSecondComponent(bth); yield lists; } }; Splitter rootPanel = new Splitter(false, 0.7f); rootPanel.setSecondComponent(changesBrowser); rootPanel.setFirstComponent(listPanel); return rootPanel; }