4 ms·
I wasn't able to find a recipe that performs a regular expression rename. That is, there doesn't seem to be anything like: --- type: specs.openrewrite.
by thangalin 4y ago
I wasn't able to find a recipe that performs a regular expression rename. That is, there doesn't seem to be anything like:
---
type: specs.openrewrite.org/v1beta/recipe
name: com.yourorg.ChangeTypeExample
displayName: Change type example
recipeList:
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: (.+)
newFullyQualifiedTypeName: Kt$1
- Someone 4y agoI would do that the hacker way: - build the current TeX.jar - jar tf TeX.jar | grep whatever to get a list of to-be-renamed classes - use sed or manual editing to generate a large list of recipes - run those recipes Instead of jar tf, grep for “^package foo.bar.baz” and “class (complex regex)” in the source code to get a list of package and class names, or use the directory structure. Maybe do all of them, and compare the results for robustness. That list will be large and it may not go perfect in one go, but it’s a one-off job, and you‘ll get there.
- deleted 4y ago[deleted]