本文整理汇总了Java中org.eclipse.jface.text.presentation.PresentationReconciler.setDocumentPartitioning方法的典型用法代码示例。如果您正苦于以下问题:Java PresentationReconciler.setDocumentPartitioning方法的具体用法?Java PresentationReconciler.setDocumentPartitioning怎么用?Java PresentationReconciler.setDocumentPartitioning使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.text.presentation.PresentationReconciler
的用法示例。
在下文中一共展示了PresentationReconciler.setDocumentPartitioning方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPresentationReconciler
import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
/* Créé un Reconsilier chargé de gérer les changements du document. */
PresentationReconciler reconciler = new PresentationReconciler();
/* Définition du nom du partitionnement effectué par KspDocumentSetupParticipant. */
reconciler.setDocumentPartitioning(KspRegionType.PARTITIONING);
/* Définition des scanners pour chacune des trois partitions. */
setRepairer(reconciler, commentScanner, KspRegionType.COMMENT.getContentType());
setRepairer(reconciler, stringScanner, KspRegionType.STRING.getContentType());
setRepairer(reconciler, defaultScanner, KspRegionType.DEFAULT.getContentType());
return reconciler;
}
示例2: getPresentationReconciler
import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
final PresentationReconciler reconciler = new PresentationReconciler();
reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
final SyntaxHighlighter scanner = new SyntaxHighlighter(
com.abstratt.mdd.frontend.textuml.core.TextUMLConstants.KEYWORDS);
final DefaultDamagerRepairer dr = new DefaultDamagerRepairer(scanner);
reconciler.setDamager(dr, ContentTypes.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(dr, ContentTypes.DEFAULT_CONTENT_TYPE);
// fix bug 2127735 --multiline comment is broken
final ITokenScanner commentScanner = scanner.getCommentScanner();
final DefaultDamagerRepairer commentDamagerRepairer = new DefaultDamagerRepairer(commentScanner);
reconciler.setDamager(commentDamagerRepairer, ContentTypes.COMMENT_CONTENT_TYPE);
reconciler.setRepairer(commentDamagerRepairer, ContentTypes.COMMENT_CONTENT_TYPE);
return reconciler;
}
示例3: getPresentationReconciler
import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler reconciler= new PresentationReconciler();
reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
addDamagerRepairer(reconciler, createCommentScanner(), SQLEditorCommonDocumentProvider.SQL_SINGLE_COMMENT);
addDamagerRepairer(reconciler, createMultiCommentScanner(), SQLEditorCommonDocumentProvider.SQL_MULTI_COMMENT);
addDamagerRepairer(reconciler, createCharacterStringLiteralCommentScanner(), SQLEditorCommonDocumentProvider.SQL_CHARACTER_STRING_LITERAL);
addDamagerRepairer(reconciler, createRecipeScanner(), SQLEditorCommonDocumentProvider.SQL_CODE);
return reconciler;
}
示例4: getPresentationReconciler
import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler pr = new PresentationReconciler();
pr.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
GradleCodeScanner scanner = new GradleCodeScanner();
setDamagerRepairer(pr, scanner, IDocument.DEFAULT_CONTENT_TYPE);
setDamagerRepairer(pr, new MultilineCommentScanner(scanner.getCommentAttribute()), GradlePartitionScanner.MULTILINE_COMMENT);
setDamagerRepairer(pr, new MultilineCommentScanner(scanner.getDocAttribute()), GradlePartitionScanner.GRADLEDOC);
return pr;
}
示例5: getPresentationReconciler
import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler reconciler = new PresentationReconciler();
reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
Check.isTrue(sourceViewer instanceof FtcSourceViewer);
SyntaxColoring coloring = ((FtcSourceViewer) sourceViewer).getSyntaxColoring();
addDamagerRepairer(reconciler, new FtcDamagerRepairer(coloring, new ParsedSqlTokensScanner(coloring)), IDocument.DEFAULT_CONTENT_TYPE);
DefaultDamagerRepairer commentDr = new DefaultDamagerRepairer(new CommentTokenScanner(coloring));
addDamagerRepairer(reconciler, commentDr, SqlCommentPartitionScanner.SQL_COMMENT);
return reconciler;
}
示例6: getPresentationReconciler
import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler reconciler = new FluentMkPresentationReconciler();
reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
buildRepairer(reconciler, frontMatter, Partitions.FRONT_MATTER);
buildRepairer(reconciler, commentScanner, Partitions.COMMENT);
buildRepairer(reconciler, codeScanner, Partitions.CODEBLOCK);
buildRepairer(reconciler, dotScanner, Partitions.DOTBLOCK);
buildRepairer(reconciler, mathScanner, Partitions.MATHBLOCK);
buildRepairer(reconciler, htmlScanner, Partitions.HTMLBLOCK);
buildRepairer(reconciler, markup, IDocument.DEFAULT_CONTENT_TYPE);
return reconciler;
}
示例7: getPresentationReconciler
import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler pr = new PresentationReconciler();
pr.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
setDamagerRepairer(pr, new DefaultDamagerRepairer(scanner), IDocument.DEFAULT_CONTENT_TYPE);
setDamagerRepairer(
pr, new DefaultDamagerRepairer(new MultilineCommentScanner(scanner.getCommentAttribute())),
JsPartitionScanner.MULTILINE_COMMENT);
setDamagerRepairer(
pr, new DefaultDamagerRepairer(new MultilineCommentScanner(scanner.getJsDocAttribute())),
JsPartitionScanner.JSDOC);
return pr;
}
示例8: getPresentationReconciler
import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer)
{
if (disableBackgroundReconciler)
{
return super.getPresentationReconciler(sourceViewer);
}
else
{
PresentationReconciler reconciler = new CommonPresentationReconciler();
reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
return reconciler;
}
}
示例9: getPresentationReconciler
import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler reconciler = createPresentationReconciler();
reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
setupPresentationReconciler(reconciler, sourceViewer);
return reconciler;
}