Search in sources :

Example 16 with IPresentationReconciler

use of org.eclipse.jface.text.presentation.IPresentationReconciler in project dbeaver by dbeaver.

the class XMLSourceViewerConfiguration method getPresentationReconciler.

@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    PresentationReconciler reconciler = new PresentationReconciler();
    reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
    DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getXMLTagScanner());
    reconciler.setDamager(dr, XMLPartitionScanner.XML_TAG);
    reconciler.setRepairer(dr, XMLPartitionScanner.XML_TAG);
    dr = new DefaultDamagerRepairer(getXMLScanner());
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
    NonRuleBasedDamagerRepairer ndr = new NonRuleBasedDamagerRepairer(new TextAttribute(colorManager.getColor(COLOR_XML_COMMENT)));
    reconciler.setDamager(ndr, XMLPartitionScanner.XML_COMMENT);
    reconciler.setRepairer(ndr, XMLPartitionScanner.XML_COMMENT);
    return reconciler;
}
Also used : TextAttribute(org.eclipse.jface.text.TextAttribute) DefaultDamagerRepairer(org.eclipse.jface.text.rules.DefaultDamagerRepairer) IPresentationReconciler(org.eclipse.jface.text.presentation.IPresentationReconciler) PresentationReconciler(org.eclipse.jface.text.presentation.PresentationReconciler) NonRuleBasedDamagerRepairer(org.jkiss.dbeaver.ui.editors.text.NonRuleBasedDamagerRepairer)

Example 17 with IPresentationReconciler

use of org.eclipse.jface.text.presentation.IPresentationReconciler in project tmdm-studio-se by Talend.

the class ElementFKInfoConfiguration method getPresentationReconciler.

@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    PresentationReconciler reconciler = new PresentationReconciler();
    DefaultDamagerRepairer stringDR = new DefaultDamagerRepairer(getStringScanner());
    reconciler.setDamager(stringDR, ElementFKInfotPartitionScanner.COMMON_STRING);
    reconciler.setRepairer(stringDR, ElementFKInfotPartitionScanner.COMMON_STRING);
    DefaultDamagerRepairer keywordDR = new DefaultDamagerRepairer(getKeywordScanner());
    reconciler.setDamager(keywordDR, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(keywordDR, IDocument.DEFAULT_CONTENT_TYPE);
    return reconciler;
}
Also used : DefaultDamagerRepairer(org.eclipse.jface.text.rules.DefaultDamagerRepairer) IPresentationReconciler(org.eclipse.jface.text.presentation.IPresentationReconciler) PresentationReconciler(org.eclipse.jface.text.presentation.PresentationReconciler)

Example 18 with IPresentationReconciler

use of org.eclipse.jface.text.presentation.IPresentationReconciler in project tmdm-studio-se by Talend.

the class XMLConfiguration method getPresentationReconciler.

public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    PresentationReconciler reconciler = new PresentationReconciler();
    DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getXMLTagScanner());
    reconciler.setDamager(dr, IXMLPartitions.XML_TAG);
    reconciler.setRepairer(dr, IXMLPartitions.XML_TAG);
    reconciler.setDamager(dr, IXMLPartitions.XML_INCOMPLETETAG);
    reconciler.setDamager(dr, IXMLPartitions.XML_ENDTAG);
    reconciler.setRepairer(dr, IXMLPartitions.XML_ENDTAG);
    reconciler.setDamager(dr, IXMLPartitions.XML_EMPTYTAG);
    reconciler.setRepairer(dr, IXMLPartitions.XML_EMPTYTAG);
    dr = new DefaultDamagerRepairer(getXMLScanner());
    reconciler.setDamager(dr, IXMLPartitions.XML_TEXT);
    reconciler.setRepairer(dr, IXMLPartitions.XML_TEXT);
    NonRuleBasedDamagerRepairer ndr = new NonRuleBasedDamagerRepairer(new TextAttribute(IXMLColorConstants.XML_COMMENT, null, 0));
    reconciler.setDamager(ndr, IXMLPartitions.XML_COMMENT);
    reconciler.setRepairer(ndr, IXMLPartitions.XML_COMMENT);
    NonRuleBasedDamagerRepairer ndr2 = new NonRuleBasedDamagerRepairer(new TextAttribute(IXMLColorConstants.DECLARATION, null, 0));
    reconciler.setDamager(ndr2, IXMLPartitions.XML_DECLARATION);
    reconciler.setRepairer(ndr2, IXMLPartitions.XML_DECLARATION);
    NonRuleBasedDamagerRepairer ndr3 = new NonRuleBasedDamagerRepairer(new TextAttribute(IXMLColorConstants.PROC_INSTR, null, 0));
    reconciler.setDamager(ndr3, IXMLPartitions.XML_PI);
    reconciler.setRepairer(ndr3, IXMLPartitions.XML_PI);
    NonRuleBasedDamagerRepairer ndr4 = new NonRuleBasedDamagerRepairer(new TextAttribute(IXMLColorConstants.CDATA, null, 0));
    reconciler.setDamager(ndr4, IXMLPartitions.XML_CDATA);
    reconciler.setRepairer(ndr4, IXMLPartitions.XML_CDATA);
    return reconciler;
}
Also used : TextAttribute(org.eclipse.jface.text.TextAttribute) DefaultDamagerRepairer(org.eclipse.jface.text.rules.DefaultDamagerRepairer) IPresentationReconciler(org.eclipse.jface.text.presentation.IPresentationReconciler) PresentationReconciler(org.eclipse.jface.text.presentation.PresentationReconciler)

