How to install and configure the Moderne plugin
Moderne offers an IntelliJ IDEA plugin that can not only help you create and debug recipes, but can also assist with your general development experience by allowing you to easily search for code across all of your repositories at once. In this short guide, we'll show you how to install and configure the Moderne plugin.
Multi-repository code search
Regardless of whether you're a new developer or someone with decades of experience writing code, you will often find yourself wanting to look for examples of how particular pieces of code are used. In fact, about one third of all Google code searches are attempting to find examples of how others have done something. Unfortunately, these searches will often lead to examples that aren't quite right – they might match the same text, but they often will not match the types_. If you attempt to restrict searching to only the repositories on your local machine (such as using grep for instance), you will often run into a similar issue.
How to create recipes
When planning large-scale code changes, it's a good idea to begin by creating a recipe that identifies all of the potential edit sites. Doing so gives you a full impact analysis of what you're about to do, before you actually do it. Taking the time to find all of these locations is especially important because real-world code is complex and nuanced. Without a proper accounting of this nuance, writing a transformation recipe will not be as accurate as you'd wish.
How to debug a recipe using the Moderne plugin
One key benefit of the Moderne IDE plugin is the ability to quickly debug recipes against real code. You can set breakpoints in your IDE and have those be hit when you run a recipe in the Moderne CLI – so you can know exactly what is happening in the recipe.