当前位置: 首页>>代码示例>>Java>>正文


Java PresentationReconciler.setDocumentPartitioning方法代码示例

本文整理汇总了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;
}
 
开发者ID:sebez,项目名称:vertigo-chroma-kspplugin,代码行数:17,代码来源:KspSourceViewerConfiguration.java

示例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;
}
 
开发者ID:abstratt,项目名称:textuml,代码行数:18,代码来源:TextUMLSourceViewerConfiguration.java

示例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;
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:13,代码来源:SQLEditorSourceViewerConfiguration.java

示例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;
}
 
开发者ID:Nodeclipse,项目名称:GradleEditor,代码行数:12,代码来源:NodeSourceViewerConfiguration.java

示例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;
}
 
开发者ID:curiosag,项目名称:ftc,代码行数:16,代码来源:FtcSourceViewerConfiguration.java

示例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;
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:16,代码来源:FluentMkSourceViewerConfiguration.java

示例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;
}
 
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:14,代码来源:JsSourceViewerConfiguration.java

示例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;
	}
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:15,代码来源:CommonSourceViewerConfiguration.java

示例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;
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:8,代码来源:AbstractSimpleLangSourceViewerConfiguration.java


注:本文中的org.eclipse.jface.text.presentation.PresentationReconciler.setDocumentPartitioning方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。