Collection<TextAttributesKey> (boolean filterOutRainbowNonConflictingAttrKeys) { Set<TextAttributesKey> textAttributesKeys = new HashSet<>(); for (ColorSettingsPage page : ColorSettingsPages.getInstance().getRegisteredPages()) { Language pageLanguage = guessPageLanguage(page); if ( myLanguage == null && pageLanguage == null || myLanguage != null && (myLanguage.is(pageLanguage) || myLanguage.is(Language.ANY) && pageIsGoodForAnyLanguage(filterOutRainbowNonConflictingAttrKeys, page)) ) { for (AttributesDescriptor descriptor : page.getAttributeDescriptors()) { final TextAttributesKey textAttributesKey = descriptor.getKey(); if (filterOutRainbowNonConflictingAttrKeys && (textAttributesKey == DefaultLanguageHighlighterColors.LOCAL_VARIABLE || textAttributesKey == DefaultLanguageHighlighterColors.PARAMETER)) { continue; } if (!filterOutRainbowNonConflictingAttrKeys || pageLanguage == null || page instanceof RainbowColorSettingsPage && !((RainbowColorSettingsPage)page).isRainbowType(textAttributesKey)) { textAttributesKeys.add(textAttributesKey); } } if (page instanceof GeneralColorsPage) { // collecting HighlightInfoType info final Map<String, TextAttributesKey> map = page.getAdditionalHighlightingTagToDescriptorMap(); if (map != null) { textAttributesKeys.addAll(map.values()); } } } } return textAttributesKeys; }