Links

Update source positions

org.openrewrite.java.UpdateSourcePositions Calculate start position and length for every AST element.

Source

  • groupId: org.openrewrite
  • artifactId: rewrite-java
  • version: 7.33.0

Usage

This recipe has no required configuration parameters and comes from a rewrite core library. It can be activated directly without adding any dependencies.
Gradle
Maven POM
Maven Command Line
build.gradle
plugins {
id("org.openrewrite.rewrite") version("5.32.0")
}
rewrite {
activeRecipe("org.openrewrite.java.UpdateSourcePositions")
}
repositories {
mavenCentral()
}
pom.xml
<project>
<build>
<plugins>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>4.37.0</version>
<configuration>
<activeRecipes>
<recipe>org.openrewrite.java.UpdateSourcePositions</recipe>
</activeRecipes>
</configuration>
</plugin>
</plugins>
</build>
</project>
shell
mvn org.openrewrite.maven:rewrite-maven-plugin:4.37.0:run \
-DactiveRecipes=org.openrewrite.java.UpdateSourcePositions
Recipes can also be activated directly from the command line by adding the argument -Drewrite.activeRecipes=org.openrewrite.java.UpdateSourcePositions