Hi,
I am trying to contribute a JSR-175 annotation processor via the org.eclipse.jdt.apt.core.annotationProcessorFactory extension point.
My processor is correctly called by the build process in the debug environment, however, when I put a package-level annotation, I get the following stack trace:
java.lang.IllegalStateException: failed to create declaration from package test.pack
at org.eclipse.jdt.apt.core.internal.util.Factory.createDeclaration(Factory.java:112)
at org.eclipse.jdt.apt.core.internal.env.BaseProcessorEnv.getDeclarations(BaseProcessorEnv.java:374)
at org.eclipse.jdt.apt.core.internal.env.BaseProcessorEnv.getDeclarationsAnnotatedWith(BaseProcessorEnv.java:305)
at org.eclipse.jdt.apt.core.internal.env.BaseProcessorEnv.getDeclarationsAnnotatedWith(BaseProcessorEnv.java:279)
at com.bontemps.annotation.processor.MyFactory$MyProcessor.process(MyFactory.java:60)
The package annotations are defined in a package-info.java file stating:
@SimpleAnnotation(comment="OnAPackage")
package test.pack;
import com.bontemps.annotation.annotations.SimpleAnnotation;
Is this a bug in the Factory provided by JDT ? (A missing case statement for PackageDeclarations ?)
Regards,
Yves.