diff --git a/platform/platform-impl/src/com/intellij/designer/propertyTable/PropertyTable.java b/platform/platform-impl/src/com/intellij/designer/propertyTable/PropertyTable.java index 3176b6d1007e..040a1401b109 100644 --- a/platform/platform-impl/src/com/intellij/designer/propertyTable/PropertyTable.java +++ b/platform/platform-impl/src/com/intellij/designer/propertyTable/PropertyTable.java @@ -1166,7 +1166,7 @@ public abstract class PropertyTable extends JBTable { int style = ((template.getStyle() & SimpleTextAttributes.STYLE_WAVED) != 0 ? SimpleTextAttributes.STYLE_WAVED : 0) | ((template.getStyle() & SimpleTextAttributes.STYLE_UNDERLINE) != 0 ? SimpleTextAttributes.STYLE_UNDERLINE : 0); - attr = attr.derive(attr.getStyle() | style, template.getFgColor(), template.getBgColor(), template.getWaveColor()); + attr = attr.derive(attr.getStyle() | style, template.getFgColor(), null, template.getWaveColor()); } renderer.append(property.getName(), attr); diff --git a/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/componentTree/ComponentTree.java b/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/componentTree/ComponentTree.java index a819ebd248ed..9a31de27901a 100644 --- a/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/componentTree/ComponentTree.java +++ b/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/componentTree/ComponentTree.java @@ -24,7 +24,6 @@ import com.intellij.designer.designSurface.EditableArea; import com.intellij.designer.designSurface.FeedbackTreeLayer; import com.intellij.designer.model.ErrorInfo; import com.intellij.designer.model.RadComponent; -import com.intellij.lang.annotation.HighlightSeverity; import com.intellij.openapi.actionSystem.DataProvider; import com.intellij.openapi.actionSystem.PlatformDataKeys; import com.intellij.openapi.editor.colors.EditorColorsManager; @@ -45,16 +44,12 @@ import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; import java.awt.*; import java.awt.event.MouseEvent; -import java.util.HashMap; import java.util.List; -import java.util.Map; /** * @author Alexander Lobas */ public final class ComponentTree extends Tree implements DataProvider { - private final Map> myAttributes = - new HashMap>(); private final StartInplaceEditing myInplaceEditingAction; private QuickFixManager myQuickFixManager; private DesignerEditorPanel myDesigner; @@ -184,19 +179,14 @@ public final class ComponentTree extends Tree implements DataProvider { wrapper = new AttributeWrapper() { @Override public SimpleTextAttributes getAttribute(SimpleTextAttributes attributes) { - Map attributesMap = myAttributes.get(level.getSeverity()); - if (attributesMap == null) { - attributesMap = new HashMap(); - myAttributes.put(level.getSeverity(), attributesMap); + Color bgColor = textAttributes.getBackgroundColor(); + try { + textAttributes.setBackgroundColor(null); + return SimpleTextAttributes.fromTextAttributes(TextAttributes.merge(attributes.toTextAttributes(), textAttributes)); } - - SimpleTextAttributes result = attributesMap.get(attributes); - if (result == null) { - result = SimpleTextAttributes.fromTextAttributes(TextAttributes.merge(attributes.toTextAttributes(), textAttributes)); - attributesMap.put(attributes, result); + finally { + textAttributes.setBackgroundColor(bgColor); } - - return result; } }; }