當前位置: 首頁>>代碼示例>>Java>>正文


Java EditorsUI.getSpellingService方法代碼示例

本文整理匯總了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;
}
 
開發者ID:ncjones,項目名稱:editorconfig-eclipse,代碼行數:17,代碼來源:EditorConfigSourceViewerConfiguration.java

示例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;
}
 
開發者ID:fabioz,項目名稱:Pydev,代碼行數:21,代碼來源:PyEditConfigurationWithoutEditor.java

示例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;
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:29,代碼來源:CommonSourceViewerConfiguration.java

示例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;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:56,代碼來源:DwprofileSourceViewerConfiguration.java

示例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;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:56,代碼來源:HyexpressionSourceViewerConfiguration.java

示例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;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:56,代碼來源:HyvalidityformulaSourceViewerConfiguration.java

示例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;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:56,代碼來源:HydatavalueSourceViewerConfiguration.java

示例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;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:56,代碼來源:HymappingSourceViewerConfiguration.java

示例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;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:56,代碼來源:HyconstraintsSourceViewerConfiguration.java

示例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;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:56,代碼來源:HymanifestSourceViewerConfiguration.java

示例12: XtextSpellingReconcileStrategy

import org.eclipse.ui.editors.text.EditorsUI; //導入方法依賴的package包/類
protected XtextSpellingReconcileStrategy(ISourceViewer viewer) {
	super(viewer, EditorsUI.getSpellingService());
	spellingContext.setContentType(getContentType());
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:5,代碼來源:XtextSpellingReconcileStrategy.java

示例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


注:本文中的org.eclipse.ui.editors.text.EditorsUI.getSpellingService方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。