Search in sources :

Example 36 with IPresentationReconciler

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

the class MarkupSourceViewerConfiguration method getPresentationReconciler.

@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    PresentationReconciler reconciler = new PresentationReconciler();
    reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
    MarkupDamagerRepairer damagerRepairer = new MarkupDamagerRepairer(getMarkupScanner());
    for (String partitionType : FastMarkupPartitioner.ALL_CONTENT_TYPES) {
        reconciler.setDamager(damagerRepairer, partitionType);
        reconciler.setRepairer(damagerRepairer, partitionType);
    }
    reconciler.setDamager(damagerRepairer, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(damagerRepairer, IDocument.DEFAULT_CONTENT_TYPE);
    return reconciler;
}
Also used : MarkupDamagerRepairer(org.eclipse.mylyn.internal.wikitext.ui.editor.syntax.MarkupDamagerRepairer) IPresentationReconciler(org.eclipse.jface.text.presentation.IPresentationReconciler) PresentationReconciler(org.eclipse.jface.text.presentation.PresentationReconciler)

Example 37 with IPresentationReconciler

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

the class HtmlViewerConfiguration method getPresentationReconciler.

@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    PresentationReconciler reconciler = new PresentationReconciler();
    reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
    MarkupViewerDamagerRepairer dr = createMarkupViewerDamagerRepairer();
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
    return reconciler;
}
Also used : IPresentationReconciler(org.eclipse.jface.text.presentation.IPresentationReconciler) PresentationReconciler(org.eclipse.jface.text.presentation.PresentationReconciler)

Example 38 with IPresentationReconciler

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

the class CssConfiguration method getPresentationReconciler.

@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    PresentationReconciler reconciler = new PresentationReconciler();
    DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getCssTokenScanner());
    reconciler.setDamager(dr, CssPartitionScanner.CONTENT_TYPE_BLOCK);
    reconciler.setRepairer(dr, CssPartitionScanner.CONTENT_TYPE_BLOCK);
    dr = new DefaultDamagerRepairer(getCssScanner());
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
    CommentDamagerRepairer commentDamagerRepairer = new CommentDamagerRepairer(new TextAttribute(colorRegistry.get(Colors.KEY_COMMENT)));
    reconciler.setDamager(commentDamagerRepairer, CssPartitionScanner.CONTENT_TYPE_COMMENT);
    reconciler.setRepairer(commentDamagerRepairer, CssPartitionScanner.CONTENT_TYPE_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)

Example 39 with IPresentationReconciler

use of org.eclipse.jface.text.presentation.IPresentationReconciler in project titan.EclipsePlug-ins by eclipse.

the class Configuration method getPresentationReconciler.

@Override
public IPresentationReconciler getPresentationReconciler(final ISourceViewer sourceViewer) {
    if (presentationReconciler == null) {
        presentationReconciler = new PresentationReconciler();
        presentationReconciler.setDocumentPartitioning(PartitionScanner.TTCNPP_PARTITIONING);
        IntervallBasedDamagerRepairer dr = new IntervallBasedDamagerRepairer(new CodeScanner(colorManager));
        presentationReconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
        presentationReconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
    }
    return presentationReconciler;
}
Also used : IntervallBasedDamagerRepairer(org.eclipse.titan.designer.editors.IntervallBasedDamagerRepairer) IPresentationReconciler(org.eclipse.jface.text.presentation.IPresentationReconciler) PresentationReconciler(org.eclipse.jface.text.presentation.PresentationReconciler)

Example 40 with IPresentationReconciler

use of org.eclipse.jface.text.presentation.IPresentationReconciler in project titan.EclipsePlug-ins by eclipse.

the class Configuration method getPresentationReconciler.

@Override
public IPresentationReconciler getPresentationReconciler(final ISourceViewer sourceViewer) {
    PresentationReconciler reconciler = new PresentationReconciler();
    reconciler.setDocumentPartitioning(PartitionScanner.CONFIG_PARTITIONING);
    IntervallBasedDamagerRepairer dr = new IntervallBasedDamagerRepairer(new CodeScanner(colorManager));
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
    return reconciler;
}
Also used : IntervallBasedDamagerRepairer(org.eclipse.titan.designer.editors.IntervallBasedDamagerRepairer) IPresentationReconciler(org.eclipse.jface.text.presentation.IPresentationReconciler) PresentationReconciler(org.eclipse.jface.text.presentation.PresentationReconciler)

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