Replies: 1 comment 11 replies
-
To generate a new file you'll indeed want to use a |
Beta Was this translation helpful? Give feedback.
11 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I've a
TreeVisitor
impl (actually, aXmlVisitor
). Once a specific condition is met (a specific XML attribute was rewritten a specific way), then I'd like to trigger the generation of a new source file (actually, a Java source file).How exactly can I achieve this using OpenRewrite 8.x? All the answers I found on Internet and all suggestions provided by AI say that I should be using
doNext(new CreateTextFile(...))
but this 7.x method doesn't anymore exist in 8.x.I also tried a
ScanningRecipe
which searches for the rewritten attribute, but it appears to be executed before all normal recipes instead of after, even when I append it as last one inbuildRecipeList()
.Beta Was this translation helpful? Give feedback.
All reactions