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


Java IPresentationReconciler類代碼示例

本文整理匯總了Java中org.eclipse.jface.text.presentation.IPresentationReconciler的典型用法代碼示例。如果您正苦於以下問題:Java IPresentationReconciler類的具體用法?Java IPresentationReconciler怎麽用?Java IPresentationReconciler使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IPresentationReconciler類屬於org.eclipse.jface.text.presentation包,在下文中一共展示了IPresentationReconciler類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getPresentationReconciler

import org.eclipse.jface.text.presentation.IPresentationReconciler; //導入依賴的package包/類
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
	PresentationReconciler reconciler = new PresentationReconciler();

	addDefaultPresentation(reconciler);

	addPresentation(reconciler, JAVA_KEYWORD.getId(), getPreferences().getColor(COLOR_JAVA_KEYWORD), SWT.BOLD);
	addPresentation(reconciler, GROOVY_KEYWORD.getId(), getPreferences().getColor(COLOR_GROOVY_KEYWORD), SWT.BOLD);
	// Groovy provides different strings: simple and GStrings, so we use
	// separate colors:
	addPresentation(reconciler, STRING.getId(), getPreferences().getColor(COLOR_NORMAL_STRING), SWT.NONE);
	addPresentation(reconciler, GSTRING.getId(), getPreferences().getColor(COLOR_GSTRING), SWT.NONE);

	addPresentation(reconciler, COMMENT.getId(), getPreferences().getColor(COLOR_COMMENT), SWT.NONE);
	addPresentation(reconciler, ANNOTATION.getId(), getPreferences().getColor(COLOR_ANNOTATION), SWT.NONE);
	addPresentation(reconciler, GROOVY_DOC.getId(), getPreferences().getColor(COLOR_GROOVY_DOC), SWT.NONE);
	addPresentation(reconciler, JENKINS_KEYWORD.getId(), getPreferences().getColor(COLOR_JENKINS_KEYWORDS),
			SWT.BOLD);

	addPresentation(reconciler, JENKINS_VARIABLE.getId(), getPreferences().getColor(COLOR_JENKINS_VARIABLES),
			SWT.ITALIC);
	addPresentation(reconciler, JAVA_LITERAL.getId(), getPreferences().getColor(COLOR_JAVA_LITERAL), SWT.BOLD);
	return reconciler;
}
 
開發者ID:de-jcup,項目名稱:eclipse-jenkins-editor,代碼行數:25,代碼來源:JenkinsSourceViewerConfiguration.java

示例2: getPresentationReconciler

import org.eclipse.jface.text.presentation.IPresentationReconciler; //導入依賴的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

示例3: getTMPresentationReconciler

import org.eclipse.jface.text.presentation.IPresentationReconciler; //導入依賴的package包/類
/**
 * Returns the {@link TMPresentationReconciler} of the given text viewer and
 * null otherwise.
 * 
 * @param textViewer
 * @return the {@link TMPresentationReconciler} of the given text viewer and
 *         null otherwise.
 */
public static TMPresentationReconciler getTMPresentationReconciler(ITextViewer textViewer) {
	try {
		Field field = SourceViewer.class.getDeclaredField("fPresentationReconciler");
		if (field != null) {
			field.setAccessible(true);
			IPresentationReconciler presentationReconciler = (IPresentationReconciler) field.get(textViewer);
			return presentationReconciler instanceof TMPresentationReconciler
					? (TMPresentationReconciler) presentationReconciler
					: null;
		}
	} catch (Exception e) {

	}
	return null;
}
 
開發者ID:eclipse,項目名稱:tm4e,代碼行數:24,代碼來源:TMPresentationReconciler.java

示例4: getPresentationReconciler

import org.eclipse.jface.text.presentation.IPresentationReconciler; //導入依賴的package包/類
@Override public IPresentationReconciler getPresentationReconciler(final ISourceViewer sourceViewer)
{
	final PresentationReconciler reconciler													= new PresentationReconciler();

	DefaultDamagerRepairer dr;

	dr																						= new RuleBasedDamagerRepairer(this.getDMScanner());
	reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
	reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);

	dr																						= new RuleBasedDamagerRepairer(this.getDMStringScanner());
	reconciler.setDamager(dr, DMPartitionScanner.DM_STRING);
	reconciler.setRepairer(dr, DMPartitionScanner.DM_STRING);

	NonRuleBasedDamagerRepairer ndr;

	ndr																						= new NonRuleBasedDamagerRepairer(new TextAttribute(this.colorManager.getColor(IDMColorConstants.DM_COMMENT)));
	reconciler.setDamager(ndr, DMPartitionScanner.DM_COMMENT);
	reconciler.setRepairer(ndr, DMPartitionScanner.DM_COMMENT);

	return reconciler;
}
 
