Eclipse is defaulting to Java 1.5 and you have classes implementing interface methods (which in Java 1.6 can be annotated with @Override
, but in Java 1.5 can only be applied to methods overriding a superclass method).
Go to your project/IDE preferences and set the Java compiler level to 1.6 and also make sure you select JRE 1.6 to execute your program from Eclipse.
Eclipse 3.6 allows you to turn off formatting by placing a special comment, like
// @formatter:off
...
// @formatter:on
The on/off features have to be turned "on" in Eclipse preferences: Java > Code Style > Formatter. Click on Edit, Off/On Tags, enable Enable Off/On tags.
It's also possible to change the magic strings in the preferences — check out the Eclipse 3.6 docs here.
More Information
Java
>
Code Style
>
Formatter
>
Edit
>
Off/On Tags
This preference allows you to define one tag to disable and one tag to enable the formatter (see the Off/On Tags tab in your formatter profile):

You also need to enable the flags from Java Formatting
Best Solution
Usually it is a simple as adding
apply plugin: "eclipse"
in yourbuild.gradle
and runningand then refreshing your Eclipse project.
Occasionally you'll need to adjust
build.gradle
to generate Eclipse settings in some very specific way.There is gradle support for Eclipse if you are using STS, but I'm not sure how good it is.
The only IDE I know that has decent native support for gradle is IntelliJ IDEA. It can do full import of gradle projects from GUI. There is a free Community Edition that you can try.