void (@NotNull ErrorLabel infoLabel, @Nullable @Nls String infoText, boolean isSelected) { if (infoText != null) { infoLabel.setVisible(true); infoLabel.setText(infoText); if (isSelected) { setSelected(infoLabel); } else { infoLabel.setBackground(getBackground()); infoLabel.setForeground(JBColor.GRAY); // different foreground than for other elements } } else { infoLabel.setVisible(false); } }