On Wed, 29 Apr 2026 00:20:10 GMT, Jeremy Wood <[email protected]> wrote:

>> "JEditorPane.setEditorKit" and "JTextComponent.setDocument()"
>
> I think `JEditorPane.setEditorKit` is the uninteresting case, because it 
> calls `setDocument`.
> 
> I drafted a new approach that overrides `JEditorPane.setDocument`. Would you 
> prefer 
> [this](https://github.com/openjdk/jdk/compare/master...mickleness:8380790D?expand=1)?
> 
> The PR on this page proposes lazily uninstalling the cached hypertext object 
> when someone calls `accessibleContext.getAccessibleText()`.
> 
> The new `8380790D` branch proposes uninstalling the cached hypertext object 
> when `setDocument` is called; this relies on asking JEditorPane to check `if 
> (accessibleContext instanceof AccessibleJEditorPaneHTML)` to identify this 
> specific scenario.

the current version seems better lets stick with it

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/30401#discussion_r3223823656

Reply via email to