Solution:
If you imported a Java 6 project and have Eclipse complaining about @Override annotations because you are compiling with Java 5...
- Make sure you have a file from the project open and selected in your workspace
- CTRL+H
- Change the Tab at the top from Java Search to File Search
- In Containing Text enter
@Override
- In File name patterns enter
*
- Select Enclosing Projects for your Scope
- Press Search to do a dry run to see what happens and what it finds
Then, if all looks good, proceed with:
- CTRL+H
- Change the Tab at the top from Java Search to File Search
- All your values should be remembered, if not follow the steps above from the dry run
- Press Replace
Example Replace
Replacing 92 matches in 18 files
- Replace: field should have carried over
@Override
- Remove anything/everything from the With: field
- Press OK
Awesome...no laborious removing of @Overrides ever again.
Please NOTE: Occasionally, for me at least, when pressing CTRL+H the File Search wont allow me to choose Enclosing Projects as a Scope or it will automatically search the entire Workspace as opposed to the project. This is resolved by ensuring a file from your project is open and focused in Eclipse.
Hope this helps others. Thanks