下面列出了org.eclipse.ui.texteditor.spelling.SpellingContext#setContentType ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* 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());
}
/**
* Creates a new comment reconcile strategy.
*
* @param viewer the source viewer
* @param spellingService the spelling service to use
*/
public PyReconciler(ISourceViewer viewer, SpellingService spellingService) {
Assert.isNotNull(viewer);
Assert.isNotNull(spellingService);
fViewer = viewer;
fSpellingService = spellingService;
fSpellingContext = new SpellingContext();
fSpellingContext.setContentType(getContentType());
}
public CommentSpellingReconcileStrategy(AnnotationModel annotationModel) {
this.fAnnotationModel = annotationModel;
fSpellingContext = new SpellingContext();
fSpellingContext.setContentType(Platform.getContentTypeManager().getContentType(IContentTypeManager.CT_TEXT));
}