eirikbakke commented on code in PR #8371:
URL: https://github.com/apache/netbeans/pull/8371#discussion_r2029936162


##########
java/ant.grammar/src/org/netbeans/modules/ant/grammar/AntHighlightsLayerFactory.java:
##########
@@ -38,18 +34,16 @@
 public class AntHighlightsLayerFactory implements HighlightsLayerFactory {
 
     public @Override HighlightsLayer[] createLayers(final Context context) {
-        AttributeSet _attrs = 
MimeLookup.getLookup("text/x-jsp").lookup(FontColorSettings.class).getTokenFontColors("expression-language");
 // NOI18N
-        final AttributeSet attrs;
-        if (_attrs == null) {
-            // Fallback from 
web.core.syntax/src/org/netbeans/modules/web/core/syntax/resources/fontsColors.xml:
-            SimpleAttributeSet _sattrs = new SimpleAttributeSet();
-            _sattrs.addAttribute(StyleConstants.Background, new 
Color(0xe3f2e1));
-            attrs = _sattrs;
-        } else {
-            attrs = _attrs;
-        }
-        return new HighlightsLayer[] {HighlightsLayer.create("ant", 
ZOrder.SYNTAX_RACK.forPosition(10), true,
-                new AntHighlightsContainer((AbstractDocument) 
context.getDocument(), attrs))}; // NOI18N
+        HighlightsLayer highlighter = HighlightsLayer.create(
+            "ant",  // NOI18N
+            ZOrder.SYNTAX_RACK.forPosition(10), 
+            true, 
+            new AntHighlightsContainer(
+                (AbstractDocument) context.getDocument(),
+                
MimeLookup.getLookup("text/x-jsp").lookup(FontColorSettings.class).getTokenFontColors("expression-language")
 // NOI18N

Review Comment:
   OK, so we're removing the fallback here, but the null value "means 
"inherited" which seems to work better". Makes sense!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to