開發者ID:nullquery,項目名稱:BYONDclipse,代碼行數:23,代碼來源:DMConfiguration.java

示例5: getPresentationReconciler

import org.eclipse.jface.text.presentation.IPresentationReconciler; //導入依賴的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

示例6: getPresentationReconciler

import org.eclipse.jface.text.presentation.IPresentationReconciler; //導入依賴的package包/類
public IPresentationReconciler getPresentationReconciler(
		ISourceViewer sourceViewer )
{
	PresentationReconciler reconciler = new PresentationReconciler( );
	
	NonRuleBasedDamagerRepairer dr = new NonRuleBasedDamagerRepairer( quoteString );
	reconciler.setDamager( dr, SQLPartitionScanner.QUOTE_STRING );
	reconciler.setRepairer( dr, SQLPartitionScanner.QUOTE_STRING );
	
	
	dr = new NonRuleBasedDamagerRepairer( comment );
	reconciler.setDamager( dr, SQLPartitionScanner.COMMENT );
	reconciler.setRepairer( dr, SQLPartitionScanner.COMMENT );
	
	
	DefaultDamagerRepairer  ddr = new DefaultDamagerRepairer( new SQLKeywordScanner( ) );
	reconciler.setDamager( ddr, IDocument.DEFAULT_CONTENT_TYPE );
	reconciler.setRepairer( ddr, IDocument.DEFAULT_CONTENT_TYPE );

	return reconciler;
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:22,代碼來源:SQLSourceViewerConfiguration.java

示例7: getPresentationReconciler

import org.eclipse.jface.text.presentation.IPresentationReconciler; //導入依賴的package包/類
/**
 * @see SourceViewerConfiguration#getPresentationReconciler(ISourceViewer)
 */
public IPresentationReconciler getPresentationReconciler(
		ISourceViewer sourceViewer )
{
	PresentationReconciler reconciler = new PresentationReconciler( );

	DefaultDamagerRepairer dr = new DefaultDamagerRepairer( getDefaultScanner( ) );
	reconciler.setDamager( dr, IDocument.DEFAULT_CONTENT_TYPE );
	reconciler.setRepairer( dr, IDocument.DEFAULT_CONTENT_TYPE );

	NonRuleBasedDamagerRepairer commentRepairer = new NonRuleBasedDamagerRepairer( UIUtil.getAttributeFor( ReportPlugin.EXPRESSION_COMMENT_COLOR_PREFERENCE ) );
	reconciler.setDamager( commentRepairer, JSPartitionScanner.JS_COMMENT );
	reconciler.setRepairer( commentRepairer, JSPartitionScanner.JS_COMMENT );

	NonRuleBasedDamagerRepairer stringRepairer = new NonRuleBasedDamagerRepairer( UIUtil.getAttributeFor( ReportPlugin.EXPRESSION_STRING_COLOR_PREFERENCE ) );
	reconciler.setDamager( stringRepairer, JSPartitionScanner.JS_STRING );
	reconciler.setRepairer( stringRepairer, JSPartitionScanner.JS_STRING );

	NonRuleBasedDamagerRepairer keywordRepairer = new NonRuleBasedDamagerRepairer( UIUtil.getAttributeFor( ReportPlugin.EXPRESSION_KEYWORD_COLOR_PREFERENCE ) );
	reconciler.setDamager( keywordRepairer, JSPartitionScanner.JS_KEYWORD );
	reconciler.setRepairer( keywordRepairer, JSPartitionScanner.JS_KEYWORD );

	return reconciler;
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:27,代碼來源:JSSourceViewerConfiguration.java

示例8: getPresentationReconciler

import org.eclipse.jface.text.presentation.IPresentationReconciler; //導入依賴的package包/類
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
	
	DSLPresentationReconciler reconciler = new DSLPresentationReconciler(sourceViewer);
	ITokenScanner scanner = new TokenScanner();
	String contentType = IDocument.DEFAULT_CONTENT_TYPE;
	// TODO preference store
	long delay = 300;
	DefaultDamagerRepairer dr = new DelayedDamagerRepairer(scanner, reconciler, delay);
	reconciler.setDamager(dr, contentType);
	reconciler.setRepairer(dr, contentType);
	
	// IResource file = this.extractResource(this.editor);
	
	return reconciler;
}
 
開發者ID:ngs-doo,項目名稱:dsl-compiler-client,代碼行數:17,代碼來源:DSLSourceViewerConfiguration.java

示例9: getPresentationReconciler

import org.eclipse.jface.text.presentation.IPresentationReconciler; //導入依賴的package包/類
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer)
{

  PresentationReconciler reconciler = (PresentationReconciler)super
      .getPresentationReconciler(sourceViewer);

  // DefaultDamagerRepairer dr = new DefaultDamagerRepairer(new
  // SyntaxOffKeywordScanner(getColorManager(), getPreferenceStore()));
  // reconciler.setDamager(dr, CommonDocumentPartitionScanner.KEYWORD);
  // reconciler.setRepairer(dr, CommonDocumentPartitionScanner.KEYWORD);
  // DefaultDamagerRepairer dr = new DefaultDamagerRepairer(new
  // PreprocessorWithLeadingDollarScanner(getColorManager(),
  // getPreferenceStore()));
  // reconciler.setDamager(dr,
  // CommonDocumentPartitionScanner.PREPROCESSOR_WITH_LEADING$);
  // reconciler.setRepairer(dr,
  // CommonDocumentPartitionScanner.PREPROCESSOR_WITH_LEADING$);
  // dr = new DefaultDamagerRepairer(new
  // SyntaxOffKeywordScanner(getColorManager(), getPreferenceStore()));
  // reconciler.setDamager(dr, KEYWORD);
  // reconciler.setRepairer(dr, KEYWORD);

  return reconciler;

}
 
