void (@NotNull Project project, @NotNull ToolWindow toolWindow) { TableProvidingListener listener = new TableProvidingListener(); project.getMessageBus() .connect(project) .subscribe(listener.TOPIC, listener); ContentManager manager = toolWindow.getContentManager(); ContentFactory contentFactory = ContentFactory.getInstance(); listener.createNamedPanels() .map(entry -> { JPanel panel = new JPanel(new BorderLayout()); panel.add(entry.getValue(), BorderLayout.CENTER); return contentFactory.createContent(panel, entry.getKey(), false); }) .forEach(manager::addContent); }