Is it possible to rename a package in generated fi...
# intellij
d
Is it possible to rename a package in generated files? If I use the Intellij rename action it renames the directory but the files inside it still have the old package. Use case: The package is generated from an openAPI spec and I would like to change the package name in the openapi-generator-maven-plugin config. But doing that would just generate the files with the new package name but not correct the existing usages! For that, I would like to utilize the Intellij rename action as a first step. Perhaps this is a X/Y problem, though, and there might be a different way to achieve what I want.
d
First to a move package refactoring (make sure intellij recognizes the directory as being part of the sources), then update the maven plugin config.
d
Yes, that's exactly what I've been trying. But even though the directory is marked as sources root the rename package action doesn't work as described above.
d
Hmm, you might just need to do a search/replace then.