Annotation Processors and Proposals [message #1739095] |
Wed, 27 July 2016 13:52 |
Daniel Platz Messages: 5 Registered: July 2016 |
Junior Member |
|
|
Hi there,
I was tinkering with annotation processors and the option to also offer completions that hook into the ide:
public class Processor extends AbstractProcessor {
...
@Override
public Iterable<? extends Completion> getCompletions(Element element, AnnotationMirror annotation,
ExecutableElement member, String userText) {
return Collections.singleton(Completions.of("Hello there"));
}
I have this seen working with netbeans but i cannot get it to show the the completion in eclipse.
The annotationporocessor in general is called and execute the process-method after adding it to the annotation-processor config/adding it to the factory (actually had to go to Advanced and set batch mode).
But getCompletions does not seem to be used for my annotation-parameters when i hit ctr+space.
I have seen that under windows/preferences/Java/Editor/Content Asssist/Advanced there is the list of "proposal-services". Which one would be the one processing the annotations? Do i have to configure anything?
If you are wondering what i am talking about:
https://www.youtube.com/watch?v=0hN6XJ69xn4
here at ~42:10 minutes you can see ow it works in netbeans.
Any tip appriciated.
Cheers,
Daniel
P.S.: Just read that it seems to be the same issue as in this thread:
https://www.eclipse.org/forums/index.php/t/367751/
[Updated on: Wed, 27 July 2016 16:59] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03125 seconds