mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Do not use fallback attributes when retrieving default values.
This commit is contained in:
@@ -110,10 +110,6 @@ public final class TextAttributesKey implements Comparable<TextAttributesKey>, J
|
||||
*/
|
||||
public TextAttributes getDefaultAttributes() {
|
||||
if (myDefaultAttributes == NULL_ATTRIBUTES) {
|
||||
if (myFallbackAttributeKey != null) {
|
||||
TextAttributes fallbackAttributes = myFallbackAttributeKey.getDefaultAttributes();
|
||||
if (fallbackAttributes != null && !fallbackAttributes.isEmpty()) return fallbackAttributes;
|
||||
}
|
||||
// E.g. if one text key reuse default attributes of some other predefined key
|
||||
myDefaultAttributes = null;
|
||||
final TextAttributeKeyDefaultsProvider provider = ourDefaultsProvider.getValue();
|
||||
|
||||
+5
-1
@@ -43,7 +43,11 @@ public class DefaultColorsScheme extends AbstractColorsScheme implements ReadOnl
|
||||
if (key == null) return null;
|
||||
TextAttributes attrs = myAttributesMap.get(key);
|
||||
if (attrs == null) {
|
||||
attrs = key.getDefaultAttributes();
|
||||
if (key.getFallbackAttributeKey() != null) {
|
||||
attrs = getFallbackAttributes(key.getFallbackAttributeKey());
|
||||
if (attrs != null && !attrs.isFallbackEnabled()) return attrs;
|
||||
}
|
||||
attrs = key.getDefaultAttributes();
|
||||
}
|
||||
return attrs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user