開發者ID:matthias-wolff,項目名稱:dLabPro-Plugin,代碼行數:26,代碼來源:DEFSourceViewerConfig.java

示例10: getPresentationReconciler

import org.eclipse.jface.text.presentation.IPresentationReconciler; //導入依賴的package包/類
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
	PresentationReconciler reconciler = new PresentationReconciler();

	addDefaultPresentation(reconciler);
	
	addPresentation(reconciler, HERE_DOCUMENT.getId(), getPreferences().getColor(COLOR_HEREDOCS),SWT.ITALIC);
	addPresentation(reconciler, HERE_STRING.getId(), getPreferences().getColor(COLOR_HERESTRINGS),SWT.ITALIC);
	
	addPresentation(reconciler, BASH_KEYWORD.getId(), getPreferences().getColor(COLOR_BASH_KEYWORD),SWT.BOLD);
	addPresentation(reconciler, BASH_SYSTEM_KEYWORD.getId(), getPreferences().getColor(COLOR_BASH_KEYWORD),SWT.BOLD);

	// Groovy provides different strings: simple and GStrings, so we use separate colors:
	addPresentation(reconciler, SINGLE_STRING.getId(), getPreferences().getColor(COLOR_NORMAL_STRING),SWT.NONE);
	addPresentation(reconciler, DOUBLE_STRING.getId(), getPreferences().getColor(COLOR_GSTRING),SWT.NONE);
	addPresentation(reconciler, BACKTICK_STRING.getId(), getPreferences().getColor(COLOR_BSTRING),SWT.NONE);
	
	addPresentation(reconciler, COMMENT.getId(), getPreferences().getColor(COLOR_COMMENT),SWT.NONE);
	addPresentation(reconciler, PARAMETER.getId(), getPreferences().getColor(COLOR_PARAMETERS),SWT.NONE);
	addPresentation(reconciler, INCLUDE_KEYWORD.getId(), getPreferences().getColor(COLOR_INCLUDE_KEYWORD),SWT.BOLD);
	addPresentation(reconciler, BASH_COMMAND.getId(), getPreferences().getColor(COLOR_BASH_COMMAND),SWT.BOLD|SWT.NONE);
	
	
	addPresentation(reconciler, VARIABLES.getId(), getPreferences().getColor(COLOR_KNOWN_VARIABLES),SWT.NONE);
	addPresentation(reconciler, KNOWN_VARIABLES.getId(), getPreferences().getColor(COLOR_KNOWN_VARIABLES),SWT.NONE);
	
	return reconciler;
}
 
