TextAttributes (@NotNull ArrangementSettingsToken token, boolean selected) { final TextAttributes cached; if (selected) { cached = mySelectedAttributesCache.get(token); } else { cached = myNormalAttributesCache.get(token); } if (cached != null) { return cached; } TextAttributes result = null; if (myColorsAware != null) { result = myColorsAware.getTextAttributes(EditorColorsManager.getInstance().getGlobalScheme(), token, selected); } if (result == null) { result = selected ? myDefaultSelectedAttributes : myDefaultNormalAttributes; } if (selected) { mySelectedAttributesCache.put(token, result); } else { myNormalAttributesCache.put(token, result); } return result; }