本文整理汇总了Java中org.eclipse.ui.texteditor.spelling.SpellingService.getActiveSpellingEngineDescriptor方法的典型用法代码示例。如果您正苦于以下问题:Java SpellingService.getActiveSpellingEngineDescriptor方法的具体用法?Java SpellingService.getActiveSpellingEngineDescriptor怎么用?Java SpellingService.getActiveSpellingEngineDescriptor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.texteditor.spelling.SpellingService
的用法示例。
在下文中一共展示了SpellingService.getActiveSpellingEngineDescriptor方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getReconciler
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入方法依赖的package包/类
/**
* @see org.eclipse.jface.text.source.SourceViewerConfiguration#getReconciler(org.eclipse.jface.text.source.ISourceViewer)
*/
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {
if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED))
return null;
if (!TexlipsePlugin.getDefault().getPreferenceStore().getBoolean(TexlipseProperties.ECLIPSE_BUILDIN_SPELLCHECKER))
return null;
//Set TeXlipse spelling Engine as default
PreferenceStore store = new PreferenceStore();
store.setValue(SpellingService.PREFERENCE_SPELLING_ENGINE,
"org.eclipse.texlipse.LaTeXSpellEngine");
store.setValue(SpellingService.PREFERENCE_SPELLING_ENABLED,
true);
SpellingService spellingService = new SpellingService(store);
if (spellingService.getActiveSpellingEngineDescriptor(store) == null)
return null;
IReconcilingStrategy strategy= new TeXSpellingReconcileStrategy(sourceViewer, spellingService);
MonoReconciler reconciler= new MonoReconciler(strategy, true);
reconciler.setDelay(500);
reconciler.setProgressMonitor(new NullProgressMonitor());
return reconciler;
}
示例2: getReconciler
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入方法依赖的package包/类
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {
if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
return null;
}
SpellingService spellingService = EditorsUI.getSpellingService();
if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
return null;
}
//Overridden (just) to return a PyReconciler!
IReconcilingStrategy strategy = new PyReconciler(sourceViewer, spellingService);
MonoReconciler reconciler = new MonoReconciler(strategy, false);
reconciler.setIsIncrementalReconciler(false);
reconciler.setProgressMonitor(new NullProgressMonitor());
reconciler.setDelay(500);
return reconciler;
}
示例3: getReconcilingStrategies
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入方法依赖的package包/类
public IReconcilingStrategy[] getReconcilingStrategies() {
if (store.getBoolean(Prefs.SPELLING_ENABLED)) {
SpellingService service = new SpellingService(store);
if (service.getActiveSpellingEngineDescriptor(store) != null) {
IReconcilingStrategy spellStrategy = new SpellingReconcileStrategy(viewer, service);
return new IReconcilingStrategy[] { spellStrategy };
}
}
return new IReconcilingStrategy[] { new NullReconcilingStrategy() };
}
示例4: getReconciler
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入方法依赖的package包/类
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer)
{
if (fTextEditor != null && fTextEditor.isEditable())
{
IReconcilingStrategy reconcilingStrategy = new CommonReconcilingStrategy(fTextEditor);
if (EditorsUI.getPreferenceStore().getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED))
{
SpellingService spellingService = EditorsUI.getSpellingService();
Collection<String> spellingContentTypes = getSpellingContentTypes(sourceViewer);
if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) != null
&& !spellingContentTypes.isEmpty())
{
reconcilingStrategy = new CompositeReconcilingStrategy(reconcilingStrategy,
new MultiRegionSpellingReconcileStrategy(sourceViewer, spellingService,
getConfiguredDocumentPartitioning(sourceViewer), spellingContentTypes));
}
}
CommonReconciler reconciler = new CommonReconciler(reconcilingStrategy);
reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
reconciler.setIsIncrementalReconciler(false);
reconciler.setIsAllowedToModifyDocument(false);
reconciler.setProgressMonitor(new NullProgressMonitor());
reconciler.setDelay(500);
return fReconciler = reconciler;
}
return null;
}
示例5: getReconciler
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入方法依赖的package包/类
public IReconciler getReconciler(final ISourceViewer sourceViewer) {
if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
return null;
}
SpellingService spellingService = EditorsUI.getSpellingService();
if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
return null;
}
IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, spellingService) {
@Override
protected ISpellingProblemCollector createSpellingProblemCollector() {
final ISpellingProblemCollector collector = super.createSpellingProblemCollector();
return new ISpellingProblemCollector() {
public void accept(SpellingProblem problem) {
int offset = problem.getOffset();
int length = problem.getLength();
if (sourceViewer == null) {
return;
}
IDocument document = sourceViewer.getDocument();
if (document == null) {
return;
}
String text;
try {
text = document.get(offset, length);
} catch (BadLocationException e) {
return;
}
if (new de.darwinspl.preferences.resource.dwprofile.ui.DwprofileIgnoredWordsFilter().ignoreWord(text)) {
return;
}
collector.accept(problem);
}
public void beginCollecting() {
collector.beginCollecting();
}
public void endCollecting() {
collector.endCollecting();
}
};
}
};
MonoReconciler reconciler = new MonoReconciler(strategy, false);
reconciler.setDelay(500);
return reconciler;
}
示例6: getReconciler
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入方法依赖的package包/类
public IReconciler getReconciler(final ISourceViewer sourceViewer) {
if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
return null;
}
SpellingService spellingService = EditorsUI.getSpellingService();
if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
return null;
}
IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, spellingService) {
@Override
protected ISpellingProblemCollector createSpellingProblemCollector() {
final ISpellingProblemCollector collector = super.createSpellingProblemCollector();
return new ISpellingProblemCollector() {
public void accept(SpellingProblem problem) {
int offset = problem.getOffset();
int length = problem.getLength();
if (sourceViewer == null) {
return;
}
IDocument document = sourceViewer.getDocument();
if (document == null) {
return;
}
String text;
try {
text = document.get(offset, length);
} catch (BadLocationException e) {
return;
}
if (new eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionIgnoredWordsFilter().ignoreWord(text)) {
return;
}
collector.accept(problem);
}
public void beginCollecting() {
collector.beginCollecting();
}
public void endCollecting() {
collector.endCollecting();
}
};
}
};
MonoReconciler reconciler = new MonoReconciler(strategy, false);
reconciler.setDelay(500);
return reconciler;
}
示例7: getReconciler
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入方法依赖的package包/类
public IReconciler getReconciler(final ISourceViewer sourceViewer) {
if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
return null;
}
SpellingService spellingService = EditorsUI.getSpellingService();
if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
return null;
}
IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, spellingService) {
@Override
protected ISpellingProblemCollector createSpellingProblemCollector() {
final ISpellingProblemCollector collector = super.createSpellingProblemCollector();
return new ISpellingProblemCollector() {
public void accept(SpellingProblem problem) {
int offset = problem.getOffset();
int length = problem.getLength();
if (sourceViewer == null) {
return;
}
IDocument document = sourceViewer.getDocument();
if (document == null) {
return;
}
String text;
try {
text = document.get(offset, length);
} catch (BadLocationException e) {
return;
}
if (new eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaIgnoredWordsFilter().ignoreWord(text)) {
return;
}
collector.accept(problem);
}
public void beginCollecting() {
collector.beginCollecting();
}
public void endCollecting() {
collector.endCollecting();
}
};
}
};
MonoReconciler reconciler = new MonoReconciler(strategy, false);
reconciler.setDelay(500);
return reconciler;
}
示例8: getReconciler
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入方法依赖的package包/类
public IReconciler getReconciler(final ISourceViewer sourceViewer) {
if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
return null;
}
SpellingService spellingService = EditorsUI.getSpellingService();
if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
return null;
}
IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, spellingService) {
@Override
protected ISpellingProblemCollector createSpellingProblemCollector() {
final ISpellingProblemCollector collector = super.createSpellingProblemCollector();
return new ISpellingProblemCollector() {
public void accept(SpellingProblem problem) {
int offset = problem.getOffset();
int length = problem.getLength();
if (sourceViewer == null) {
return;
}
IDocument document = sourceViewer.getDocument();
if (document == null) {
return;
}
String text;
try {
text = document.get(offset, length);
} catch (BadLocationException e) {
return;
}
if (new eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueIgnoredWordsFilter().ignoreWord(text)) {
return;
}
collector.accept(problem);
}
public void beginCollecting() {
collector.beginCollecting();
}
public void endCollecting() {
collector.endCollecting();
}
};
}
};
MonoReconciler reconciler = new MonoReconciler(strategy, false);
reconciler.setDelay(500);
return reconciler;
}
示例9: getReconciler
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入方法依赖的package包/类
public IReconciler getReconciler(final ISourceViewer sourceViewer) {
if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
return null;
}
SpellingService spellingService = EditorsUI.getSpellingService();
if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
return null;
}
IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, spellingService) {
@Override
protected ISpellingProblemCollector createSpellingProblemCollector() {
final ISpellingProblemCollector collector = super.createSpellingProblemCollector();
return new ISpellingProblemCollector() {
public void accept(SpellingProblem problem) {
int offset = problem.getOffset();
int length = problem.getLength();
if (sourceViewer == null) {
return;
}
IDocument document = sourceViewer.getDocument();
if (document == null) {
return;
}
String text;
try {
text = document.get(offset, length);
} catch (BadLocationException e) {
return;
}
if (new eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingIgnoredWordsFilter().ignoreWord(text)) {
return;
}
collector.accept(problem);
}
public void beginCollecting() {
collector.beginCollecting();
}
public void endCollecting() {
collector.endCollecting();
}
};
}
};
MonoReconciler reconciler = new MonoReconciler(strategy, false);
reconciler.setDelay(500);
return reconciler;
}
示例10: getReconciler
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入方法依赖的package包/类
public IReconciler getReconciler(final ISourceViewer sourceViewer) {
if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
return null;
}
SpellingService spellingService = EditorsUI.getSpellingService();
if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
return null;
}
IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, spellingService) {
@Override
protected ISpellingProblemCollector createSpellingProblemCollector() {
final ISpellingProblemCollector collector = super.createSpellingProblemCollector();
return new ISpellingProblemCollector() {
public void accept(SpellingProblem problem) {
int offset = problem.getOffset();
int length = problem.getLength();
if (sourceViewer == null) {
return;
}
IDocument document = sourceViewer.getDocument();
if (document == null) {
return;
}
String text;
try {
text = document.get(offset, length);
} catch (BadLocationException e) {
return;
}
if (new eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsIgnoredWordsFilter().ignoreWord(text)) {
return;
}
collector.accept(problem);
}
public void beginCollecting() {
collector.beginCollecting();
}
public void endCollecting() {
collector.endCollecting();
}
};
}
};
MonoReconciler reconciler = new MonoReconciler(strategy, false);
reconciler.setDelay(500);
return reconciler;
}
示例11: getReconciler
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入方法依赖的package包/类
public IReconciler getReconciler(final ISourceViewer sourceViewer) {
if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
return null;
}
SpellingService spellingService = EditorsUI.getSpellingService();
if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
return null;
}
IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, spellingService) {
@Override
protected ISpellingProblemCollector createSpellingProblemCollector() {
final ISpellingProblemCollector collector = super.createSpellingProblemCollector();
return new ISpellingProblemCollector() {
public void accept(SpellingProblem problem) {
int offset = problem.getOffset();
int length = problem.getLength();
if (sourceViewer == null) {
return;
}
IDocument document = sourceViewer.getDocument();
if (document == null) {
return;
}
String text;
try {
text = document.get(offset, length);
} catch (BadLocationException e) {
return;
}
if (new eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestIgnoredWordsFilter().ignoreWord(text)) {
return;
}
collector.accept(problem);
}
public void beginCollecting() {
collector.beginCollecting();
}
public void endCollecting() {
collector.endCollecting();
}
};
}
};
MonoReconciler reconciler = new MonoReconciler(strategy, false);
reconciler.setDelay(500);
return reconciler;
}