開發者ID:de-jcup,項目名稱:eclipse-bash-editor,代碼行數:29,代碼來源:BashSourceViewerConfiguration.java

示例11: getPresentationReconciler

import org.eclipse.jface.text.presentation.IPresentationReconciler; //導入依賴的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

示例12: getPresentationReconciler

import org.eclipse.jface.text.presentation.IPresentationReconciler; //導入依賴的package包/類
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer viewer) {
	// Defines a TextMate Presentation reconcilier
	TMPresentationReconciler reconciler = new TMPresentationReconciler();
	// Set the Angular2 grammar
	reconciler.setGrammar(getGrammar());
	return reconciler;
}
 
開發者ID:eclipse,項目名稱:tm4e,代碼行數:9,代碼來源:Angular2ViewerConfiguration.java

示例13: getPresentationReconciler

import org.eclipse.jface.text.presentation.IPresentationReconciler; //導入依賴的package包/類
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer viewer) {
	// Defines a TextMate Presentation reconcilier
	TMPresentationReconciler reconciler = new TMPresentationReconciler();
	// Set the TypeScript grammar
	reconciler.setGrammar(getGrammar());
	return reconciler;
}
 
開發者ID:eclipse,項目名稱:tm4e,代碼行數:9,代碼來源:JSXViewerConfiguration.java

示例14: getPresentationReconciler

import org.eclipse.jface.text.presentation.IPresentationReconciler; //導入依賴的package包/類
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer viewer) {
	// Defines a TextMate Presentation reconcilier
	TMPresentationReconciler reconciler = new TMPresentationReconciler();
	// Set the TypeScript grammar
	reconciler.setGrammar(getGrammar());
	//reconciler.setThemeId(ThemeIdConstants.Monokai);
	return reconciler;
}
 
開發者ID:eclipse,項目名稱:tm4e,代碼行數:10,代碼來源:TypeScriptViewerConfiguration.java

示例15: getPresentationReconciler

import org.eclipse.jface.text.presentation.IPresentationReconciler; //導入依賴的package包/類
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
	PresentationReconciler reconciler = new PresentationReconciler();

	addDefaultPresentation(reconciler);

	addPresentation(reconciler, JAVA_KEYWORD.getId(), getPreferences().getColor(COLOR_JAVA_KEYWORD), SWT.BOLD);
	addPresentation(reconciler, GROOVY_KEYWORD.getId(), getPreferences().getColor(COLOR_GROOVY_KEYWORD), SWT.BOLD);
	// Groovy provides different strings: simple and GStrings, so we use
	// separate colors:
	addPresentation(reconciler, STRING.getId(), getPreferences().getColor(COLOR_NORMAL_STRING), SWT.NONE);
	addPresentation(reconciler, GSTRING.getId(), getPreferences().getColor(COLOR_GSTRING), SWT.NONE);

	addPresentation(reconciler, COMMENT.getId(), getPreferences().getColor(COLOR_COMMENT), SWT.NONE);
	addPresentation(reconciler, ANNOTATION.getId(), getPreferences().getColor(COLOR_ANNOTATION), SWT.NONE);
	addPresentation(reconciler, GROOVY_DOC.getId(), getPreferences().getColor(COLOR_GROOVY_DOC), SWT.NONE);
	addPresentation(reconciler, GRADLE_APPLY_KEYWORD.getId(), getPreferences().getColor(COLOR_GRADLE_APPLY_KEYWORD),
			SWT.BOLD);
	addPresentation(reconciler, GRADLE_KEYWORD.getId(), getPreferences().getColor(COLOR_GRADLE_OTHER_KEYWORD),
			SWT.BOLD);
	addPresentation(reconciler, GRADLE_TASK_KEYWORD.getId(), getPreferences().getColor(COLOR_GRADLE_TASK_KEYWORD),
			SWT.BOLD | SWT.ITALIC);

	addPresentation(reconciler, GRADLE_VARIABLE.getId(), getPreferences().getColor(COLOR_GRADLE_VARIABLE),
			SWT.ITALIC);
	addPresentation(reconciler, JAVA_LITERAL.getId(), getPreferences().getColor(COLOR_JAVA_LITERAL), SWT.BOLD);
	return reconciler;
}
 
開發者ID:de-jcup,項目名稱:egradle,代碼行數:29,代碼來源:GradleSourceViewerConfiguration.java


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