Class SpellingProblem
java.lang.Object
org.eclipse.ui.texteditor.spelling.SpellingProblem
A spelling problem as reported by the
SpellingService service to the
ISpellingProblemCollector.
This class is intended to be subclassed by clients.
- Since:
- 3.1
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intReturns the length of the incorrectly spelled region.abstract StringReturns a localized, human-readable message string which describes the spelling problem.abstract intReturns the offset of the incorrectly spelled region.abstract ICompletionProposal[]Returns the proposals for the incorrectly spelled region.Returns the proposals for the incorrectly spelled region.static voidremoveAll(ISourceViewer sourceViewer, String word) Removes all spelling problems that are reported for the givenwordin the active editor.static voidremoveAllInActiveEditor(ITextEditor editor, String word) Deprecated.
-
Constructor Details
-
SpellingProblem
public SpellingProblem()
-
-
Method Details
-
removeAllInActiveEditor
Deprecated.As of 3.4, replaced byremoveAll(ISourceViewer, String)Removes all spelling problems that are reported for the givenwordin the active editor.This a workaround to fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=134338 for 3.2 at the time where spelling still resides in JDT Text. Once we move the spell check engine along with its quick fixes down to Platform Text we need to provide the proposals with a way to access the annotation model.
- Parameters:
editor- the text editor, ifnullthis method does nothingword- the word for which to remove the problems ornullto remove all- Since:
- 3.3
-
removeAll
Removes all spelling problems that are reported for the givenwordin the active editor.- Parameters:
sourceViewer- the source viewerword- the word for which to remove the problems ornullto remove all- Since:
- 3.4
-
getOffset
public abstract int getOffset()Returns the offset of the incorrectly spelled region.- Returns:
- the offset of the incorrectly spelled region
-
getLength
public abstract int getLength()Returns the length of the incorrectly spelled region.- Returns:
- the length of the incorrectly spelled region
-
getMessage
Returns a localized, human-readable message string which describes the spelling problem.- Returns:
- a localized, human-readable message string which describes the spelling problem
-
getProposals
Returns the proposals for the incorrectly spelled region.- Returns:
- the proposals for the incorrectly spelled region
-
getProposals
Returns the proposals for the incorrectly spelled region.- Parameters:
context- the invocation context ornullif none- Returns:
- the proposals for the incorrectly spelled region
- Since:
- 3.4
-
removeAll(ISourceViewer, String)