Comments (8)
I implemented the auto-completion for @Mapper#componentModel()
(see https://github.com/sradi/mapstruct-eclipse/tree/issue7_componentModel). The list of supported values is currently hard coded. Other suggestions are welcome.
Before sending a pull request, I'd appreciate feedback on the structural changes, that I made.
from mapstruct-eclipse.
@sradi, sorry for the late reply.
Could you create a pull request also if its in an early stage? Then we have a place where we can discuss it and it isn't at risk of being forgotten ;) You can then still push further commits for incorporating any review comments if needed.
Thanks a lot for your contribution, looking forward to merge your first commit :)
from mapstruct-eclipse.
Btw. @agudian fixed a bug fix for completion of bean properties, so your change probably needs a rebase.
from mapstruct-eclipse.
I'd like to start work on auto-completion for @Mapper#config
.
@larswetzer, I have a question on how to solve this: Do you think, it's a good idea to use the SearchEngine of JDT to find all classes, that are annotated with @MapperConfig
or is there a simpler way to find valid auto-completions for this?
from mapstruct-eclipse.
@sradi, first of all, thanks a lot for your contribution!
Iām not sure whether the JDT search engine performs well in context of content assist, especially if the index is not yet built. But you should give it a try and test the performance.
Another idea would be an iteration over all compilation units of the project and do some AST parsing afterwards.
from mapstruct-eclipse.
I've moved out some parts of the todo-list to separate issues.
from mapstruct-eclipse.
Hey @sradi just came across this issue. Would you still be interested in working on this?
from mapstruct-eclipse.
Hi @gunnarmorling , I just had a closer look into my work-in-progress from a couple of months ago. My first intent was to finish this issue. But at a second glance, the code completion feature doesn't seem trivial to implement for non-String values (in this case: @Mapper(config=...)
).
The current implementation of AbstractAnnotationCompletionProposalComputer.isInRange(...)
doesn't work properly, when the compilationUnit is not in a compileable state (compilationUnit.isStructureKnown()==false
).
If @larswetzer has any hints, that help me to find an easy solution, I would happily implement it. But I currently don't have the time to get a deeper understanding of JDT.
from mapstruct-eclipse.
Related Issues (20)
- Quick-Fix: Suggest candidates if @InheritConfiguration/@InheritInverseConfiguration is ambigous
- Quick-Fix: Suggest candidates for unmapped source enum constants
- Ignore-Unmapped-Target-Properties QuickFix inserts annotations incorrectly for abstract mappers HOT 1
- Quick-Fix: Handle message "Can't map property x to y. Consider to declare ..." HOT 1
- Cannot build Eclipse plug-in while offline
- Quick-Fix: Add element-mapping method in case of error on iterable mapping
- Show property type in tool-tip when overing over source()/target()
- @Qualifier behavior not working with object HOT 1
- Jenkins down HOT 2
- Add support for @ValueMapping annotation HOT 1
- Consider public fields for source/target content-assist HOT 1
- Eclipse neon 3 plugin HOT 7
- Eclipse 2018-12RC1 - incremental compilation fails with APT HOT 4
- code completion works with @ValueMapping, but not @ValueMappings
- Eclipse 2019-12 - incremental compilation fails with APT HOT 4
- Unable to install MapStruct plugin for Eclipse HOT 6
- Update-sites (release/snapshot) are down HOT 2
- Plugin installation : Unable to read repository
- support non blocking completion
- No Code completions anymore? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapstruct-eclipse.