There is a method getCompletionProposalAutoActivationCharacters
in ContentAssistProcessor
that can return characters which trigger the completion proposals. For example I can return new char[] { '.' }
return new char[] { '.' }
so that each time I type dot in the editor the word completion proposal shows up.
I thought that there should be a simular way to specify shortcut key stroke to trigger content assist such as Alt + /
, but actually that's different.
What is the best way to do this? I personally don't want to hard code a key listener for this.
JDT does that. They have a command+handler+keybinding to invoke the content assist.
See org.eclipse.jdt.internal.ui.text.java.JavaContentAssistHandler
for the implementation.
You can do similar one
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.