void (@NotNull ColoredTreeCellRenderer renderer, boolean isSelected, boolean isActive, @Nullable String forceRenderedText) { SimpleTextAttributes targetTextAttributes = PushLogTreeUtil.addTransparencyIfNeeded(renderer, SimpleTextAttributes.REGULAR_ATTRIBUTES, isActive); if (myError != null) { renderer.append(myError, PushLogTreeUtil.addTransparencyIfNeeded(renderer, SimpleTextAttributes.ERROR_ATTRIBUTES, isActive)); } else { Collection<GitRemote> remotes = myRepository.getRemotes(); myRemoteRenderer.setSelected(isSelected); myRemoteRenderer.setTransparent(!remotes.isEmpty() && !isActive); myRemoteRenderer.render(renderer); if (!remotes.isEmpty()) { renderer.append(SEPARATOR, targetTextAttributes); if (forceRenderedText != null) { // update only appearance; do not update model in rendering!!!! renderer.append(forceRenderedText); return; } GitPushTarget target = getValue(); boolean newRemoteBranch = target != null && target.isNewBranchCreated(); myTargetRenderer.setSelected(isSelected); myTargetRenderer.setTransparent(!isActive); myTargetRenderer.render(renderer); if (newRemoteBranch) { renderer.setIconOnTheRight(true); NEW_BRANCH_LABEL.setInsets(JBUI.insets(2)); NEW_BRANCH_LABEL.setRound(JBUIScale.scale(4)); NEW_BRANCH_LABEL.setFont(NEW_BRANCH_LABEL_FONT.derive(renderer.getFont())); NEW_BRANCH_LABEL.setForeground(isSelected ? NEW_BRANCH_LABEL_SELECTION_FG : NEW_BRANCH_LABEL_FG); NEW_BRANCH_LABEL.setBackground(isSelected ? NEW_BRANCH_LABEL_SELECTION_BG : NEW_BRANCH_LABEL_BG); renderer.setIcon(NEW_BRANCH_LABEL); } } } }