Search in sources :

Example 21 with TextAttribute

use of org.eclipse.jface.text.TextAttribute in project eclipse.platform.text by eclipse.

the class XMLConfiguration method getPresentationReconciler.

@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    PresentationReconciler reconciler = new PresentationReconciler();
    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(IXMLColorConstants.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)

Aggregations

TextAttribute (org.eclipse.jface.text.TextAttribute)21 Token (org.eclipse.jface.text.rules.Token)10 IPresentationReconciler (org.eclipse.jface.text.presentation.IPresentationReconciler)5 PresentationReconciler (org.eclipse.jface.text.presentation.PresentationReconciler)5 DefaultDamagerRepairer (org.eclipse.jface.text.rules.DefaultDamagerRepairer)4 IRule (org.eclipse.jface.text.rules.IRule)3 IToken (org.eclipse.jface.text.rules.IToken)3 RGB (org.eclipse.swt.graphics.RGB)3 NonRuleBasedDamagerRepairer (com.cubrid.tool.editor.NonRuleBasedDamagerRepairer)2 Document (org.eclipse.jface.text.Document)2 IDocument (org.eclipse.jface.text.IDocument)2 PatternRule (org.eclipse.jface.text.rules.PatternRule)2 RuleBasedScanner (org.eclipse.jface.text.rules.RuleBasedScanner)2 WordRule (org.eclipse.jface.text.rules.WordRule)2 Test (org.junit.Test)2 XMLTagDamageRepairScanner (com.cubrid.tool.editor.xml.scanner.XMLTagDamageRepairScanner)1 XMLTitleScanner (com.cubrid.tool.editor.xml.scanner.XMLTitleScanner)1 File (java.io.File)1 ArrayList (java.util.ArrayList)1 AnchorWordDetector (org.dadacoalition.yedit.editor.scanner.AnchorWordDetector)1