}
String name = jdk.getName();
CompositeAppearance appearance = new CompositeAppearance();
appearance.setIcon(jdk.getSdkType().getIcon());
VirtualFile homeDirectory = jdk.getHomeDirectory();
SimpleTextAttributes attributes = (homeDirectory != null && homeDirectory.isValid())
? createSimpleCellAttributes(selected)
: SimpleTextAttributes.ERROR_ATTRIBUTES;
CompositeAppearance.DequeEnd ending = appearance.getEnding();
ending.addText(name, attributes);
String versionString = jdk.getVersionString();
if (versionString != null && !versionString.equals(name)) {
SimpleTextAttributes textAttributes = isInComboBox ? SimpleTextAttributes.SYNTHETIC_ATTRIBUTES : SimpleTextAttributes.GRAY_ATTRIBUTES;
ending.addComment(versionString, textAttributes);
}
return ending.getAppearance();
}