Interface IQuickAssistProcessor
-
- All Known Implementing Classes:
SpellingCorrectionProcessor
public interface IQuickAssistProcessorQuick assist processor for quick fixes and quick assists.A processor can provide just quick fixes, just quick assists or both.
This interface can be implemented by clients.
- Since:
- 3.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanAssist(IQuickAssistInvocationContext invocationContext)Tells whether this assistant has assists for the given invocation context.booleancanFix(Annotation annotation)Tells whether this processor has a fix for the given annotation.ICompletionProposal[]computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext)Returns a list of quick assist and quick fix proposals for the given invocation context.StringgetErrorMessage()Returns the reason why this quick assist processor was unable to produce any completion proposals.
-
-
-
Method Detail
-
getErrorMessage
String getErrorMessage()
Returns the reason why this quick assist processor was unable to produce any completion proposals.- Returns:
- an error message or
nullif no error occurred
-
canFix
boolean canFix(Annotation annotation)
Tells whether this processor has a fix for the given annotation.Note: This test must be fast and optimistic i.e. it is OK to return
trueeven though there might be no quick fix.- Parameters:
annotation- the annotation- Returns:
trueif the assistant has a fix for the given annotation
-
canAssist
boolean canAssist(IQuickAssistInvocationContext invocationContext)
Tells whether this assistant has assists for the given invocation context.- Parameters:
invocationContext- the invocation context- Returns:
trueif the assistant has a fix for the given annotation
-
computeQuickAssistProposals
ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext)
Returns a list of quick assist and quick fix proposals for the given invocation context.- Parameters:
invocationContext- the invocation context- Returns:
- an array of completion proposals or
nullif no proposals are available
-
-