當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。