@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; }
@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; }
@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; }
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); }
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); }
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); }
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); }
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; }
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; }
/** * @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; }
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; }
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); }
@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; }
@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; }
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); }
@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; }
@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; }
@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; }
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; }
@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; }
/** * 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; }
@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; }
@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; }
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); }
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { PresentationReconciler reconciler = new PresentationReconciler(); UmpleDamagerRepairer dr = new UmpleDamagerRepairer(getUmpleTagScanner()); reconciler.setDamager(dr, UmplePartitionScanner.Umple_TAG); reconciler.setRepairer(dr, UmplePartitionScanner.Umple_TAG); dr = new UmpleDamagerRepairer(getUmpleScanner()); reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); return reconciler; }
@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; }
@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; }
public void attachDamagerRepairer(PresentationReconciler pr) { 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_MACRO)); pr.setDamager(ndr, KSP_MACRO); pr.setRepairer(ndr, KSP_MACRO); }
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; }
@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; }
@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; }
private void setDamagerRepairer( PresentationReconciler pr, DefaultDamagerRepairer damagerRepairer, String tokenType) { pr.setDamager(damagerRepairer, tokenType); pr.setRepairer(damagerRepairer, tokenType); }
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); }