public class SpellingService extends Object
This class is not intended to be subclassed by clients.
Modifier and Type | Field and Description |
---|---|
static String |
PREFERENCE_SPELLING_ENABLED
A named preference that controls if spelling is enabled or disabled.
|
static String |
PREFERENCE_SPELLING_ENGINE
A named preference that controls which spelling engine is used.
|
Constructor and Description |
---|
SpellingService(IPreferenceStore preferences)
Initializes the spelling service with the given preferences.
|
Modifier and Type | Method and Description |
---|---|
void |
check(IDocument document,
IRegion[] regions,
SpellingContext context,
ISpellingProblemCollector collector,
IProgressMonitor monitor)
Checks the given regions in the given document.
|
void |
check(IDocument document,
SpellingContext context,
ISpellingProblemCollector collector,
IProgressMonitor monitor)
Checks the given document.
|
SpellingEngineDescriptor |
getActiveSpellingEngineDescriptor(IPreferenceStore preferences)
Returns the descriptor of the active spelling engine based on the
value of the
PREFERENCE_SPELLING_ENGINE preference
in the given preferences. |
SpellingEngineDescriptor |
getDefaultSpellingEngineDescriptor()
Returns the default spelling engine descriptor from extensions to
the spelling engine extension point.
|
SpellingEngineDescriptor[] |
getSpellingEngineDescriptors()
Returns all spelling engine descriptors from extensions to the
spelling engine extension point.
|
public static final String PREFERENCE_SPELLING_ENABLED
Value is of type Boolean
.
public static final String PREFERENCE_SPELLING_ENGINE
Value is of type String
.
public SpellingService(IPreferenceStore preferences)
preferences
- the preferencesPREFERENCE_SPELLING_ENABLED
,
PREFERENCE_SPELLING_ENGINE
public void check(IDocument document, SpellingContext context, ISpellingProblemCollector collector, IProgressMonitor monitor)
document
- the document to checkcontext
- the contextcollector
- the problem collectormonitor
- the progress monitor, can be null
public void check(IDocument document, IRegion[] regions, SpellingContext context, ISpellingProblemCollector collector, IProgressMonitor monitor)
document
- the document to checkregions
- the regions to checkcontext
- the contextcollector
- the problem collectormonitor
- the progress monitor, can be null
public SpellingEngineDescriptor[] getSpellingEngineDescriptors()
public SpellingEngineDescriptor getDefaultSpellingEngineDescriptor()
null
if none could be foundpublic SpellingEngineDescriptor getActiveSpellingEngineDescriptor(IPreferenceStore preferences)
PREFERENCE_SPELLING_ENGINE
preference
in the given preferences.preferences
- the preferencesnull
if none could be foundPREFERENCE_SPELLING_ENGINE
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.