AttributeWrapper (RadComponent component) { AttributeWrapper wrapper = AttributeWrapper.DEFAULT; final HighlightDisplayLevel level = getHighlightDisplayLevel(myDesigner.getProject(), component); if (level != null) { TextAttributesKey attributesKey = SeverityRegistrar.getSeverityRegistrar(myDesigner.getProject()).getHighlightInfoTypeBySeverity(level.getSeverity()) .getAttributesKey(); final TextAttributes textAttributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(attributesKey); wrapper = new AttributeWrapper() { @Override public SimpleTextAttributes getAttribute(SimpleTextAttributes attributes) { Color bgColor = textAttributes.getBackgroundColor(); try { textAttributes.setBackgroundColor(null); return SimpleTextAttributes.fromTextAttributes(TextAttributes.merge(attributes.toTextAttributes(), textAttributes)); } finally { textAttributes.setBackgroundColor(bgColor); } } }; } return wrapper; }