GITBOOK-530: change request with no subject merged in GitBook

This commit is contained in:
Mike Solomon
2024-05-29 17:26:32 +00:00
committed by gitbook-bot
parent ab4d55566b
commit f848ff5d32
5 changed files with 8 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 KiB

View File

@@ -10,21 +10,22 @@ In this short guide, we'll walk through everything you need to know to get start
To begin, find some API that you're interested in searching for. Then right-click on one of its usages and either:
* Click on `Find Usages on All Repos` and then click on `Create Recipe` (selecting the [type of recipe that you want to create](#types-of-recipes-you-can-create)) OR
* Click on `Refactor`, select `Create OpenRewrite Recipe...`, and then click on `Create Recipe` (selecting the [type of recipe you want to create](#types-of-recipes-you-can-create)). Please note that IntelliJ IDEA offers a keyboard shortcut for the `Create OpenRewrite Recipe...` menu (it defaults to alt + command + 9 on a Mac).
* Click on `Find Usages on All Repos` and then click on `Create Recipe` (selecting the [type of recipe that you want to create](creating-recipes.md#types-of-recipes-you-can-create)) OR
![Find Usages on All Repos example](/.gitbook/assets/find-usages-create.gif)
<figure><img src="../../../.gitbook/assets/tiny-find-usages (1).gif" alt=""><figcaption><p>Find Usages example</p></figcaption></figure>
![Refactor menu example](/.gitbook/assets/refactor-create.gif)
* Click on `Refactor`, select `Create OpenRewrite Recipe...`, and then click on `Create Recipe` (selecting the [type of recipe you want to create](creating-recipes.md#types-of-recipes-you-can-create)). Please note that IntelliJ IDEA offers a keyboard shortcut for the `Create OpenRewrite Recipe...` menu (it defaults to alt + command + 9 on a Mac).
![Refactor menu example](../../../.gitbook/assets/refactor-create.gif)
## Types of recipes you can create
The Moderne plugin allows you to create two types of recipes: [Refaster recipe](https://docs.openrewrite.org/authoring-recipes/refaster-recipes) and [Imperative visitor-based recipes](https://docs.openrewrite.org/authoring-recipes/types-of-recipes#imperative-recipes).
The Moderne plugin allows you to create two types of recipes: [Refaster recipes](https://docs.openrewrite.org/authoring-recipes/refaster-recipes) and [Imperative visitor-based recipes](https://docs.openrewrite.org/authoring-recipes/types-of-recipes#imperative-recipes).
Refaster recipes are better if you're doing a straightforward replacement (such as converting `StringUtils.equals(..)` to `Objects.equals(..)`). For everything else, you should create an Imperative recipe.
![Refaster recipe example](/.gitbook/assets/refaster-recipe-example.png)
![Refaster recipe example](../../../.gitbook/assets/refaster-recipe-example.png)
![Visitor recipe example](/.gitbook/assets/visitor-recipe-example.png)
![Visitor recipe example](../../../.gitbook/assets/visitor-recipe-example.png)
For more information on recipe development, check out the [OpenRewrite authoring recipes docs](https://docs.openrewrite.org/authoring-recipes).