use of org.eclipse.jface.text.TextAttribute in project cubrid-manager by CUBRID.
the class XMLConfiguration method getXMLScanner.
/**
* Retrieves the XML Scanner.
*
* @return scanner
*/
protected XMLTitleScanner getXMLScanner() {
if (scanner == null) {
scanner = new XMLTitleScanner(colorManager);
scanner.setDefaultReturnToken(new Token(new TextAttribute(colorManager.getColor(IXMLColorConstants.DEFAULT))));
}
return scanner;
}
use of org.eclipse.jface.text.TextAttribute 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.TextAttribute in project dbeaver by serge-rider.
the class XMLConfiguration method getXMLTagScanner.
XMLTagScanner getXMLTagScanner() {
XMLTagScanner tagScanner = new XMLTagScanner(colorManager);
tagScanner.setDefaultReturnToken(new Token(new TextAttribute(colorManager.getColor(COLOR_TAG))));
return tagScanner;
}
use of org.eclipse.jface.text.TextAttribute in project cubrid-manager by CUBRID.
the class PropConfiguration method getPropertiesCommentScanner.
/**
* Retrieves the XML Tag Scanner.
*
* @return tagScanner
*/
protected PropPartitionScanner getPropertiesCommentScanner() {
if (commentScanner == null) {
commentScanner = new PropPartitionScanner();
commentScanner.setDefaultReturnToken(new Token(new TextAttribute(colorManager.getColor(IPropColorConstants.PROP_COMMENT))));
}
return commentScanner;
}
use of org.eclipse.jface.text.TextAttribute in project cubrid-manager by CUBRID.
the class PropConfiguration method getPresentationReconciler.
/**
* Retrieves the Presentation Reconciler
*
* @param sourceViewer ISourceViewer
* @return object of IPresentationReconciler
*/
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler reconciler = new PresentationReconciler();
NonRuleBasedDamagerRepairer ndr = new NonRuleBasedDamagerRepairer(new TextAttribute(colorManager.getColor(IPropColorConstants.PROP_COMMENT)));
reconciler.setDamager(ndr, PropPartitionScanner.PROPERTIES_COMMENT);
reconciler.setRepairer(ndr, PropPartitionScanner.PROPERTIES_COMMENT);
ndr = new NonRuleBasedDamagerRepairer(new TextAttribute(colorManager.getColor(IPropColorConstants.DEFAULT)));
reconciler.setDamager(ndr, PropPartitionScanner.PROPERTIES_CONTENT);
reconciler.setRepairer(ndr, PropPartitionScanner.PROPERTIES_CONTENT);
ndr = new NonRuleBasedDamagerRepairer(new TextAttribute(colorManager.getColor(IPropColorConstants.TAG)));
reconciler.setDamager(ndr, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(ndr, IDocument.DEFAULT_CONTENT_TYPE);
return reconciler;
}
Aggregations