rewrite-docs
rewrite-docs copied to clipboard
Overhaul JavaTemplate documentation
As of OpenRewrite 8 the JavaTemplate API changed quite a bit and also introduces the distinction of context-free and -sensitive templates. This calls for an overhaul of the documentation on this topic.
This issue requires the help of someone on the dev team to read through the JavaTemplate doc and then provide information on what needs to change. Tagging @sambsnyd for potential prioritization / help in the future. Marking this as blocked for now.
I'm going to collect in this comment the bits that I found during support or using the documentation that needs changes:
- Here it still mentions
J.withTemplate
although it no longer exists. It should be replaced with template.apply, but not sure the exact pharsing: https://github.com/openrewrite/rewrite-docs/blob/0f262f5c3141e53dad1f50ad981e47a232546965/concepts-and-explanations/javatemplate.md?plain=1#L121
As part of this - we should make sure to include information about context sensitivity. Related slack post