org.eclipse.xtext.ui.editor.quickfix
Class XtextQuickAssistProcessor

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.quickfix.AbstractIssueResolutionProviderAdapter
      extended by org.eclipse.xtext.ui.editor.quickfix.XtextQuickAssistProcessor
All Implemented Interfaces:
org.eclipse.jface.text.quickassist.IQuickAssistProcessor

public class XtextQuickAssistProcessor
extends AbstractIssueResolutionProviderAdapter
implements org.eclipse.jface.text.quickassist.IQuickAssistProcessor


Field Summary
 
Fields inherited from class org.eclipse.xtext.ui.editor.quickfix.AbstractIssueResolutionProviderAdapter
DEFAULT_IMAGE
 
Constructor Summary
XtextQuickAssistProcessor()
           
 
Method Summary
 boolean canAssist(org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext invocationContext)
           
 boolean canFix(org.eclipse.jface.text.source.Annotation annotation)
           
 org.eclipse.jface.text.contentassist.ICompletionProposal[] computeQuickAssistProposals(org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext invocationContext)
           
protected  org.eclipse.jface.text.contentassist.ICompletionProposal create(org.eclipse.jface.text.Position posisition, IssueResolution resolution)
           
protected  java.util.List<org.eclipse.jface.text.contentassist.ICompletionProposal> createQuickfixes(org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext invocationContext, java.util.Set<org.eclipse.jface.text.source.Annotation> applicableAnnotations)
           
protected  java.util.Set<org.eclipse.jface.text.source.Annotation> getApplicableAnnotations(IXtextDocument document, org.eclipse.jface.text.source.IAnnotationModel annotationModel, int offset)
           
 java.lang.String getErrorMessage()
           
 IssueUtil getIssueUtil()
           
protected  void selectAndRevealQuickfix(org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext invocationContext, java.util.Set<org.eclipse.jface.text.source.Annotation> applicableAnnotations, java.util.List<org.eclipse.jface.text.contentassist.ICompletionProposal> completionProposals)
           
protected  void sortQuickfixes(java.util.List<org.eclipse.jface.text.contentassist.ICompletionProposal> quickFixes)
           
 
Methods inherited from class org.eclipse.xtext.ui.editor.quickfix.AbstractIssueResolutionProviderAdapter
getImage, getResolutionProvider, getResolutions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XtextQuickAssistProcessor

public XtextQuickAssistProcessor()
Method Detail

getErrorMessage

public java.lang.String getErrorMessage()
Specified by:
getErrorMessage in interface org.eclipse.jface.text.quickassist.IQuickAssistProcessor

canFix

public boolean canFix(org.eclipse.jface.text.source.Annotation annotation)
Specified by:
canFix in interface org.eclipse.jface.text.quickassist.IQuickAssistProcessor

canAssist

public boolean canAssist(org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext invocationContext)
Specified by:
canAssist in interface org.eclipse.jface.text.quickassist.IQuickAssistProcessor

computeQuickAssistProposals

public org.eclipse.jface.text.contentassist.ICompletionProposal[] computeQuickAssistProposals(org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext invocationContext)
Specified by:
computeQuickAssistProposals in interface org.eclipse.jface.text.quickassist.IQuickAssistProcessor

createQuickfixes

protected java.util.List<org.eclipse.jface.text.contentassist.ICompletionProposal> createQuickfixes(org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext invocationContext,
                                                                                                    java.util.Set<org.eclipse.jface.text.source.Annotation> applicableAnnotations)
Since:
2.3

selectAndRevealQuickfix

protected void selectAndRevealQuickfix(org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext invocationContext,
                                       java.util.Set<org.eclipse.jface.text.source.Annotation> applicableAnnotations,
                                       java.util.List<org.eclipse.jface.text.contentassist.ICompletionProposal> completionProposals)
Since:
2.3

create

protected org.eclipse.jface.text.contentassist.ICompletionProposal create(org.eclipse.jface.text.Position posisition,
                                                                          IssueResolution resolution)

sortQuickfixes

protected void sortQuickfixes(java.util.List<org.eclipse.jface.text.contentassist.ICompletionProposal> quickFixes)

getApplicableAnnotations

protected java.util.Set<org.eclipse.jface.text.source.Annotation> getApplicableAnnotations(IXtextDocument document,
                                                                                           org.eclipse.jface.text.source.IAnnotationModel annotationModel,
                                                                                           int offset)
                                                                                    throws org.eclipse.jface.text.BadLocationException
Throws:
org.eclipse.jface.text.BadLocationException

getIssueUtil

public IssueUtil getIssueUtil()