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


Java PresentationReconciler.setDamager方法代码示例

本文整理汇总了Java中org.eclipse.jface.text.presentation.PresentationReconciler.setDamager方法的典型用法代码示例。如果您正苦于以下问题:Java PresentationReconciler.setDamager方法的具体用法?Java PresentationReconciler.setDamager怎么用?Java PresentationReconciler.setDamager使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.text.presentation.PresentationReconciler的用法示例。


在下文中一共展示了PresentationReconciler.setDamager方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getPresentationReconciler

import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的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

示例2: attachDamagerRepairer

import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
public void attachDamagerRepairer(PresentationReconciler pr) {
	KernelSyntaxDamagerRepairer ndr;
	
	ndr = new KernelSyntaxDamagerRepairer(new TextAttribute(KSC_COMMENT));
	pr.setDamager(ndr, IDocument.DEFAULT_CONTENT_TYPE);
	pr.setRepairer(ndr, IDocument.DEFAULT_CONTENT_TYPE);

	ndr = new KernelSyntaxDamagerRepairer(new TextAttribute(KSC_COMMENT));
	pr.setDamager(ndr, KSP_COMMENT);
	pr.setRepairer(ndr, KSP_COMMENT);
    
	ndr = new KernelSyntaxDamagerRepairer(new TextAttribute(KSC_STRING));
	pr.setDamager(ndr, KSP_STRING);
	pr.setRepairer(ndr, KSP_STRING);
	
	ndr = new KernelSyntaxDamagerRepairer(new TextAttribute(KSC_METADATA));
	pr.setDamager(ndr, KSP_METADATA);
	pr.setRepairer(ndr, KSP_METADATA);
}
 
开发者ID:yangyuan,项目名称:eclipse-kernelsyntax,代码行数:20,代码来源:KernelSyntaxLangShell.java

示例3: attachDamagerRepairer

import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
public void attachDamagerRepairer(PresentationReconciler pr) {
	System.out.println("pyth");
	
	KernelSyntaxDamagerRepairer ndr;
	
	ndr = new KernelSyntaxDamagerRepairer(new TextAttribute(KSC_COMMENT));
	pr.setDamager(ndr, KSP_COMMENT);
	pr.setRepairer(ndr, KSP_COMMENT);
    
	ndr = new KernelSyntaxDamagerRepairer(new TextAttribute(KSC_STRING));
	pr.setDamager(ndr, KSP_STRING);
	pr.setRepairer(ndr, KSP_STRING);
	
	ndr = new KernelSyntaxDamagerRepairer(new TextAttribute(KSC_METADATA));
	pr.setDamager(ndr, KSP_METADATA);
	pr.setRepairer(ndr, KSP_METADATA);
}
 
开发者ID:yangyuan,项目名称:eclipse-kernelsyntax,代码行数:18,代码来源:KernelSyntaxLangPython.java

示例4: setupPresentationReconciler