Example 19 with IPresentationReconciler

use of org.eclipse.jface.text.presentation.IPresentationReconciler in project translationstudio8 by heartsome.

the class TagStyleConfigurator method getPresentationReconciler.

private static IPresentationReconciler getPresentationReconciler(ITextViewer viewer) {
    // 构造函数中,已经默认设置 IDocumentExtension3.DEFAULT_PARTITIONING
    PresentationReconciler reconciler = new PresentationReconciler();
    PresentationRepairer repairer = new PresentationRepairer(getRecipeScanner(viewer.getDocument()));
    reconciler.setRepairer(repairer, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.install(viewer);
    return reconciler;
}
Also used : IPresentationReconciler(org.eclipse.jface.text.presentation.IPresentationReconciler) PresentationReconciler(org.eclipse.jface.text.presentation.PresentationReconciler)

Example 20 with IPresentationReconciler

use of org.eclipse.jface.text.presentation.IPresentationReconciler in project dbeaver by serge-rider.

the class XMLConfiguration method getPresentationReconciler.

@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    PresentationReconciler reconciler = new PresentationReconciler();
    reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
    DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getXMLTagScanner());
    reconciler.setDamager(dr, XMLPartitionScanner.XML_TAG);
    reconciler.setRepairer(dr, XMLPartitionScanner.XML_TAG);
    dr = new DefaultDamagerRepairer(getXMLScanner());
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
    NonRuleBasedDamagerRepairer ndr = new NonRuleBasedDamagerRepairer(new TextAttribute(colorManager.getColor(COLOR_XML_COMMENT)));
    reconciler.setDamager(ndr, XMLPartitionScanner.XML_COMMENT);
    reconciler.setRepairer(ndr, XMLPartitionScanner.XML_COMMENT);
    return reconciler;
}
Also used : TextAttribute(org.eclipse.jface.text.TextAttribute) DefaultDamagerRepairer(org.eclipse.jface.text.rules.DefaultDamagerRepairer) PresentationReconciler(org.eclipse.jface.text.presentation.PresentationReconciler) IPresentationReconciler(org.eclipse.jface.text.presentation.IPresentationReconciler)

Aggregations

IPresentationReconciler (org.eclipse.jface.text.presentation.IPresentationReconciler)45 PresentationReconciler (org.eclipse.jface.text.presentation.PresentationReconciler)43 DefaultDamagerRepairer (org.eclipse.jface.text.rules.DefaultDamagerRepairer)30 TextAttribute (org.eclipse.jface.text.TextAttribute)16 IntervallBasedDamagerRepairer (org.eclipse.titan.designer.editors.IntervallBasedDamagerRepairer)4 RuleBasedScanner (org.eclipse.jface.text.rules.RuleBasedScanner)3 ErlDamagerRepairer (org.erlide.ui.editors.erl.scanner.ErlDamagerRepairer)3 NonRuleBasedDamagerRepairer (org.jkiss.dbeaver.ui.editors.text.NonRuleBasedDamagerRepairer)3 NonRuleBasedDamagerRepairer (com.cubrid.tool.editor.NonRuleBasedDamagerRepairer)2 ColorRegistry (org.eclipse.jface.resource.ColorRegistry)2 PatternRule (org.eclipse.jface.text.rules.PatternRule)2 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 List (java.util.List)1 HTMLTagDamagerRepairer (org.apache.syncope.ide.eclipse.plugin.editors.htmlhelpers.HTMLTagDamagerRepairer)1 JavaScriptDamagerRepairer (org.apache.syncope.ide.eclipse.plugin.editors.htmlhelpers.JavaScriptDamagerRepairer)1 IConfigurationElement (org.eclipse.core.runtime.IConfigurationElement)1 IStatus (org.eclipse.core.runtime.IStatus)1 Status (org.eclipse.core.runtime.Status)1 DiffViewer (org.eclipse.egit.ui.internal.commit.DiffViewer)1