Remove the corrupt java-file from the java source-folder (but keep a copy somewhere else); copy the mx-project to another folder. Delete entire project folder from Eclipse (option 'including contents' checked). Recompile the mx-project in the newly named folder. Re-import the project into Eclipse from the differently-named folder being shared with mx (option 'copy projects into work-space' should NOT be checked). Deploy the mx project (a fresh javasource template of the corrupt file will be generated) and copy the user defined code back into it. Eclipse functionality will be fully recovered.