Search in sources :

Example 41 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 presentationReconciler = new PresentationReconciler();
    presentationReconciler.setDocumentPartitioning(PartitionScanner.ASN1_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 42 with IPresentationReconciler

use of org.eclipse.jface.text.presentation.IPresentationReconciler in project erlide_eclipse by erlang.

the class ErlangConsoleSourceViewerConfiguration method getPresentationReconciler.

@Override
public IPresentationReconciler getPresentationReconciler(final ISourceViewer sourceViewer) {
    final PresentationReconciler reconciler = new PresentationReconciler();
    DefaultDamagerRepairer dr;
    final ITokenScanner scan = new ErlCodeScanner(colorManager);
    dr = new ErlDamagerRepairer(scan);
    reconciler.setDamager(dr, IoRequestKind.INPUT.name());
    reconciler.setRepairer(dr, IoRequestKind.INPUT.name());
    final ITokenScanner scan3 = new ConsoleOutputScanner(colorManager);
    dr = new ErlDamagerRepairer(scan3);
    reconciler.setDamager(dr, IoRequestKind.OUTPUT.name());
    reconciler.setRepairer(dr, IoRequestKind.OUTPUT.name());
    reconciler.setDamager(dr, IoRequestKind.PROMPT.name());
    reconciler.setRepairer(dr, IoRequestKind.PROMPT.name());
    reconciler.setDamager(dr, IoRequestKind.STDOUT.name());
    reconciler.setRepairer(dr, IoRequestKind.STDOUT.name());
    reconciler.setDamager(dr, IoRequestKind.STDERR.name());
    reconciler.setRepairer(dr, IoRequestKind.STDERR.name());
    reconciler.setDamager(dr, IoRequestKind.HEADER.name());
    reconciler.setRepairer(dr, IoRequestKind.HEADER.name());
    // this is for the input field
    final ITokenScanner scan2 = new ErlCodeScanner(colorManager);
    dr = new ErlDamagerRepairer(scan2);
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
    return reconciler;
}
Also used : ErlDamagerRepairer(org.erlide.ui.editors.erl.scanner.ErlDamagerRepairer) ErlCodeScanner(org.erlide.ui.editors.erl.scanner.ErlCodeScanner) DefaultDamagerRepairer(org.eclipse.jface.text.rules.DefaultDamagerRepairer) IPresentationReconciler(org.eclipse.jface.text.presentation.IPresentationReconciler) PresentationReconciler(org.eclipse.jface.text.presentation.PresentationReconciler) ITokenScanner(org.eclipse.jface.text.rules.ITokenScanner)

Example 43 with IPresentationReconciler

use of org.eclipse.jface.text.presentation.IPresentationReconciler in project erlide_eclipse by erlang.

the class SyntaxColorPreviewEditorConfiguration method getPresentationReconciler.

@Override
public IPresentationReconciler getPresentationReconciler(final ISourceViewer sourceViewer) {
    final PresentationReconciler reconciler = new PresentationReconciler();
    reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
    DefaultDamagerRepairer dr = new ErlDamagerRepairer(codeScanner);
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
    dr = new ErlDamagerRepairer(commentScanner);
    reconciler.setDamager(dr, IErlangPartitions.ERLANG_COMMENT);
    reconciler.setRepairer(dr, IErlangPartitions.ERLANG_COMMENT);
    dr = new ErlDamagerRepairer(stringScanner);
    reconciler.setDamager(dr, IErlangPartitions.ERLANG_STRING);
    reconciler.setRepairer(dr, IErlangPartitions.ERLANG_STRING);
    dr = new ErlDamagerRepairer(qatomScanner);
    reconciler.setDamager(dr, IErlangPartitions.ERLANG_QATOM);
    reconciler.setRepairer(dr, IErlangPartitions.ERLANG_QATOM);
    dr = new ErlDamagerRepairer(charScanner);
    reconciler.setDamager(dr, IErlangPartitions.ERLANG_CHARACTER);
    reconciler.setRepairer(dr, IErlangPartitions.ERLANG_CHARACTER);
    return reconciler;
}
Also used : ErlDamagerRepairer(org.erlide.ui.editors.erl.scanner.ErlDamagerRepairer) DefaultDamagerRepairer(org.eclipse.jface.text.rules.DefaultDamagerRepairer) IPresentationReconciler(org.eclipse.jface.text.presentation.IPresentationReconciler) PresentationReconciler(org.eclipse.jface.text.presentation.PresentationReconciler)

Example 44 with IPresentationReconciler

use of org.eclipse.jface.text.presentation.IPresentationReconciler in project erlide_eclipse by erlang.

the class ErlangSourceViewerConfiguration method getPresentationReconciler.

@Override
public IPresentationReconciler getPresentationReconciler(final ISourceViewer sourceViewer) {
    final PresentationReconciler reconciler = new ErlangPresentationReconciler();
    reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
    DefaultDamagerRepairer dr = new ErlDamagerRepairer(codeScanner);
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
    dr = new ErlDamagerRepairer(commentScanner);
    reconciler.setDamager(dr, IErlangPartitions.ERLANG_COMMENT);
    reconciler.setRepairer(dr, IErlangPartitions.ERLANG_COMMENT);
    dr = new ErlDamagerRepairer(stringScanner);
    reconciler.setDamager(dr, IErlangPartitions.ERLANG_STRING);
    reconciler.setRepairer(dr, IErlangPartitions.ERLANG_STRING);
    dr = new ErlDamagerRepairer(qatomScanner);
    reconciler.setDamager(dr, IErlangPartitions.ERLANG_QATOM);
    reconciler.setRepairer(dr, IErlangPartitions.ERLANG_QATOM);
    dr = new ErlDamagerRepairer(charScanner);
    reconciler.setDamager(dr, IErlangPartitions.ERLANG_CHARACTER);
    reconciler.setRepairer(dr, IErlangPartitions.ERLANG_CHARACTER);
    return reconciler;
}
Also used : ErlDamagerRepairer(org.erlide.ui.editors.erl.scanner.ErlDamagerRepairer) DefaultDamagerRepairer(org.eclipse.jface.text.rules.DefaultDamagerRepairer) IPresentationReconciler(org.eclipse.jface.text.presentation.IPresentationReconciler) PresentationReconciler(org.eclipse.jface.text.presentation.PresentationReconciler)

Example 45 with IPresentationReconciler

use of org.eclipse.jface.text.presentation.IPresentationReconciler 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, 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) PresentationReconciler(org.eclipse.jface.text.presentation.PresentationReconciler) IPresentationReconciler(org.eclipse.jface.text.presentation.IPresentationReconciler)

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