Merge branch 'master' into uta/rainbow
[idea/community.git] / java / java-analysis-impl / src / com / intellij / codeInsight / daemon / impl / analysis / HighlightNamesUtil.java
index 4ba8a25730f3125511a6c1b4a3208f69c10f6faf..5c915995234fe27eb26f0effcb61988f1ed181ef 100644 (file)
@@ -21,6 +21,7 @@ import com.intellij.codeInsight.daemon.impl.HighlightInfo;
 import com.intellij.codeInsight.daemon.impl.HighlightInfoType;
 import com.intellij.codeInsight.daemon.impl.JavaHighlightInfoTypes;
 import com.intellij.lang.ASTNode;
+import com.intellij.lang.java.JavaLanguage;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.editor.colors.TextAttributesKey;
 import com.intellij.openapi.editor.colors.TextAttributesScheme;
@@ -154,7 +155,8 @@ public class HighlightNamesUtil {
     }
 
     HighlightInfo.Builder builder = HighlightInfo.newHighlightInfo(varType).range(elementToHighlight);
-    return RainbowHighlighter.isRainbowEnabled() ? builder.createUnconditionally() : builder.create();
+    return RainbowHighlighter.isRainbowEnabledWithInheritance(JavaLanguage.INSTANCE) ? builder.createUnconditionally()
+                                                                                     : builder.create();
   }
 
   @Nullable