void (@Nullable JComponent component) { if (component == null) { component = myMessagePanel; } if (component.getParent() != myContentComponentPanel) { if (ServiceViewUIUtils.isNewServicesUIEnabled()) { boolean visible = ServiceViewActionProvider.isActionToolBarRequired(component); myServiceActionToolbarWrapper.setVisible(visible); if (visible) { myContentComponentPanel.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP)); } else { myContentComponentPanel.setBorder(null); } } myDetailsComponents.add(component); myContentComponentPanel.removeAll(); myContentComponentPanel.add(component, BorderLayout.CENTER); myContentComponentPanel.revalidate(); myContentComponentPanel.repaint(); } ActionToolbar serviceActionToolbar = myServiceActionToolbar; if (serviceActionToolbar != null) { ((ActionToolbarImpl)serviceActionToolbar).reset(); serviceActionToolbar.updateActionsImmediately(); } ApplicationManager.getApplication().invokeLater(() -> { ActionToolbar masterActionToolbar = myMasterActionToolbar; if (masterActionToolbar != null) { masterActionToolbar.updateActionsImmediately(); } }); }