When I run an Ant build, MyEclipse (happens for v6.0 and 7.5) formats my code. When I open the file it says it was modified on the file system and when I reload it it is formatted.
The thing that is even stranger is that it is not formatted as specified in the Code Style in my Preferences (seems like Java Sun codding rules).
As far as I could determine, there is nothing called by the Ant build to do the formatting so it MyEclipse doing it? Could it be a plugin or something?
Part of the build also includes Maven tasks so could there be a Maven plugin doing this?
I mention that I searched and deactivated all possible options in the preferences of the IDE trying to find some setting but nothing.
It is very annoying so far and could cause problems since I am working on some older projects with minimal modifications in the code and don't want to have a complete messed up version of a class just because I modified a word or something.
Has someone else encountered this?
P.S. It happens only on my PC. My colleagues don't encounter this issue.
Thank you!
EDIT: I have executed some tests:
- I executed the Ant script outside of eclipse (in command prompt) then opened the files with notepad. The files are untouched, no formatting occurred. If I open eclipse nothing happens to the files.
- I opened eclipse and changed the files on the disk using notepad (added some spaces and saved them). Eclipse says the files are changed on the file system and asks to reload them. I say Yes he opens the files. The files are unchanged. No formatting occurs.
- I run Ant from eclipse. Eclipse says files have changed and asks to reload them. I say Yes and when the files are opened they are formatted. WTF??!?!!
Is there a config that says to run some tasks after ant builds or something? I could not find anything.