Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » AnnotationProcessor for package-level annotations
AnnotationProcessor for package-level annotations [message #697392] Sat, 16 July 2011 15:05 Go to next message
Yves Bontemps is currently offline Yves BontempsFriend
Messages: 14
Registered: March 2010
Junior Member
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.


Cheers,

Yves.
Re: AnnotationProcessor for package-level annotations [message #697915 is a reply to message #697392] Mon, 18 July 2011 10:55 Go to previous messageGo to next message
Satyam Kandula is currently offline Satyam KandulaFriend
Messages: 444
Registered: July 2009
Senior Member
This seems to be a bug. Please file a bug.
Re: AnnotationProcessor for package-level annotations [message #701059 is a reply to message #697915] Sun, 24 July 2011 14:31 Go to previous message
Yves Bontemps is currently offline Yves BontempsFriend
Messages: 14
Registered: March 2010
Junior Member
Done. Bug 352949.
Thanks.


Cheers,

Yves.
Previous Topic:Hibernate dependency issue
Next Topic:Help! LDAP issue and debugger hang
Goto Forum:
  


Current Time: Tue Mar 19 08:05:46 GMT 2024

Powered by FUDForum. Page generated in 0.02193 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top