Skip to content

Conversation

@tobiasmelcher
Copy link
Contributor

  • Cache the last calculated ICodeMining list per ITextViewer and return
    it when the viewer is not yet reconciled instead of an empty list.
  • Track viewers with a synchronized Set and lazily attach a DisposeListener
    to their StyledText widgets to remove cached minings and listener state
    on disposal.
  • Ensure thread safety around listener installation using synchronization
    and Display.asyncExec, while keeping map updates simple and non-blocking.

This improves the user experience by preventing code minings from flickering
or disappearing during reconciliation delays, while properly managing memory
through cleanup on viewer disposal.
Fixes: eclipse-platform/eclipse.platform.ui#2786 (comment)

viewer disposal

- Cache the last calculated `ICodeMining` list per `ITextViewer` and
return
  it when the viewer is not yet reconciled instead of an empty list.
- Track viewers with a synchronized `Set` and lazily attach a
`DisposeListener`
  to their `StyledText` widgets to remove cached minings and listener
state
  on disposal.
- Ensure thread safety around listener installation using
synchronization
  and `Display.asyncExec`, while keeping map updates simple and
non-blocking.

This improves the user experience by preventing code minings from
flickering
or disappearing during reconciliation delays, while properly managing
memory
through cleanup on viewer disposal.
Fixes: eclipse-platform/eclipse.platform.ui#2786 (comment)
@tobiasmelcher
Copy link
Contributor Author

replaced by #2698

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Code mining] Editor content jumps around on every save in 4.35

2 participants