I used the file search functions in eclipse to replace the specific appearance of text with replacement text that contains the name of the java method in all files in the workspace.
But now in all these files I have to add an import statement (to resolve the method name).
Is there an automatic way to do this instead of manually searching and importing the package in all files?
PS: I can’t use java refactoring, since the text I changed is not a java element, and the “Arrange import” option will make changes to many files (import reordering), which will be problematic when I need to commit, I again, I have to manually check the differences to see which files have the actual changes, and not just streamline the import instructions.
Reddy source
share