Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have outer classes extend Recipe too #17

Merged
merged 2 commits into from
Aug 14, 2023
Merged

Conversation

timtebeek
Copy link
Contributor

Simplifies calling related recipes all together without Yaml recipe lists.

I don't immediately see any possible negative effects: we already generate the class, and having a way to run all of them together should simplify things for the majority of cases.

Simplifies calling related recipes all together without Yaml recipe lists.
@knutwannheden
Copy link
Contributor

Possibly wr should actually declare the nested classes with the same visibility as in the Refaster source. That way a nested class can also be private and as a result only the outer recipe would be callable. I think that could be useful.

@timtebeek
Copy link
Contributor Author

Possibly wr should actually declare the nested classes with the same visibility as in the Refaster source. That way a nested class can also be private and as a result only the outer recipe would be callable. I think that could be useful.

Indeed a neat idea to match input and output modifiers for nested classes. Applied a first such change in 8b26e4c ; Not done for outer classes, as that would hide the inner ones as well I believe.


@Override
public String getDescription() {
return "Refaster template recipes for `foo.MultipleDereferences`.";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we possibly also here include the source code as Markdown?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid that would result in a very long blob of text for some of the recipes I anticipate here. Take for instance the Plexus StringUtils methods we hope to replace with recipes; that's a long list that I think would best be documented on each of the individual recipes.

I do understand there's some tension with whether that recipe would have visible individual recipes, but since we also plan to add a @DocumentExample to the docs, then I think including the recipe source here could be too much.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Let's keep it like this for now. We may want to add an annotation with which we can control the generation of the display name and description.

@timtebeek timtebeek merged commit 88c47d1 into main Aug 14, 2023
@timtebeek timtebeek deleted the outer_classes_as_recipes branch August 14, 2023 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants