本文整理汇总了Java中org.eclipse.ui.texteditor.spelling.SpellingService类的典型用法代码示例。如果您正苦于以下问题:Java SpellingService类的具体用法?Java SpellingService怎么用?Java SpellingService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SpellingService类属于org.eclipse.ui.texteditor.spelling包,在下文中一共展示了SpellingService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 (!EditorsUI.getPreferenceStore().getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED))
return null;
IReconcilingStrategy strategy= new SpellingReconcileStrategy(sourceViewer, EditorsUI.getSpellingService()) {
@Override
protected IContentType getContentType() {
return PROPERTIES_CONTENT_TYPE;
}
};
MonoReconciler reconciler= new MonoReconciler(strategy, false);
reconciler.setDelay(500);
return reconciler;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:17,代码来源:PropertiesFileSourceViewerConfiguration.java
示例3: propertyChange
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入依赖的package包/类
public final void propertyChange(final PropertyChangeEvent event) {
if (event.getProperty().equals(PreferenceConstants.SPELLING_LOCALE)) {
resetSpellChecker();
return;
}
if (event.getProperty().equals(PreferenceConstants.SPELLING_USER_DICTIONARY)) {
resetUserDictionary();
return;
}
if (event.getProperty().equals(PreferenceConstants.SPELLING_USER_DICTIONARY_ENCODING)) {
resetUserDictionary();
return;
}
if (event.getProperty().equals(SpellingService.PREFERENCE_SPELLING_ENABLED) && !EditorsUI.getPreferenceStore().getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
if (this == fgEngine)
SpellCheckEngine.shutdownInstance();
else
shutdown();
}
}
示例4: getReconciler
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入依赖的package包/类
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {
if (!EditorsUI.getPreferenceStore().getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED))
return null;
IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, EditorsUI.getSpellingService()) {
@Override
protected IContentType getContentType() {
return EditorConfigTextTools.EDITORCONFIG_CONTENT_TYPE;
}
};
MonoReconciler reconciler = new MonoReconciler(strategy, false);
reconciler.setDelay(500);
return reconciler;
}
示例5: 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;
}
示例6: DwprofileSourceViewerConfiguration
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入依赖的package包/类
/**
* <p>
* Creates a new editor configuration.
* </p>
*
* @param resourceProvider the provider for the resource (usually this is the
* editor)
* @param colorManager the color manager to use
*/
public DwprofileSourceViewerConfiguration(de.darwinspl.preferences.resource.dwprofile.IDwprofileResourceProvider resourceProvider, de.darwinspl.preferences.resource.dwprofile.ui.IDwprofileAnnotationModelProvider annotationModelProvider, de.darwinspl.preferences.resource.dwprofile.ui.DwprofileColorManager colorManager) {
super(de.darwinspl.preferences.resource.dwprofile.ui.DwprofileUIPlugin.getDefault().getPreferenceStore());
this.fPreferenceStore.setDefault(SpellingService.PREFERENCE_SPELLING_ENABLED, true);
this.fPreferenceStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH, 4);
this.fPreferenceStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_HYPERLINK_KEY_MODIFIER, Action.findModifierString(SWT.MOD1));
this.resourceProvider = resourceProvider;
this.annotationModelProvider = annotationModelProvider;
this.colorManager = colorManager;
}
示例7: HyexpressionSourceViewerConfiguration
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入依赖的package包/类
/**
* <p>
* Creates a new editor configuration.
* </p>
*
* @param resourceProvider the provider for the resource (usually this is the
* editor)
* @param colorManager the color manager to use
*/
public HyexpressionSourceViewerConfiguration(eu.hyvar.feature.expression.resource.hyexpression.IHyexpressionResourceProvider resourceProvider, eu.hyvar.feature.expression.resource.hyexpression.ui.IHyexpressionAnnotationModelProvider annotationModelProvider, eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionColorManager colorManager) {
super(eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionUIPlugin.getDefault().getPreferenceStore());
this.fPreferenceStore.setDefault(SpellingService.PREFERENCE_SPELLING_ENABLED, true);
this.fPreferenceStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH, 4);
this.fPreferenceStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_HYPERLINK_KEY_MODIFIER, Action.findModifierString(SWT.MOD1));
this.resourceProvider = resourceProvider;
this.annotationModelProvider = annotationModelProvider;
this.colorManager = colorManager;
}
示例8: HyvalidityformulaSourceViewerConfiguration
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入依赖的package包/类
/**
* <p>
* Creates a new editor configuration.
* </p>
*
* @param resourceProvider the provider for the resource (usually this is the
* editor)
* @param colorManager the color manager to use
*/
public HyvalidityformulaSourceViewerConfiguration(eu.hyvar.context.contextValidity.resource.hyvalidityformula.IHyvalidityformulaResourceProvider resourceProvider, eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.IHyvalidityformulaAnnotationModelProvider annotationModelProvider, eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaColorManager colorManager) {
super(eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaUIPlugin.getDefault().getPreferenceStore());
this.fPreferenceStore.setDefault(SpellingService.PREFERENCE_SPELLING_ENABLED, true);
this.fPreferenceStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH, 4);
this.fPreferenceStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_HYPERLINK_KEY_MODIFIER, Action.findModifierString(SWT.MOD1));
this.resourceProvider = resourceProvider;
this.annotationModelProvider = annotationModelProvider;
this.colorManager = colorManager;
}
示例9: HydatavalueSourceViewerConfiguration
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入依赖的package包/类
/**
* <p>
* Creates a new editor configuration.
* </p>
*
* @param resourceProvider the provider for the resource (usually this is the
* editor)
* @param colorManager the color manager to use
*/
public HydatavalueSourceViewerConfiguration(eu.hyvar.dataValues.resource.hydatavalue.IHydatavalueResourceProvider resourceProvider, eu.hyvar.dataValues.resource.hydatavalue.ui.IHydatavalueAnnotationModelProvider annotationModelProvider, eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueColorManager colorManager) {
super(eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueUIPlugin.getDefault().getPreferenceStore());
this.fPreferenceStore.setDefault(SpellingService.PREFERENCE_SPELLING_ENABLED, true);
this.fPreferenceStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH, 4);
this.fPreferenceStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_HYPERLINK_KEY_MODIFIER, Action.findModifierString(SWT.MOD1));
this.resourceProvider = resourceProvider;
this.annotationModelProvider = annotationModelProvider;
this.colorManager = colorManager;
}
示例10: HymappingSourceViewerConfiguration
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入依赖的package包/类
/**
* <p>
* Creates a new editor configuration.
* </p>
*
* @param resourceProvider the provider for the resource (usually this is the
* editor)
* @param colorManager the color manager to use
*/
public HymappingSourceViewerConfiguration(eu.hyvar.feature.mapping.resource.hymapping.IHymappingResourceProvider resourceProvider, eu.hyvar.feature.mapping.resource.hymapping.ui.IHymappingAnnotationModelProvider annotationModelProvider, eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingColorManager colorManager) {
super(eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingUIPlugin.getDefault().getPreferenceStore());
this.fPreferenceStore.setDefault(SpellingService.PREFERENCE_SPELLING_ENABLED, true);
this.fPreferenceStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH, 4);
this.fPreferenceStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_HYPERLINK_KEY_MODIFIER, Action.findModifierString(SWT.MOD1));
this.resourceProvider = resourceProvider;
this.annotationModelProvider = annotationModelProvider;
this.colorManager = colorManager;
}
示例11: HyconstraintsSourceViewerConfiguration
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入依赖的package包/类
/**
* <p>
* Creates a new editor configuration.
* </p>
*
* @param resourceProvider the provider for the resource (usually this is the
* editor)
* @param colorManager the color manager to use
*/
public HyconstraintsSourceViewerConfiguration(eu.hyvar.feature.constraint.resource.hyconstraints.IHyconstraintsResourceProvider resourceProvider, eu.hyvar.feature.constraint.resource.hyconstraints.ui.IHyconstraintsAnnotationModelProvider annotationModelProvider, eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsColorManager colorManager) {
super(eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsUIPlugin.getDefault().getPreferenceStore());
this.fPreferenceStore.setDefault(SpellingService.PREFERENCE_SPELLING_ENABLED, true);
this.fPreferenceStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH, 4);
this.fPreferenceStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_HYPERLINK_KEY_MODIFIER, Action.findModifierString(SWT.MOD1));
this.resourceProvider = resourceProvider;
this.annotationModelProvider = annotationModelProvider;
this.colorManager = colorManager;
}
示例12: HymanifestSourceViewerConfiguration
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入依赖的package包/类
/**
* <p>
* Creates a new editor configuration.
* </p>
*
* @param resourceProvider the provider for the resource (usually this is the
* editor)
* @param colorManager the color manager to use
*/
public HymanifestSourceViewerConfiguration(eu.hyvar.mspl.manifest.resource.hymanifest.IHymanifestResourceProvider resourceProvider, eu.hyvar.mspl.manifest.resource.hymanifest.ui.IHymanifestAnnotationModelProvider annotationModelProvider, eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestColorManager colorManager) {
super(eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestUIPlugin.getDefault().getPreferenceStore());
this.fPreferenceStore.setDefault(SpellingService.PREFERENCE_SPELLING_ENABLED, true);
this.fPreferenceStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH, 4);
this.fPreferenceStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_HYPERLINK_KEY_MODIFIER, Action.findModifierString(SWT.MOD1));
this.resourceProvider = resourceProvider;
this.annotationModelProvider = annotationModelProvider;
this.colorManager = colorManager;
}
示例13: TeXSpellingReconcileStrategy
import org.eclipse.ui.texteditor.spelling.SpellingService; //导入依赖的package包/类
/**
* Creates a new comment reconcile strategy.
*
* @param viewer the source viewer
* @param spellingService the spelling service to use
*/
public TeXSpellingReconcileStrategy(ISourceViewer viewer, SpellingService spellingService) {
Assert.isNotNull(viewer);
Assert.isNotNull(spellingService);
fViewer= viewer;
fSpellingService= spellingService;
fSpellingContext= new SpellingContext();
fSpellingContext.setContentType(getContentType());
}
示例14: 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() };
}
示例15: 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;
}