@Override
    public void selectionChanged(@NotNull ContentManagerEvent event) {
      JComponent toolbarWrapper = myToolbarWrapperSupplier.get();
      if (toolbarWrapper == null) return;

      int index = event.getIndex();
      if (index != -1 && event.getOperation() != ContentManagerEvent.ContentOperation.remove) {
        Content content = event.getContent();
        ActionGroup actionGroup = content.getActions();
        if (actionGroup != null) {
          toolbarWrapper.setVisible(true);

          ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(content.getPlace(), actionGroup, true);
          toolbar.setTargetComponent(content.getActionsContextComponent());
          toolbarWrapper.removeAll();
          toolbarWrapper.add(wrapServicesAligned(toolbar), BorderLayout.CENTER);

          toolbarWrapper.revalidate();
          toolbarWrapper.repaint();
        }
        else {
          toolbarWrapper.setVisible(false);
        }
      }
    }
@Override
    public void selectionChanged(@NotNull ContentManagerEvent event)