-
Notifications
You must be signed in to change notification settings - Fork 206
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
Spring Data JPA Content Assist #981
Conversation
374a6ef
to
a880498
Compare
242a052
to
c0f1662
Compare
@danthe1st Generally it all looks good to me. I suspect that the way to use it would be first type in the query keyword with a help of content assist (query proposals) then invoke content assist once query string is completed to fill in the rest for the method declaration (method proposals). Is this correct? |
Yes, it does complete the signature of already existing queries once they are typed (if those refer to unknown attributes, it uses Aside from that, it also autocompletes simple query method subjects like I decided to return As seen in the Finally, squashing is perfectly fine with me. |
I'm going to merge this PR as is squashed and rebased. It looks like we could factor some static stuff into spring beans but we can do it later as more PRs in this area are merged |
Squashed, rebased and merged with 97d6606 |
Fixes #107
This PR adds more Content Assist options for Spring JPA Repository interfaces.
It adds simple text completions, e.g. a content assist is provided for
countBy
and automatically completes the return type and parameters of a method if it is named correctly.2023-02-20_16-43-21.mp4
Aside from that, it includes a small fix allowing for primitive properties and also boolean properties if their getter names start with
is
.To do:
Order/priorize completion proposals if possible (put text proposals at the bottom of the proposal list) - I am unsure whether this is possibledoes not seem to be possible without significant modifications and Eclipse seems to order it in a sensitive way anywaysfindByFirst
should could completed tofindByFirstName
)findByEmployee_FirstName
so that it detects the typefindByFirst
tofindByFirstName
)Future work:
In
/IsIn
should make the method expect a collection whereasIncludes
/... should expect a single element when a collection is on the leftShould there be a method/configuration for enabling/disabling these content assist options (e.g. enable some but not others)? If so, where/how are such things implemented in this project?