[ 
https://issues.apache.org/jira/browse/GROOVY-12436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18128989#comment-18128989
 ] 

ASF GitHub Bot commented on GROOVY-12436:
-----------------------------------------

codecov-commenter commented on PR #2993:
URL: https://github.com/apache/groovy/pull/2993#issuecomment-6285304964

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2993?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   :x: Patch coverage is `72.72727%` with `6 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 72.4326%. Comparing base 
([`29ccbe8`](https://app.codecov.io/gh/apache/groovy/commit/29ccbe89f6e62c0f936546a19b18e99e62297ae9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`8036d48`](https://app.codecov.io/gh/apache/groovy/commit/8036d48c4ca17de1ca639bca8a30b8b82c7d6d83?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 2 commits behind head on master.
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2993?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...e/src/main/groovy/groovy/console/ui/Console.groovy](https://app.codecov.io/gh/apache/groovy/pull/2993?src=pr&el=tree&filepath=subprojects%2Fgroovy-console%2Fsrc%2Fmain%2Fgroovy%2Fgroovy%2Fconsole%2Fui%2FConsole.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnNvbGUvc3JjL21haW4vZ3Jvb3Z5L2dyb292eS9jb25zb2xlL3VpL0NvbnNvbGUuZ3Jvb3Z5)
 | 72.7273% | [1 Missing and 5 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2993?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/2993/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/2993?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2993        +/-   ##
   ==================================================
   + Coverage     72.4306%   72.4326%   +0.0020%     
   - Complexity      40615      40620         +5     
   ==================================================
     Files            1643       1643                
     Lines          142669     142690        +21     
     Branches        26793      26797         +4     
   ==================================================
   + Hits           103336     103354        +18     
   + Misses          29829      29827         -2     
   - Partials         9504       9509         +5     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2993?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...e/src/main/groovy/groovy/console/ui/Console.groovy](https://app.codecov.io/gh/apache/groovy/pull/2993?src=pr&el=tree&filepath=subprojects%2Fgroovy-console%2Fsrc%2Fmain%2Fgroovy%2Fgroovy%2Fconsole%2Fui%2FConsole.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnNvbGUvc3JjL21haW4vZ3Jvb3Z5L2dyb292eS9jb25zb2xlL3VpL0NvbnNvbGUuZ3Jvb3Z5)
 | `17.2507% <72.7273%> (+1.1334%)` | :arrow_up: |
   
   ... and [12 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2993/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test 
Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, 
report on failures, and find test suite problems.
   - :package: [JS Bundle 
Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save 
yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>




> GroovyConsole key bindings lost after runtime theme switch on JDK27
> -------------------------------------------------------------------
>
>                 Key: GROOVY-12436
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12436
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-console
>    Affects Versions: 6.0.0
>         Environment: macOS 26.7.1 (25G241)
>            Reporter: marslo
>            Priority: Major
>
> h2. Summary
> GroovyConsole input editor loses key bindings (Enter, Backspace, etc.) after 
> switching the theme at runtime (e.g. View → Theme → Dark, or the Preferences 
> "Reload Themes" button).
> h2. Environment
>  * Groovy 6.0.0
>  * macOS (Darwin), Java Swing GUI
>  * Reproduced with the bundled dark theme — no custom theme required
> {code:bash}
> $ groovy --version
> Groovy Version: 6.0.0 JVM: 27 Vendor: Homebrew OS: Mac OS X
> $ sw_vers
> ProductName:          macOS
> ProductVersion:               26.7.1
> BuildVersion:         25G241
> {code}
> h2. Steps to reproduce
>  # Launch groovyConsole while the OS appearance resolves to light (default 
> theme mode is SYSTEM).
>  # Switch the theme at runtime via View → Theme → Dark (or load a custom 
> theme and click Preferences → Reload Themes).
>  # Click into the input editor and press Enter or Backspace.
> h2. Expected
> Enter inserts a newline (with auto-indent); Backspace deletes the previous 
> character.
> h2. Actual
> Enter / Backspace (and other editor keys) no longer respond in the input 
> editor until the console is restarted.
> h2. Workaround
> Set the desired theme, fully quit (⌘Q), and relaunch. On startup 
> {{ThemeManager.applyTheme()}} runs before the editor is built, so no runtime 
> {{updateUI()}} occurs and key bindings stay intact.
> h2. Likely root cause
> {{Console.reapplyStyles()}} ends with {{{}FlatLaf.updateUI(){}}}, which runs 
> updateComponentTreeUI() over all windows and reinstalls the text component UI 
> delegates, resetting the input editor's InputMap/keymap. The custom bindings 
> installed in {{ConsoleTextEditor}} (and the editor-kit default edit actions) 
> are not re-installed afterward, so editor keys stop working until the 
> component tree is rebuilt (restart / new window).
> Call chain:
> {code:bash}
> reloadThemes() → reapplyTheme() → switchTheme() → reapplyStyles() → 
> FlatLaf.updateUI(){code}
> Introduced by GROOVY-11932 (PR apache/groovy#2469, "Allow theme switching 
> light/dark/system in groovyConsole").
> h2. Suggested fix
> Re-install the input editor's key bindings after {{FlatLaf.updateUI()}} in 
> {{{}reapplyStyles(){}}}, or avoid the full {{updateComponentTreeUI()}} sweep 
> over the editor component (update only colors/styles that actually changed).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to