Good day,
I'd just like to correct my HandleHello.java for eclipse: The line with 'injectMethod(fieldNode, method);' should have been 'injectMethod(fieldNode.up(), method);' With that change, @HandleHello should now work properly in your eclipse.
What I did was I modified lombok's sources themselves. That's where I added @Hello and eclipse & javac HandleHello java files.
( But do check if you can see your handlers in build/lombok/META-INF/services/lombok.eclipse.EclipseAnnotationHandler and in build/lombok/META-INF/services/lombok.javac.JavacAnnotationHandler ).
I am not sure though if it would be possible to create a separate jar (i.e. lombok-hello-ext.jar) and have lombok pick that up at runtime. Maybe you can create your own lombok.eclipse.EclipseAnnotationHandler & lombok.javac.JavacAnnotationHandler files inside your new jar? ...I'm not sure. I haven't tested that yet.
Also, in case you're interested on how I used this new lombok annotation, I'm attaching the sample project that I used to test my @Hello (Note: this is a maven project).
Steps to test:
1.) Build lombok (with the @Hello and HandleHello java files).
2.) Install dist/lombok jar in your local repository (mvn install:install-file -DgroupId=org.projectlombok -DartifactId=lombok -Dversion=0.9.3-EDGE -Dpackaging=jar -Dfile=dist/lombok.jar)
3.) Untar lombok-sample.tar.gz
To test Javac HandleHello:
4.) Go to the directory where you exploded lombok-sample.tar.gz
5.) Run mvn clean test
* If @Hello worked, then you should see a Build Successful. If not, then you will see a compile error.
To test Eclipse HandleHello:
4.) Run the newly created dist/lombok.jar (and install this lombok to your eclipse)
5.) Run eclipse and import the exploded lombok-sample to your eclipse as an eclipse project
6.) Run AppTest
* If @Hello worked, then the tests should pass. If not, then you will most probably get an Eclipse error or a compile error.
Cheers