Add opt-in block-end code mining - #4226
Open
vogella wants to merge 1 commit into
Open
Conversation
Contributor
vogella
force-pushed
the
lv/block-end-codemining
branch
from
August 14, 2026 10:23
f1dd834 to
8a4d2f4
Compare
vogella
force-pushed
the
lv/block-end-codemining
branch
from
August 24, 2026 02:53
8a4d2f4 to
d0316e0
Compare
Echo a block's opening line at its closing brace, prefixed with " // ", so an isolated } tells which block it terminates. Braces are matched structurally, without a parser, so there is no dependency on JDT or a language model. Braces in comments and string literals are skipped where the document has a partitioning that marks code as the default content type; a partitioning that uses content types of its own, as TextMate does for every text file, cannot say where the code is and is ignored. Only blocks spanning at least a configurable number of lines are annotated, 20 by default. Nothing in the platform recomputes minings on a document change, JDT brings its own reconciler for that, so the provider follows the document itself and refreshes shortly after typing stops. The feature is off by default and enabled on the Text Editors preference page, where the code mining settings now share a group with the existing problem annotation ones. Assisted-by: multiple AI agents and layers of automated tooling 🤖
vogella
force-pushed
the
lv/block-end-codemining
branch
from
September 9, 2026 14:43
d0316e0 to
0434738
Compare
vogella
marked this pull request as ready for review
September 9, 2026 14:44
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Adds a language-agnostic code mining that echoes a block's opening line at its closing brace, so an isolated
}tells you which block it terminates.The echoed text is prefixed with
//so it reads like the closing brace comment people write by hand.Braces are matched purely structurally, which keeps
org.eclipse.ui.workbench.texteditorfree of any dependency on JDT or a language model.Braces in comments and string literals are skipped where the document has a partitioning that marks code as the default content type; a partitioning that uses content types of its own, as TextMate does for every text file, cannot say where the code is and is ignored.
A block is annotated once it spans at least a configurable number of lines, 20 by default.
Nothing in the platform recomputes minings on a document change (JDT ships its own reconciler for that), so the provider follows the document itself and refreshes shortly after typing stops, off the UI thread.
The feature is off by default behind a new checkbox on the Text Editors preference page.
Since that page is already crowded, the new setting and the existing problem annotation code mining settings now share a "Code Minings" group instead of adding two more rows to the flat option list.