use of com.intellij.ide.util.treeView.smartTree.TreeElementWrapper in project intellij-community by JetBrains.
the class ResourceBundleEditorRenderer method customize.
private boolean customize(Object value) {
final Object userObject = ((DefaultMutableTreeNode) value).getUserObject();
if (!(userObject instanceof TreeElementWrapper)) {
return false;
}
final TreeElement treeElement = ((TreeElementWrapper) userObject).getValue();
if (treeElement == null) {
return false;
}
final ItemPresentation presentation = treeElement.getPresentation();
if (presentation instanceof TextAttributesPresentation) {
final TextAttributesPresentation textAttributesPresentation = (TextAttributesPresentation) presentation;
final String text = textAttributesPresentation.getPresentableText();
if (text != null) {
final SimpleTextAttributes attr = SimpleTextAttributes.fromTextAttributes(textAttributesPresentation.getTextAttributes(getColorsScheme()));
append(text, new SimpleTextAttributes(attr.getBgColor(), attr.getFgColor(), attr.getWaveColor(), attr.getStyle() | SimpleTextAttributes.STYLE_OPAQUE));
return true;
}
}
return false;
}
Aggregations