New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question - Are coordinated multi file refactorings possible with AutoRefactor? #327
Comments
Answering my own question: Yes, it is possible to do coordinated refactorings using the AutoRefactor framework.
@Fabrice-TIERCELIN |
I have never written such refactorings yet, but in theory you can do it. Be careful with multi threading if you have more than one autorefactor job running. |
It depends what you mean by that. However maybe you mean something like this? |
Yes i meant something like the clang ast matcher and wrote it since opening this ticket. |
Standard eclipse refactorings like "renameMethod" require coordinated changes to multiple files.
I want to write some refactorings requiring coordinated changes, too.
As a proof of concept I tried to write a naive AutoRefactor refactoring rule for removing some interface method and it's implementations and usages.
That did not work because as far as I can see AutoRefactor requires each CompilationUnit to be compilable on it's own and as soon as some dependency is already refactored (e.g. method removed)
the compile fails.
I got the impression that eclipse uses something called "virtual workspaces" for this but I may have misunderstood that. I did not find much information on that.
Does the AutoRefactor "rule framework" support such a use case?
If not do you consider that? Any concrete plans?
Any links to information on doing coordinated refactorings?
I tried to look at the rename refactoring but have problems navigating and accessing the "ltk" bundles from my oxygen autorefactor workspace.
I use eclipse only for AutoRefactor stuff and so my knowledge is sparse:
How do I find what bundle versions to require for lets say oxygen 3?I peeked at the oxygen 3 installation for bundle versions and just added them to the manifest. Visible now.
The text was updated successfully, but these errors were encountered: