Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotation processors not being run #1

Closed
cesarizu opened this issue Aug 22, 2012 · 6 comments
Closed

Annotation processors not being run #1

cesarizu opened this issue Aug 22, 2012 · 6 comments

Comments

@cesarizu
Copy link
Contributor

When using annotation processors like lombok (http://projectlombok.org/) everything works on the command line, but they are not being executed in netbeans. I've tried this with maven projects, netbeans projects and they work with no problems. I imagine that it's because of how the dependencies are loaded into netbeans.

Do you have any idea what could be happening here? Where can I start looking at to solve this problem?

@cesarizu
Copy link
Contributor Author

Sample project to test this issue: https://github.com/cesarizu/samplelombok

@kelemen
Copy link
Owner

kelemen commented Aug 22, 2012

To be honest, I never use annotation processors, so I didn't even thought about it.

It seems to be a new feature which must be implemeted. I believe the AnnotationProcessingQueryImplementation interface must be implemented for this.

I will see what I can do but if you want to implement this feature, I will not be in your way :).

@kelemen
Copy link
Owner

kelemen commented Aug 22, 2012

This is only an editor problem, the code builds fine (since I do nothing but call Gradle, it is no surprise). I admit however, that for such code, this plugin cannot be considered usable.

@cesarizu
Copy link
Contributor Author

When declaring the same project using maven or directly using a netbeans project or a freeform project, the editor runs the annotation processors and even the outline for that class shows the getters, setters, toString and equals methods for this example.

I'll take a look at AnnotationProcessingQueryImplementation and give it a shot.

@kelemen
Copy link
Owner

kelemen commented Aug 22, 2012

I did a little debugging and it seems that NetBeans does no attempt to find the class path for annotation processors for the given file. This might very well be due to the fact, that I did not implement the above mentioned query.

If you are curious the class path for the java sources are provided by org.netbeans.gradle.project.query.GradleClassPathProvider. For annotation processing, I provide the same path as for the compile classpath. This seems appropriate in this case.

cesarizu added a commit to cesarizu/netbeans-gradle-project that referenced this issue Aug 23, 2012
@kelemen
Copy link
Owner

kelemen commented Aug 23, 2012

Thank you, I have merged the commit with a small adjustment, so that it is more consistent with other parts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants