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

Support for MapStruct SPI #91

Open
coney opened this issue Feb 14, 2022 · 7 comments
Open

Support for MapStruct SPI #91

coney opened this issue Feb 14, 2022 · 7 comments

Comments

@coney
Copy link

coney commented Feb 14, 2022

My DTOs are auto generated. each field is generated with an setter(setXXX) and chained accessor(withXXX). I wrote a customized AccessorNamingStrategy SPI to exclude those methods start with with and added the SPI to my project's preprocessor.

My SPI has successfully enlimited warnings of withXXX accessors. but in my IDEA, it still promotes the hits for adding withXXX mappings:
image

@91wzhang
Copy link

Having same issue when trying to use the protobuf SPI

@filiphr
Copy link
Member

filiphr commented Jul 14, 2022

@coney This ia a tricky one to be honest. There is no way for us to invoke the SPI from within the plugin. What we could offer perhaps is a way for people to somehow configure how certain methods need to be ignored.

@91wzhang supporting the protobuf SPI is perhaps that we need to look into independently. I would suggest creating a separate issue for that

@coney
Copy link
Author

coney commented Jul 30, 2022

@coney This ia a tricky one to be honest. There is no way for us to invoke the SPI from within the plugin. What we could offer perhaps is a way for people to somehow configure how certain methods need to be ignored.

@91wzhang supporting the protobuf SPI is perhaps that we need to look into independently. I would suggest creating a separate issue for that

Great, maybe a simple configurable regex pattern is enough for my scenario

@filiphr
Copy link
Member

filiphr commented Aug 1, 2022

Great, maybe a simple configurable regex pattern is enough for my scenario

That is an interesting idea @coney. We can look into that one.

@filiphr
Copy link
Member

filiphr commented Aug 1, 2022

@coney would you be interested in providing this functionality to the plugin?

@jomu78
Copy link

jomu78 commented Aug 25, 2023

@filiphr : I gave it a first try - see #150

@filiphr
Copy link
Member

filiphr commented Sep 10, 2023

Thanks @jomu78. I've added a response on the PR in #150 (comment)

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

No branches or pull requests

4 participants