import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
public void setupPresentationReconciler(PresentationReconciler reconciler, ISourceViewer sourceViewer) {
	NonRuleBasedDamagerRepairer ndr = new NonRuleBasedDamagerRepairer(getToken("#text")); //$NON-NLS-1$
	reconciler.setDamager(ndr, IDocument.DEFAULT_CONTENT_TYPE);
	reconciler.setRepairer(ndr, IDocument.DEFAULT_CONTENT_TYPE);

	reconciler.setDamager(ndr, DEFAULT);
	reconciler.setRepairer(ndr, DEFAULT);

	DefaultDamagerRepairer dr = new ThemeingDamagerRepairer(getPIScanner());
	reconciler.setDamager(dr, PI);
	reconciler.setRepairer(dr, PI);

	reconciler.setDamager(dr, PROLOG);
	reconciler.setRepairer(dr, PROLOG);

	dr = new ThemeingDamagerRepairer(getDTDTagScanner());
	reconciler.setDamager(dr, TAG);
	reconciler.setRepairer(dr, TAG);

	reconciler.setDamager(dr, SECTION);
	reconciler.setRepairer(dr, SECTION);

	dr = new ThemeingDamagerRepairer(getCommentScanner());
	reconciler.setDamager(dr, COMMENT);
	reconciler.setRepairer(dr, COMMENT);
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:27,代码来源:DTDSourceConfiguration.java

示例5: setupPresentationReconciler

import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
public void setupPresentationReconciler(PresentationReconciler reconciler, ISourceViewer sourceViewer)
{
	DefaultDamagerRepairer dr = new ThemeingDamagerRepairer(new CSSCodeScannerFlex());
	reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
	reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);

	reconciler.setDamager(dr, DEFAULT);
	reconciler.setRepairer(dr, DEFAULT);

	dr = new ThemeingDamagerRepairer(getCommentScanner());
	reconciler.setDamager(dr, MULTILINE_COMMENT);
	reconciler.setRepairer(dr, MULTILINE_COMMENT);

	dr = new ThemeingDamagerRepairer(getStringScanner());
	reconciler.setDamager(dr, STRING_DOUBLE);
	reconciler.setRepairer(dr, STRING_DOUBLE);

	dr = new ThemeingDamagerRepairer(getStringScanner());
	reconciler.setDamager(dr, STRING_SINGLE);
	reconciler.setRepairer(dr, STRING_SINGLE);
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:22,代码来源:CSSSourceConfiguration.java

示例6: 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

示例7: getPresentationReconciler

import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的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

示例8: getPresentationReconciler

import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的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

示例9: addPresentation

import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
private void addPresentation(PresentationReconciler reconciler, String id, RGB rgb, int style) {
	TextAttribute textAttribute = new TextAttribute(colorManager.getColor(rgb),
			defaultTextAttribute.getBackground(), style);
	PresentationSupport presentation = new PresentationSupport(textAttribute);
	reconciler.setDamager(presentation, id);
	reconciler.setRepairer(presentation, id);
}
 
开发者ID:de-jcup,项目名称:eclipse-batch-editor,代码行数:8,代码来源:BatchSourceViewerConfiguration.java

示例10: addPresentation

import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
protected void addPresentation(PresentationReconciler reconciler, String id, RGB rgb, int style) {
	TextAttribute textAttribute = new TextAttribute(colorManager.getColor(rgb),
			defaultTextAttribute.getBackground(), style);
	PresentationSupport presentation = new PresentationSupport(textAttribute);
	reconciler.setDamager(presentation, id);
	reconciler.setRepairer(presentation, id);
}
 
开发者ID:de-jcup,项目名称:egradle,代码行数:8,代码来源:AbstractGroovySourceViewerConfiguration.java

示例11: getPresentationReconciler

import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
@Override
	public IPresentationReconciler getPresentationReconciler(ISourceViewer viewer) {
		PresentationReconciler reconciler = new PresentationReconciler();
		DefaultDamagerRepairer repairer = new DefaultDamagerRepairer(new 
				EiffelCodeScanner(new EiffelColorProvider()));
		reconciler.setDamager(repairer, IDocument.DEFAULT_CONTENT_TYPE);
		reconciler.setRepairer(repairer, IDocument.DEFAULT_CONTENT_TYPE);
//		reconciler.setRepairer(repairer, EiffelPartitionScanner.SINGLELINE_COMMENT);
//		reconciler.setRepairer(repairer, EiffelPartitionScanner.MULTILINE_COMMENT);
//		reconciler.setRepairer(repairer, EiffelPartitionScanner.STRING);
		
		return reconciler;
	}
 
开发者ID:Imhotup,项目名称:LibertyEiffel-Eclipse-Plugin,代码行数:14,代码来源:EiffelSourceViewerConfiguration.java

示例12: getPresentationReconciler

import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
	
	PresentationReconciler reconciler = new PresentationReconciler();
	DefaultDamagerRepairer repairer = new DefaultDamagerRepairer(getScanner());
	reconciler.setDamager(repairer, IDocument.DEFAULT_CONTENT_TYPE);
	reconciler.setRepairer(repairer, IDocument.DEFAULT_CONTENT_TYPE);
	
	return reconciler;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:10,代码来源:DwprofileSourceViewerConfiguration.java

示例13: getPresentationReconciler

import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
/**
 * This registers one damager repairer for all content in the source viewer.
 * The damager-repairer scans the content for TLA keywords and sets them to the
 * same color used in the tla editor.
 */
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer)
{
    PresentationReconciler reconciler = new PresentationReconciler();

    DefaultDamagerRepairer dr = new DefaultDamagerRepairer(TLAEditorActivator.getDefault().getTLACodeScanner());
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);

    return reconciler;
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:16,代码来源:ObligationSourceViewerConfiguration.java

示例14: getPresentationReconciler

import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
	if (preferenceStore.getBoolean(TypeScriptUIPreferenceConstants.USE_TEXMATE_FOR_SYNTAX_COLORING)) {
		// Advanced Syntax coloration with TextMate
		return new TMPresentationReconciler();
	}
	// Use classic Eclipse ITokenScaner.
	PresentationReconciler reconciler = (PresentationReconciler) super.getPresentationReconciler(sourceViewer);
	DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getJSXScanner());
	reconciler.setDamager(dr, IJSXPartitions.JSX);
	reconciler.setRepairer(dr, IJSXPartitions.JSX);

	return reconciler;
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:15,代码来源:TypeScriptSourceViewerConfiguration.java

示例15: createAndInstallPresentationReconciler

import org.eclipse.jface.text.presentation.PresentationReconciler; //导入方法依赖的package包/类
private void createAndInstallPresentationReconciler() {
    presentationReconciler = new PresentationReconciler();
    DamageRepairer dr = new DamageRepairer(new DynamicRuleBasedScanner(store.getString(ILogViewerConstants.PREF_COLORING_ITEMS)));
    presentationReconciler.setDamager(dr,IDocument.DEFAULT_CONTENT_TYPE);
    presentationReconciler.setRepairer(dr,IDocument.DEFAULT_CONTENT_TYPE);
    presentationReconciler.install(txtViewer);
}
 
开发者ID:anb0s,项目名称:LogViewer,代码行数:8,代码来源:LogFileViewer.java


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