Pattern-Based Quick Assists from Mined Refactorings — Looking for Feedback #2946
carstenartur
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
JDT UI already has excellent Quick Fixes / Quick Assists. I'd like to share an experimental, complementary prototype and gauge interest.
The idea: Derive Quick Assist suggestions from patterns mined from real code changes, and represent those patterns in a declarative DSL (.sandbox-hint files).. Example:
Placeholders (
$x,$args$) match AST subtrees. Guards (:: sourceVersionGE(9),instanceof(...),isNullable(...)) provide conditional matching — 30+ built-in guards are implemented.What exists: A working prototype (carstenartur/sandbox) with:
ASTMatcher, guard systemWhy it might matter: Traditional cleanups require 500-1000 lines per pattern. A
.sandbox-hintrule needs 5-50 lines. Rules are shareable, composable, and can be project-specific.Open questions: precision/false positives, developer trust in mined rules, UX differentiation from hand-crafted fixes, quality assurance, maintenance, integration points in jdt.ui.
I'm not promising large-scale follow-up — I'm looking for feedback on whether this direction is worth exploring further.
Thanks!
All reactions