rewrite-docs icon indicating copy to clipboard operation
rewrite-docs copied to clipboard

Overhaul JavaTemplate documentation

Open knutwannheden opened this issue 1 year ago • 3 comments

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.

knutwannheden avatar Jul 11 '23 20:07 knutwannheden

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.

mike-solomon avatar Jul 12 '23 15:07 mike-solomon

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

joanvr avatar Aug 02 '23 07:08 joanvr

As part of this - we should make sure to include information about context sensitivity. Related slack post

mike-solomon avatar Aug 22 '23 17:08 mike-solomon