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 2022/08/06 18:48:58 UTC
[groovy] 02/02: Tweak highlighting class info in object browser
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit cb1e55f82d8ce0c65b2621b017fe19d2479f3520
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Aug 7 02:39:49 2022 +0800
Tweak highlighting class info in object browser
(cherry picked from commit 116cf18355d263bd804f00f5dd2b92fbd7fa4f83)
---
.../src/main/groovy/groovy/console/ui/ObjectBrowser.groovy | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/ObjectBrowser.groovy b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/ObjectBrowser.groovy
index b0d2b7d30c..094ab6c3ac 100644
--- a/subprojects/groovy-console/src/main/groovy/groovy/console/ui/ObjectBrowser.groovy
+++ b/subprojects/groovy-console/src/main/groovy/groovy/console/ui/ObjectBrowser.groovy
@@ -156,10 +156,9 @@ class ObjectBrowser {
VOCABULARY.getLiteralName(it)?.replace("'", '')
}.grep { it } + ['module', 'true', 'false'])) {
content = content.replaceAll(/\b(${ln})\b/, '<b>$1</b>')
- .replace(',', '<b>,</b>')
- .replace(':', '<b>:</b>')
}
- def classLabel = "<html>${content.replace('\n', '<br/>')}</html>"
+ content = content.replace('\n', '<br/>').replace(',', '<b>,</b>').replace(':', '<b>:</b>')
+ def classLabel = "<html>${content}</html>"
label(classLabel)
}
tabbedPane(constraints: CENTER) {