Class SpellingAnnotation
java.lang.Object
org.eclipse.jface.text.source.Annotation
org.eclipse.ui.texteditor.spelling.SpellingAnnotation
- All Implemented Interfaces:
IQuickFixableAnnotation
Spelling annotation.
- Since:
- 3.3
-
Field Summary
FieldsFields inherited from class org.eclipse.jface.text.source.Annotation
TYPE_UNKNOWN -
Constructor Summary
ConstructorsConstructorDescriptionSpellingAnnotation(SpellingProblem problem) Creates a new spelling annotation. -
Method Summary
Modifier and TypeMethodDescriptionReturns the spelling problem.booleanTells whether there are quick fixes for this annotation.booleanTells whether the quick fixable state has been set.voidsetQuickFixable(boolean state) Sets whether there are quick fixes available for this annotation.Methods inherited from class org.eclipse.jface.text.source.Annotation
getText, getType, isMarkedDeleted, isPersistent, markDeleted, setText, setType
-
Field Details
-
TYPE
The spelling annotation type.- See Also:
-
-
Constructor Details
-
SpellingAnnotation
Creates a new spelling annotation.- Parameters:
problem- the spelling problem.
-
-
Method Details
-
isQuickFixable
public boolean isQuickFixable()Description copied from interface:IQuickFixableAnnotationTells whether there are quick fixes for this annotation.Note: This method must only be called if
IQuickFixableAnnotation.isQuickFixableStateSet()returnstrue.- Specified by:
isQuickFixablein interfaceIQuickFixableAnnotation- Returns:
trueif this annotation offers quick fixes
-
isQuickFixableStateSet
public boolean isQuickFixableStateSet()Description copied from interface:IQuickFixableAnnotationTells whether the quick fixable state has been set.Normally this means
IQuickFixableAnnotation.setQuickFixable(boolean)has been called at least once but it can also be hard-coded, e.g. always returntrue.- Specified by:
isQuickFixableStateSetin interfaceIQuickFixableAnnotation- Returns:
trueif the state has been set
-
setQuickFixable
public void setQuickFixable(boolean state) Description copied from interface:IQuickFixableAnnotationSets whether there are quick fixes available for this annotation.- Specified by:
setQuickFixablein interfaceIQuickFixableAnnotation- Parameters:
state-trueif there are quick fixes available, false otherwise
-
getSpellingProblem
Returns the spelling problem.- Returns:
- the spelling problem
-