I have the same error: Syntax error, type annotations are available only when source level is at least 1.8after installing WindowBuilder of the Eclipse plugin. My setup is with Java 7, and I still can’t upgrade to Java 8. I have Java 7 and 8 installed, but my JRE and compiler are configured for Java 7 through Window > Preferences > Java.
I believe that I found a problem related to the plugin org.eclipse.jdt.annotationdescribed here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=434033
Any suggestions to fix this problem?
I noticed that now I have two org.eclipse.jdt.annotationplugins, versions 1.1.0and 2.0.0. The problem is that it 2.0.0has a dependency on Java 1.8, and all my plugins are referenced 2.0.0. I believe that changing these links to an earlier version should solve this, right? How can i do this?
As a test, I changed the manifest file on one of my plug-in projects, but it does not remove the errors. Here is an excerpt in which I tried to reference the package version 1.1.0:
Require-Bundle: org.eclipse.ui,
org.eclipse.core.resources,
org.eclipse.core.runtime,
org.eclipse.jdt.core,
org.eclipse.ltk.core.refactoring,
org.eclipse.jdt.ui,
com.kivancmuslu.www.solstice.common,
com.kivancmuslu.www.util.eclipse,
com.kivancmuslu.www.util.eclipse.ui,
org.eclipse.ui.workbench.texteditor,
org.eclipse.ui.ide,
org.eclipse.ui.editors,
org.eclipse.jface.text,
com.kivancmuslu.www.utils,
org.eclipse.ui.console,
org.eclipse.jdt.annotation;bundle-version="1.1.0"
UPDATE
Yes, I'm running to the moon. After changing the last line of my manifest from
org.eclipse.jdt.annotation;bundle-version="1.1.0"
to
org.eclipse.jdt.annotation;bundle-version="[1.1.0,2.0.0)"
the errors have disappeared. Thank.