protected void init() {
    setLayout(new BorderLayout());
    setFocusable(false);

    JPanel topPanel = new JPanel(new BorderLayout());

    Component toolbarComponent = isVerticalToolbar()
                                 ? createToolbarComponent()
                                 : new TreeActionsToolbarPanel(createToolbarComponent(), myViewer);

    JComponent headerPanel = createHeaderPanel();
    if (headerPanel != null) topPanel.add(headerPanel, BorderLayout.EAST);

    switch (myToolbarAnchor) {
      case SwingConstants.TOP -> topPanel.add(toolbarComponent, BorderLayout.CENTER);
      case SwingConstants.BOTTOM -> add(toolbarComponent, BorderLayout.SOUTH);
      case SwingConstants.LEFT -> add(toolbarComponent, BorderLayout.WEST);
      case SwingConstants.RIGHT -> add(toolbarComponent, BorderLayout.EAST);
    }

    add(topPanel, BorderLayout.NORTH);
    add(createCenterPanel(), BorderLayout.CENTER);

    myToolBarGroup.addAll(createToolbarActions());
    myToolBarGroup.addAll(createLastToolbarActions());
    myPopupMenuGroup.addAll(createPopupMenuActions());

    myShowDiffAction.registerCustomShortcutSet(this, null);
    DiffUtil.recursiveRegisterShortcutSet(myToolBarGroup, this, null);
  }
protected void init()