Search in sources :

Example 1 with NonRuleBasedDamagerRepairer

use of com.cubrid.tool.editor.NonRuleBasedDamagerRepairer 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;
}
Also used : TextAttribute(org.eclipse.jface.text.TextAttribute) PresentationReconciler(org.eclipse.jface.text.presentation.PresentationReconciler) IPresentationReconciler(org.eclipse.jface.text.presentation.IPresentationReconciler) NonRuleBasedDamagerRepairer(com.cubrid.tool.editor.NonRuleBasedDamagerRepairer)

Example 2 with NonRuleBasedDamagerRepairer

use of com.cubrid.tool.editor.NonRuleBasedDamagerRepairer 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;
}
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(com.cubrid.tool.editor.NonRuleBasedDamagerRepairer)

Aggregations

NonRuleBasedDamagerRepairer (com.cubrid.tool.editor.NonRuleBasedDamagerRepairer)2 TextAttribute (org.eclipse.jface.text.TextAttribute)2 IPresentationReconciler (org.eclipse.jface.text.presentation.IPresentationReconciler)2 PresentationReconciler (org.eclipse.jface.text.presentation.PresentationReconciler)2 DefaultDamagerRepairer (org.eclipse.jface.text.rules.DefaultDamagerRepairer)1