Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I have the same problem and I'm not sure, if this is the right way, but at least it works:</p> <p>If you want to see your quick fixes in the source viewer you have to set an <code>QuickAssistAssistant</code> for it. In your class implementing <code>SourceViewerConfiguration</code> override <code>getQuickAssistAssistant</code>. You can instantiate <code>org.eclipse.jface.text.quickassist.QuickAssistAssistant</code>, but you have to set a <code>QuickAssistProcessor</code>, so implement the <code>org.eclipse.jface.text.quickassist.IQuickAssistProcessor</code> interface, especially <code>computeQuickAssistProposals</code> to return your quick fix proposals. </p> <pre><code>public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) { IQuickAssistAssistant quickAssist = new QuickAssistAssistant(); quickAssist.setQuickAssistProcessor(new MyQuickAssistProcessor()); quickAssist.setInformationControlCreator(getInformationControlCreator(sourceViewer)); return quickAssist; } </code></pre> <p>Also have a look at the code in the last post <a href="http://www.eclipse.org/forums/index.php/m/334673/?srch=annotation%20marker%20problem%20view#msg_334673" rel="nofollow">here</a>, it is a bit messy, but you will get it. And look at this code <a href="http://javasourcecode.org/html/open-source/eclipse/eclipse-3.5.2/org/eclipse/jdt/internal/ui/text/correction/proposals/MarkerResolutionProposal.java.html" rel="nofollow">here</a> for an example implementation of <code>ICompletionProposal</code>, which you will have to return in your <code>QuickAssistProcessor</code>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload