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

Add quick fix for can't map property X to Y #25

Open
filiphr opened this issue Nov 24, 2018 · 5 comments
Open

Add quick fix for can't map property X to Y #25

filiphr opened this issue Nov 24, 2018 · 5 comments

Comments

@filiphr
Copy link
Member

filiphr commented Nov 24, 2018

The eclipse plugin has a quick fix for the error "Can't map property X prop to Y prop. Consider to declare/implement a mapping method ...".

I still am not sure if IntelliJ has a way to register a quick fix for a warning / error (this is how Eclipse handles this now)

@thunderhook
Copy link
Contributor

It is possible, take a look at this official sample code.

@filiphr
Copy link
Member Author

filiphr commented Feb 3, 2019

Thanks for the tip @thunderhook, I will have a look at it and see if we can do something about it.

@filiphr
Copy link
Member Author

filiphr commented Feb 3, 2019

Btw, if you are interested in working on the plugin you can also provide a PR for this support 😉

@thunderhook
Copy link
Contributor

I'm sorry about my overhasty post about the sample code. That's just a sample to implement a quick-fix. After checking out the source I recognized that quick-fixes are already implemented, so there is nothing new for you to see here.

I tried to dig inside a little bit, but I have no experience in IntelliJ SDK, but I'll try my best if I find time.

@thunderhook
Copy link
Contributor

Yesterday I took some time to figure out how to get to the messages the annotation provider delivers.
In previous versions it had been able to use a ClassPostProcessingCompiler but it is now deprecated, reffering to this site.

I tried to provide a custom BuildTargetScopeProvider but this is only called before the annotation processor generates the code. I also tried to hook into some phase where the messages are delivered to the CompileContext, but I had no luck for now. I'll try again in about a week.

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