Java 类org.eclipse.jface.text.rules.DefaultDamagerRepairer 实例源码

项目:BYONDclipse    文件:DMConfiguration.java   
@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;
}
项目:APICloud-Studio    文件:DTDSourceConfiguration.java   
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);
}
项目:APICloud-Studio    文件:CSSSourceConfiguration.java   
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);
}
项目:textuml    文件:TextUMLSourceViewerConfiguration.java   
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;
}
项目:birt    文件:SQLSourceViewerConfiguration.java   
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;
}
项目:birt    文件:JSSourceViewerConfiguration.java   
/**
 * @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;
}
项目:dsl-compiler-client    文件:DSLSourceViewerConfiguration.java   
@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;
}
项目:LibertyEiffel-Eclipse-Plugin    文件:EiffelSourceViewerConfiguration.java   
@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;
    }
项目:DarwinSPL    文件:DwprofileSourceViewerConfiguration.java   
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;
}
项目:DarwinSPL    文件:HyexpressionSourceViewerConfiguration.java   
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;
}
项目:DarwinSPL    文件:HyvalidityformulaSourceViewerConfiguration.java   
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;
}
项目:DarwinSPL    文件:HydatavalueSourceViewerConfiguration.java   
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;
}
项目:DarwinSPL    文件:HymappingSourceViewerConfiguration.java   
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;
}
项目:DarwinSPL    文件:HyconstraintsSourceViewerConfiguration.java   
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;
}
项目:DarwinSPL    文件:HymanifestSourceViewerConfiguration.java   
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;
}
项目:ftc    文件:FtcSourceViewerConfiguration.java   
@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;
}
项目:tlaplus    文件:ObligationSourceViewerConfiguration.java   
/**
 * 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;
}
项目:typescript.java    文件:TypeScriptSourceViewerConfiguration.java   
@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;
}
项目:umple    文件:UMPConfiguration.java   
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    PresentationReconciler reconciler = new PresentationReconciler();

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

    return reconciler;
}
项目:gwt-eclipse-plugin    文件:GWTSourceViewerConfiguration.java   
@Override
public IPresentationReconciler getPresentationReconciler(
    ISourceViewer sourceViewer) {
  PresentationReconciler reconciler = (PresentationReconciler) super.getPresentationReconciler(sourceViewer);

  DefaultDamagerRepairer dr = new DefaultDamagerRepairer(jsniScanner);
  reconciler.setDamager(dr, GWTPartitions.JSNI_METHOD);
  reconciler.setRepairer(dr, GWTPartitions.JSNI_METHOD);

  return reconciler;
}
项目:eclipse-kernelsyntax    文件:KernelSyntaxSourceViewerConfiguration.java   
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
        PresentationReconciler pr = new PresentationReconciler();
        ksl.attachDamagerRepairer(pr);
        DefaultDamagerRepairer ddr = new DefaultDamagerRepairer(new KernelSyntaxRuleBasedScanner(ksl));
        pr.setRepairer(ddr, IDocument.DEFAULT_CONTENT_TYPE);
        pr.setDamager(ddr, IDocument.DEFAULT_CONTENT_TYPE);
        return pr;
}
项目:gama    文件:CSVTextSourceViewerConfiguration.java   
@Override
public IPresentationReconciler getPresentationReconciler(
        ISourceViewer sourceViewer) {
    PresentationReconciler reconciler = new PresentationReconciler();
    /*
     * Reconciler configuration
     */
    DefaultDamagerRepairer dr = new DefaultDamagerRepairer(new CSVTokenScanner(m_delimiter));
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
    return reconciler;
}
项目:chromedevtools    文件:JsSourceViewerConfiguration.java   
@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;
}
项目:chromedevtools    文件:JsSourceViewerConfiguration.java   
private void setDamagerRepairer(
    PresentationReconciler pr,
    DefaultDamagerRepairer damagerRepairer,
    String tokenType) {
  pr.setDamager(damagerRepairer, tokenType);
  pr.setRepairer(damagerRepairer, tokenType);
}
项目:APICloud-Studio    文件:SVGSourceConfiguration.java   
public void setupPresentationReconciler(PresentationReconciler reconciler, ISourceViewer sourceViewer)
{
    JSSourceConfiguration.getDefault().setupPresentationReconciler(reconciler, sourceViewer);
    CSSSourceConfiguration.getDefault().setupPresentationReconciler(reconciler, sourceViewer);

    DefaultDamagerRepairer dr = new ThemeingDamagerRepairer(getXMLScanner());
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setDamager(dr, DEFAULT);
    reconciler.setRepairer(dr, DEFAULT);

    DefaultDamagerRepairer preprocessorScanner = new ThemeingDamagerRepairer(getPreProcessorScanner());
    reconciler.setDamager(preprocessorScanner, PRE_PROCESSOR);
    reconciler.setRepairer(preprocessorScanner, PRE_PROCESSOR);

    DefaultDamagerRepairer cdataScanner = new ThemeingDamagerRepairer(getCDATAScanner());
    reconciler.setDamager(cdataScanner, CDATA);
    reconciler.setRepairer(cdataScanner, CDATA);

    DefaultDamagerRepairer tagScanner = new ThemeingDamagerRepairer(getXMLTagScanner());
    reconciler.setDamager(tagScanner, SCRIPT);
    reconciler.setRepairer(tagScanner, SCRIPT);
    reconciler.setDamager(tagScanner, STYLE);
    reconciler.setRepairer(tagScanner, STYLE);
    reconciler.setDamager(tagScanner, TAG);
    reconciler.setRepairer(tagScanner, TAG);

    DefaultDamagerRepairer commentScanner = new ThemeingDamagerRepairer(getCommentScanner());
    reconciler.setDamager(commentScanner, XMLSourceConfiguration.COMMENT);
    reconciler.setRepairer(commentScanner, XMLSourceConfiguration.COMMENT);
}
项目:APICloud-Studio    文件:XMLSourceConfiguration.java   
public void setupPresentationReconciler(PresentationReconciler reconciler, ISourceViewer sourceViewer)
{
    DTDSourceConfiguration.getDefault().setupPresentationReconciler(reconciler, sourceViewer);

    DefaultDamagerRepairer dr = new ThemeingDamagerRepairer(getXMLScanner());
    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(getPreProcessorScanner());
    reconciler.setDamager(dr, PRE_PROCESSOR);
    reconciler.setRepairer(dr, PRE_PROCESSOR);

    dr = new ThemeingDamagerRepairer(getCDATAScanner());
    reconciler.setDamager(dr, CDATA);
    reconciler.setRepairer(dr, CDATA);

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

    dr = new ThemeingDamagerRepairer(getCommentScanner());
    reconciler.setDamager(dr, COMMENT);
    reconciler.setRepairer(dr, COMMENT);
}
项目:APICloud-Studio    文件:JSSourceConfiguration.java   
public void setupPresentationReconciler(PresentationReconciler reconciler, ISourceViewer sourceViewer)
{
    DefaultDamagerRepairer dr = new ThemeingDamagerRepairer(getCodeScanner());
    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(getJSDocScanner());
    reconciler.setDamager(dr, JS_DOC);
    reconciler.setRepairer(dr, JS_DOC);

    dr = new ThemeingDamagerRepairer(getMultiLineCommentScanner());
    reconciler.setDamager(dr, JS_MULTILINE_COMMENT);
    reconciler.setRepairer(dr, JS_MULTILINE_COMMENT);

    dr = new ThemeingDamagerRepairer(getSingleQuotedStringScanner());
    reconciler.setDamager(dr, STRING_SINGLE);
    reconciler.setRepairer(dr, STRING_SINGLE);

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

    dr = new ThemeingDamagerRepairer(getSingleLineCommentScanner());
    reconciler.setDamager(dr, JS_SINGLELINE_COMMENT);
    reconciler.setRepairer(dr, JS_SINGLELINE_COMMENT);

    dr = new ThemeingDamagerRepairer(getRegexpScanner());
    reconciler.setDamager(dr, JS_REGEXP);
    reconciler.setRepairer(dr, JS_REGEXP);
}
项目:APICloud-Studio    文件:CompositeSourceViewerConfiguration.java   
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    PresentationReconciler reconciler = (PresentationReconciler) super.getPresentationReconciler(sourceViewer);

    DefaultDamagerRepairer dr = new ThemeingDamagerRepairer(getStartEndTokenScanner());
    reconciler.setDamager(dr, CompositePartitionScanner.START_SWITCH_TAG);
    reconciler.setRepairer(dr, CompositePartitionScanner.START_SWITCH_TAG);
    reconciler.setDamager(dr, CompositePartitionScanner.END_SWITCH_TAG);
    reconciler.setRepairer(dr, CompositePartitionScanner.END_SWITCH_TAG);

    defaultSourceViewerConfiguration.setupPresentationReconciler(reconciler, sourceViewer);
    primarySourceViewerConfiguration.setupPresentationReconciler(reconciler, sourceViewer);

    return reconciler;
}
项目:EclipseEditorPluginExample    文件:ExampleSourceViewerConfig.java   
/**
 * Define reconciler for MyEditor
 */
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
  PresentationReconciler reconciler = new PresentationReconciler();
  DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getTagScanner());
  reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
  reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
  return reconciler;
}
项目:sadlos2    文件:UrlListSourceViewerConfig.java   
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer){
    PresentationReconciler reconciler = new PresentationReconciler();
    DefaultDamagerRepairer dr =
            new DefaultDamagerRepairer(getUrlScanner());
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
    return reconciler;
}
项目:Eclipse-Markdown-Editor-Plugin    文件:MDConfiguration.java   
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    MDScanner scanner = new MDScanner(colorManager);
    PresentationReconciler pr = (PresentationReconciler) super.getPresentationReconciler(sourceViewer); // FIXME
    DefaultDamagerRepairer ddr = new DefaultDamagerRepairer(scanner);
    pr.setRepairer(ddr, IDocument.DEFAULT_CONTENT_TYPE);
    pr.setDamager(ddr, IDocument.DEFAULT_CONTENT_TYPE);
    return pr;
}
项目:eclipsensis    文件:InstallOptionsSourceViewerConfiguration.java   
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer)
{
    PresentationReconciler reconciler = new PresentationReconciler();
    reconciler.setDocumentPartitioning(InstallOptionsPartitionScanner.INSTALLOPTIONS_PARTITIONING);
    DefaultDamagerRepairer dr = new InstallOptionsDamagerRepairer(new InstallOptionsCommentScanner());
    reconciler.setDamager(dr, InstallOptionsPartitionScanner.INSTALLOPTIONS_COMMENT);
    reconciler.setRepairer(dr, InstallOptionsPartitionScanner.INSTALLOPTIONS_COMMENT);

    dr = new InstallOptionsDamagerRepairer(new InstallOptionsRuleBasedScanner());
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);

    return reconciler;
}
项目:myLOGO4Eclipse    文件:LogoScriptSourceViewerConfiguration.java   
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    PresentationReconciler reconciler = new PresentationReconciler();
    ITokenScanner tokenScanner = createTokenScanner();
    DefaultDamagerRepairer defaultDamagerRepairer = new DefaultDamagerRepairer(tokenScanner);
    reconciler.setDamager(defaultDamagerRepairer, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(defaultDamagerRepairer, IDocument.DEFAULT_CONTENT_TYPE);
    return reconciler;
}
项目:wt-studio    文件:JsonSourceViewerConfiguration.java   
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    PresentationReconciler reconciler= new PresentationReconciler();
    DefaultDamagerRepairer dr= new DefaultDamagerRepairer(jsonScanner);
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
    return reconciler;
}
项目:goclipse    文件:AbstractSimpleLangSourceViewerConfiguration.java   
protected void setupPresentationReconciler(PresentationReconciler reconciler, ISourceViewer sourceViewer) {
    // Must be called from UI thread
    assertTrue(Display.getCurrent() != null);

    // Create a token registry for given sourceViewer
    TokenRegistry tokenRegistry = new TokenRegistry(colorManager, stylingPrefs) {
        @Override
        protected void handleTokenModified(Token token) {
            sourceViewer.invalidateTextPresentation();
        }
    };
    addConfigurationScopedOwned(sourceViewer, tokenRegistry);

    ArrayList2<AbstractLangScanner> scanners = new ArrayList2<>();

    for(LangPartitionTypes partitionType : getPartitionTypes()) {

        String contentType = partitionType.getId();
        AbstractLangScanner scanner = createScannerFor(Display.getCurrent(), partitionType, tokenRegistry);
        scanners.add(scanner);

        DefaultDamagerRepairer dr = getDamagerRepairer(scanner, contentType);
        reconciler.setDamager(dr, contentType);
        reconciler.setRepairer(dr, contentType);
    }

}
项目:goclipse    文件:AbstractLangBasicSourceViewerConfiguration.java   
protected void setupPresentationReconciler(PresentationReconciler reconciler, ISourceViewer sourceViewer) {
    // Must be called from UI thread
    assertTrue(Display.getCurrent() != null);

    // Create a token registry for given sourceViewer
    TokenRegistry tokenRegistry = new TokenRegistry(colorManager, stylingPrefs) {
        @Override
        protected void handleTokenModified(Token token) {
            sourceViewer.invalidateTextPresentation();
        }
    };
    addConfigurationScopedOwned(sourceViewer, tokenRegistry);

    ArrayList2<AbstractLangScanner> scanners = new ArrayList2<>();

    for(LangPartitionTypes partitionType : getPartitionTypes()) {

        String contentType = partitionType.getId();
        AbstractLangScanner scanner = createScannerFor(Display.getCurrent(), partitionType, tokenRegistry);
        scanners.add(scanner);

        DefaultDamagerRepairer dr = getDamagerRepairer(scanner, contentType);
        reconciler.setDamager(dr, contentType);
        reconciler.setRepairer(dr, contentType);
    }

}
项目:eclipse-batch-editor    文件:BatchSourceViewerConfiguration.java   
private void addDefaultPresentation(PresentationReconciler reconciler) {
    DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getGradleDefaultTextScanner());
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
}
项目:eclipse-bash-editor    文件:BashSourceViewerConfiguration.java   
private void addDefaultPresentation(PresentationReconciler reconciler) {
    DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getGradleDefaultTextScanner());
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
}
项目:pgcodekeeper    文件:SQLEditorSourceViewerConfiguration.java   
private void addDamagerRepairer(PresentationReconciler reconciler, RuleBasedScanner commentScanner, String contentType) {
    DefaultDamagerRepairer commentDamagerRepairer= new DefaultDamagerRepairer(commentScanner);
    reconciler.setDamager(commentDamagerRepairer, contentType);
    reconciler.setRepairer(commentDamagerRepairer, contentType);
}
项目:vertigo-chroma-kspplugin    文件:KspSourceViewerConfiguration.java   
private void setRepairer(PresentationReconciler reconciler, ITokenScanner scanner, String contentType) {
    DefaultDamagerRepairer dr = new DefaultDamagerRepairer(scanner);
    reconciler.setDamager(dr, contentType);
    reconciler.setRepairer(dr, contentType);
}