本文整理匯總了Java中org.eclipse.ui.editors.text.EditorsUI.getSpellingService方法的典型用法代碼示例。如果您正苦於以下問題:Java EditorsUI.getSpellingService方法的具體用法?Java EditorsUI.getSpellingService怎麽用?Java EditorsUI.getSpellingService使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.ui.editors.text.EditorsUI
的用法示例。
在下文中一共展示了EditorsUI.getSpellingService方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getReconciler
import org.eclipse.ui.editors.text.EditorsUI; //導入方法依賴的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
示例2: getReconciler
import org.eclipse.ui.editors.text.EditorsUI; //導入方法依賴的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;
}
示例3: getReconciler
import org.eclipse.ui.editors.text.EditorsUI; //導入方法依賴的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;
}
示例4: getReconciler
import org.eclipse.ui.editors.text.EditorsUI; //導入方法依賴的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.editors.text.EditorsUI; //導入方法依賴的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.editors.text.EditorsUI; //導入方法依賴的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.editors.text.EditorsUI; //導入方法依賴的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.editors.text.EditorsUI; //導入方法依賴的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.editors.text.EditorsUI; //導入方法依賴的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.editors.text.EditorsUI; //導入方法依賴的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.editors.text.EditorsUI; //導入方法依賴的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;
}
示例12: XtextSpellingReconcileStrategy
import org.eclipse.ui.editors.text.EditorsUI; //導入方法依賴的package包/類
protected XtextSpellingReconcileStrategy(ISourceViewer viewer) {
super(viewer, EditorsUI.getSpellingService());
spellingContext.setContentType(getContentType());
}
示例13: JavaSpellingReconcileStrategy
import org.eclipse.ui.editors.text.EditorsUI; //導入方法依賴的package包/類
/**
* Creates a new comment reconcile strategy.
*
* @param viewer the source viewer
* @param editor the text editor to operate on
*/
public JavaSpellingReconcileStrategy(ISourceViewer viewer, ITextEditor editor) {
super(viewer, EditorsUI.getSpellingService());
fEditor= editor;
}
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:11,代碼來源:JavaSpellingReconcileStrategy.java