Interface IQuickFixableAnnotation
-
- All Known Implementing Classes:
MarkerAnnotation,SpellingAnnotation
public interface IQuickFixableAnnotationAllows an annotation to tell whether there are quick fixes for it and to cache that state.Caching the state is important to improve overall performance as calling
IQuickAssistAssistant.canFix(Annotation)can be expensive.This interface can be implemented by clients.
- Since:
- 3.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisQuickFixable()Tells whether there are quick fixes for this annotation.booleanisQuickFixableStateSet()Tells whether the quick fixable state has been set.voidsetQuickFixable(boolean state)Sets whether there are quick fixes available for this annotation.
-
-
-
Method Detail
-
setQuickFixable
void setQuickFixable(boolean state)
Sets whether there are quick fixes available for this annotation.- Parameters:
state-trueif there are quick fixes available, false otherwise
-
isQuickFixableStateSet
boolean isQuickFixableStateSet()
Tells whether the quick fixable state has been set.Normally this means
setQuickFixable(boolean)has been called at least once but it can also be hard-coded, e.g. always returntrue.- Returns:
trueif the state has been set
-
isQuickFixable
boolean isQuickFixable() throws AssertionFailedExceptionTells whether there are quick fixes for this annotation.Note: This method must only be called if
isQuickFixableStateSet()returnstrue.- Returns:
trueif this annotation offers quick fixes- Throws:
AssertionFailedException- if called whenisQuickFixableStateSet()isfalse
-
-