Automate Code Changes - Bringing OpenRewrite to the IDE

Published: 08 November 2023
on channel: Eclipse Foundation
927
11

Presented at EclipseCon 2023 in Ludwigsburg, Germany by Martin Lippert (Pivotal Software, Inc now under VMWare-April 2020).

This session introduces the OpenRewrite platform for automated source code refactorings and walks the audience through our efforts to integrate this platform into Eclipse and Visual Studio Code as part of the open-source Spring Tools.

The OpenRewrite project (https://docs.openrewrite.org) is a platform for implementing source code refactorings to help users, for example, to migrate to new framework or language versions, patch CVE vulnerabilities, or migrate existing code for API changes. Those refactorings (called Recipes in OpenRewrite) are not limited to Java source code. Recipes can include changes to source code in other languages, property files, kubernetes YAML descriptors, pom.xml files, and many more. Famous examples for those refactorings are automated refactorings to switch projects from JUnit 4 to JUnit 5, migrate a Spring Boot 1.x project to Spring Boot 2.x, apply best practices, switch from Java 8 to Java 11, and more. While OpenRewrite is IDE-agnostic and mostly meant to work on large amounts of source code in an automated fashion (for example as part of a build or CI platform), it also establishes a platform to grow a community of people that want to implement those refactorings easily and without being tied to a specific IDE.

As part of the Spring Tools, we work on an integration of Open Rewrite into Eclipse and Visual Studio Code to bring those hundreds or thousands of IDE-agnostic refactorings and automated migrations into the hands of every Eclipse and Visual Studio Code user. The session shows the integration in live demos, and takes a look under the hood, explaining the overall approach to integrate Open Rewrite into the IDEs and the challenges we faced along the way.


Watch video Automate Code Changes - Bringing OpenRewrite to the IDE online without registration, duration hours minute second in high quality. This video was added by user Eclipse Foundation 08 November 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 927 once and liked it 11 people.