mapstruct / mapstruct-eclipse

An Eclipse plug-in for working with MapStruct
Other
13 stars 8 forks source link

#21 Support nested properties in code-completion #40

Closed agudian closed 7 years ago

agudian commented 7 years ago

Supports nested properties in source and target, supports multiple source parameters (the source-path then needs to start with the source parameter name).

We still don't have a proper test framework, which starts to be really annoying... 🙁 But I tested it in various of our mappers in the processor tests...

agudian commented 7 years ago

I've untangled the proposal classes a bit and moved them to a seperate package (similar to the quick-fixes).

I also added an icon that shows up in the list of Proposals in Preferences->Java->Editor->Content Assist->Advanced.

agudian commented 7 years ago

@gunnarmorling, @sjaakd, @filiphr: anyone adventurous enough to take a look at this PR or maybe try it out? Would be cool to let users try it and have fun with the improved stuff in 1.2.0.Beta1... :)

sjaakd commented 7 years ago

I pass. I'm not an eclipse user.. Trying to move slowly to IntelliJ 👍

agudian commented 7 years ago

I pass. I'm not an eclipse user.. Trying to move slowly to IntelliJ 👍

Then at least add your vote to these two, please:

... then it might become as good as Eclipse in that perspective... 😛

sjaakd commented 7 years ago

I'll do my best :smile:

filiphr commented 7 years ago

I am also not an Eclipse user, but IntelliJ one 😄.

And I think you meant https://youtrack.jetbrains.com/issue/IDEA-150621 😄.

I tried it quickly and for nested it behaves OK. It doesn't find usages, that is correct right? And it doesn't work when you have only one source parameter. For example in the FishTankMapper the source does not work for the mapAsWell method.

agudian commented 7 years ago

It doesn't find usages, that is correct right?

Right, that still could be added at some point...

And it doesn't work when you have only one source parameter. For example in the FishTankMapper the source does not work for the mapAsWell method.

Haaa, yes... If there is only one source parameter, I simply guess that the first element is already a property and not the parameter. I should fix that...

sjaakd commented 7 years ago

Hey guys.. for fun.. just typed MapStruct in InteliJ issue registration. 7 hits..

gunnarmorling commented 7 years ago

Couldn't try it out, but if you tested it I trust it's good :)

gunnarmorling commented 7 years ago

@agudian Should we push a new build to the Eclipse market place? The current version is quite old and download numbers are rising it seems.

agudian commented 7 years ago

Should we push a new build to the Eclipse market place? The current version is quite old and download numbers are rising it seems.

Good idea, I'll take care of it. It basically only means publishing the archived files from Jenkins to bintray...

If only that UI was a bit more forthcoming, it would have been an easy thing and wouldn't have taken me almost an hour now... 😁 But if you have an older version installed, Eclipse should show you an update if you search for updates... Or directly deliver the new version on a fresh installation.

gunnarmorling commented 7 years ago

Cool, thanks. Nice to see progress in the plug-in!