use of org.eclipse.jface.text.rules.DefaultDamagerRepairer 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;
}
use of org.eclipse.jface.text.rules.DefaultDamagerRepairer 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;
}
use of org.eclipse.jface.text.rules.DefaultDamagerRepairer in project cubrid-manager by CUBRID.
the class XMLConfiguration method getPresentationReconciler.
/**
* Retrieves the Presentation Reconciler
*
* @param sourceViewer ISourceViewer
* @return object of IPresentationReconciler
*/
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;
}
use of org.eclipse.jface.text.rules.DefaultDamagerRepairer in project eclipse.platform.text by eclipse.
the class JavaSourceViewerConfiguration method getPresentationReconciler.
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
JavaColorProvider provider = JavaEditorExamplePlugin.getDefault().getJavaColorProvider();
PresentationReconciler reconciler = new PresentationReconciler();
reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
DefaultDamagerRepairer dr = new DefaultDamagerRepairer(JavaEditorExamplePlugin.getDefault().getJavaCodeScanner());
reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
dr = new DefaultDamagerRepairer(JavaEditorExamplePlugin.getDefault().getJavaDocScanner());
reconciler.setDamager(dr, JavaPartitionScanner.JAVA_DOC);
reconciler.setRepairer(dr, JavaPartitionScanner.JAVA_DOC);
dr = new DefaultDamagerRepairer(new SingleTokenScanner(new TextAttribute(provider.getColor(JavaColorProvider.MULTI_LINE_COMMENT))));
reconciler.setDamager(dr, JavaPartitionScanner.JAVA_MULTILINE_COMMENT);
reconciler.setRepairer(dr, JavaPartitionScanner.JAVA_MULTILINE_COMMENT);
return reconciler;
}
use of org.eclipse.jface.text.rules.DefaultDamagerRepairer 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;
}
Aggregations