[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform] Re: How do I activate the Quick Fix command in a context menu?
|
Daniel Megert wrote:
There's no pre-installed handler or action for the source viewer. The
editor framework does this for you if your source viewer configuration
provides a quick assist assistant (see:
org.eclipse.jface.text.source.SourceViewerConfiguration.getQuickAssistAssistant(ISourceViewer)).
Dani
Thanks very much, first of all.
I have added content assistants to my SourceViewerConfiguration as follows:
private IContentAssistant contentAssistant = new ContentAssistant();
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
return contentAssistant;
}
private IQuickAssistAssistant quickAssistAssistant = new
QuickAssistAssistant();
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer
sourceViewer) {
return quickAssistAssistant;
}
However, "Quick Fix Ctrl+1" in the SourceViewer context menu is still
disabled. Where exactly does the editor framework check for the content
assistant?
And out of curiosity, where is the key binding to Ctrl-1 set?
Cheers,
Pepe