public abstract class SpellingProblem extends Object
SpellingService
service to the
ISpellingProblemCollector
.
This class is intended to be subclassed by clients.
SpellingService
,
ISpellingProblemCollector
Constructor and Description |
---|
SpellingProblem() |
Modifier and Type | Method and Description |
---|---|
abstract int |
getLength()
Returns the length of the incorrectly spelled region.
|
abstract String |
getMessage()
Returns a localized, human-readable message string which describes the spelling problem.
|
abstract int |
getOffset()
Returns the offset of the incorrectly spelled region.
|
abstract ICompletionProposal[] |
getProposals()
Returns the proposals for the incorrectly spelled region.
|
ICompletionProposal[] |
getProposals(IQuickAssistInvocationContext context)
Returns the proposals for the incorrectly spelled region.
|
static void |
removeAll(ISourceViewer sourceViewer,
String word)
Removes all spelling problems that are reported
for the given
word in the active editor. |
static void |
removeAllInActiveEditor(ITextEditor editor,
String word)
Deprecated.
As of 3.4, replaced by
removeAll(ISourceViewer, String) |
public static void removeAllInActiveEditor(ITextEditor editor, String word)
removeAll(ISourceViewer, String)
word
in 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.
editor
- the text editor, if null
this method does nothingword
- the word for which to remove the problems or null
to remove allpublic static void removeAll(ISourceViewer sourceViewer, String word)
word
in the active editor.sourceViewer
- the source viewerword
- the word for which to remove the problems or null
to remove allpublic abstract int getOffset()
public abstract int getLength()
public abstract String getMessage()
public abstract ICompletionProposal[] getProposals()
public ICompletionProposal[] getProposals(IQuickAssistInvocationContext context)
context
- the invocation context or null
if none
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.