You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2021/07/01 10:17:06 UTC

[groovy] branch master updated: GROOVY-10160: Highlight source code in the AST browser smartly

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 9b90016  GROOVY-10160: Highlight source code in the AST browser smartly
9b90016 is described below

commit 9b90016437c572fb8b3c3a0488806ec20d35e368
Author: Daniel Sun <su...@apache.org>
AuthorDate: Thu Jul 1 18:13:44 2021 +0800

    GROOVY-10160: Highlight source code in the AST browser smartly
---
 .../src/main/groovy/groovy/console/ui/ConsoleTextEditor.java           | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/ConsoleTextEditor.java b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/ConsoleTextEditor.java
index 7b15f77..df870dd 100644
--- a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/ConsoleTextEditor.java
+++ b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/ConsoleTextEditor.java
@@ -18,7 +18,6 @@
  */
 package groovy.console.ui;
 
-import groovy.console.ui.text.GroovyFilter;
 import groovy.console.ui.text.MatchingHighlighter;
 import groovy.console.ui.text.SmartDocumentFilter;
 import groovy.console.ui.text.StructuredSyntaxResources;
@@ -178,7 +177,7 @@ public class ConsoleTextEditor extends JScrollPane {
         initActions();
 
         DefaultStyledDocument doc = new DefaultStyledDocument();
-        doc.setDocumentFilter(new GroovyFilter(doc));
+        doc.setDocumentFilter(new SmartDocumentFilter(doc));
         textEditor.setDocument(doc);
 
         // add a document listener, to hint whether the line number gutter has to be repainted