Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] Why was the Annotation processing in Eclipse made so different from javac?

Hello. I already asked this in the forum, but got no reply. http://www.eclipse.org/forums/index.php/t/665448/

Why annotation processing is off by default? One could say the
opposite would slow down things, but isn't a better trigger to enable
the processing - the presence of unknown annotations in the source
code (not @Override, @Deprecated etc.)? Other annotations are rare and
for most projects the processing would be inactive.

Why the project classpath is not used to find the annotation processors?
Perfomance again? Is it really slow to check for the file
"javax.annotation.processing.Processor" in the whole classpath?
Well, at least, in normal eclipse project this can be solved by
adding .factorypath under source control.
More problematic are maven projects. If it's a popular annotation
processor (like JPA) then it even works out of the box, because the
plugin supports it. But no custom annotations for us!

Why java projects can't be added to Factory Path? Why only jars are allowed?
I even tried to add custom ant builder to make me a jar, but this
doesn't work, because the Factory Path of a project is loaded BEFORE
the dependencies are built and for the edits in the custom processors
to take effect I had to restart eclipse.



Back to the top