Skip to content

Proper way to modify getRecipeList based on examining the entire project #4701

Answered by shanman190
crankydillo asked this question in Q&A
Discussion options

You must be logged in to vote

So I would avoid getRecipeList unless you're always wanting that set of recipes to run. Even in which case, if you're trying to do parameters it can sometimes behave weirdly.

For optional execution, I'd probably use a scanning recipe, then in the edit phase use various attributes in the accumulator object to decide which recipe's visitors should be used. I'd just use the visitors directly rather than doAfterVisit as well.

Ie.

new MyRecipe(..).getVisitor().visitNonNull(tree, ctx)

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@crankydillo
Comment options

@shanman190
Comment options

@crankydillo
Comment options

Answer selected by crankydillo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants