I have written a simple compile-time Annotation Processor to ensure that a field annotated with
@TypeChecker is of type
String.
I packaged it up according to specifications, including having a file named
META-INF/services/javax.annotation.processing.Processor which contains the name of the Annotation Processor:
jar -tf lib\TypeCheckerProcessor.jar
META-INF/MANIFEST.MF
com/mcleodnet/TypeCheckerProcessor.class
META-INF/services/javax.annotation.processing.Processor
When I compile from the comand line using this class:
the Annotation Processor code runs, and produces the expected error message:
javac -cp lib\TypeCheckerProcessor.jar -d bin src\com\mcleodnet\TestClass.java
error: Field 'myStringField' in class 'TestClass' must be type String
1 error
After configuring Ecplise to perform annoation processing for my Annotation Processor, I am expecting Eclipse to show the error in the editor, but it is not working (I see no indication that the Annotation Processor ran).
My Eclipse configuration related to annotation processing:
Has anyone else worked with annotation processing with Eclipse that might be able to help me understand why it is not working?