void (@NotNull BuildDescriptor buildDescriptor, @NotNull Content content, @Nullable BuildProcessHandler processHandler) { if (processHandler != null) { Map<Object, CloseListener> closeListenerMap = content.getUserData(CONTENT_CLOSE_LISTENERS); if (closeListenerMap == null) { closeListenerMap = new HashMap<>(); content.putUserData(CONTENT_CLOSE_LISTENERS, closeListenerMap); } closeListenerMap.put(buildDescriptor.getId(), new CloseListener(this, content, processHandler)); } Pair<Icon, AtomicInteger> pair = liveContentsMap.computeIfAbsent(content, c -> new Pair<>(c.getIcon(), new AtomicInteger(0))); pair.second.incrementAndGet(); content.putUserData(ToolWindow.SHOW_CONTENT_ICON, Boolean.TRUE); if (pair.first == null) { content.putUserData(Content.TAB_LABEL_ORIENTATION_KEY, ComponentOrientation.RIGHT_TO_LEFT); } content.setIcon(ExecutionUtil.getLiveIndicator(pair.first, 0, 13)); invokeLaterIfNeeded(() -> { JComponent component = content.getComponent(); component.invalidate(); if (!liveContentsMap.isEmpty()) { getOrCreateToolWindow().setIcon(TW_ICON.get().getLiveIndicatorIcon()); } }); }