Search in sources :

Example 6 with SourceViewerDecorationSupport

use of org.eclipse.ui.texteditor.SourceViewerDecorationSupport in project tmdm-studio-se by Talend.

the class ElementFKInfoFormatViewer method getSourceViewerDecorationSupport.

protected SourceViewerDecorationSupport getSourceViewerDecorationSupport(ISourceViewer viewer) {
    if (fSourceViewerDecorationSupport == null) {
        fSourceViewerDecorationSupport = new SourceViewerDecorationSupport(viewer, overviewRuler, XMLSourceViewerHelper.getInstance().getAnnotationAccess(), XMLSourceViewerHelper.getInstance().getSharedColors());
        // patch see SourceViewerDecorationSupport
        AnnotationPreference info = new AnnotationPreference();
        info.setAnnotationType(TYPE);
        // $NON-NLS-1$
        info.setTextPreferenceKey("errorIndication");
        // $NON-NLS-1$
        info.setTextStylePreferenceKey("errorTextStyle");
        // $NON-NLS-1$
        info.setColorPreferenceKey("errorIndicationColor");
        getPreferenceStore().setValue(info.getTextPreferenceKey(), true);
        // $NON-NLS-1$
        getPreferenceStore().setValue(info.getTextStylePreferenceKey(), "PROBLEM_UNDERLINE");
        // $NON-NLS-1$
        getPreferenceStore().setValue(info.getColorPreferenceKey(), "255, 0, 0");
        configureSourceViewerDecorationSupport(fSourceViewerDecorationSupport);
    }
    return fSourceViewerDecorationSupport;
}
Also used : AnnotationPreference(org.eclipse.ui.texteditor.AnnotationPreference) SourceViewerDecorationSupport(org.eclipse.ui.texteditor.SourceViewerDecorationSupport)

Example 7 with SourceViewerDecorationSupport

use of org.eclipse.ui.texteditor.SourceViewerDecorationSupport in project tmdm-studio-se by Talend.

the class XMLSourceViewer method getSourceViewerDecorationSupport.

protected SourceViewerDecorationSupport getSourceViewerDecorationSupport(ISourceViewer viewer) {
    if (fSourceViewerDecorationSupport == null) {
        fSourceViewerDecorationSupport = new SourceViewerDecorationSupport(viewer, getOverviewRuler(), XMLSourceViewerHelper.getInstance().getAnnotationAccess(), XMLSourceViewerHelper.getInstance().getSharedColors());
        // patch see SourceViewerDecorationSupport
        AnnotationPreference info = new AnnotationPreference();
        info.setAnnotationType(XMLValidator.TYPE);
        // $NON-NLS-1$
        info.setTextPreferenceKey("errorIndication");
        // $NON-NLS-1$
        info.setTextStylePreferenceKey("errorTextStyle");
        // $NON-NLS-1$
        info.setColorPreferenceKey("errorIndicationColor");
        getPreferenceStore().setValue(info.getTextPreferenceKey(), true);
        // $NON-NLS-1$
        getPreferenceStore().setValue(info.getTextStylePreferenceKey(), "PROBLEM_UNDERLINE");
        // $NON-NLS-1$
        getPreferenceStore().setValue(info.getColorPreferenceKey(), "255, 0, 0");
        configureSourceViewerDecorationSupport(fSourceViewerDecorationSupport);
    }
    return fSourceViewerDecorationSupport;
}
Also used : AnnotationPreference(org.eclipse.ui.texteditor.AnnotationPreference) SourceViewerDecorationSupport(org.eclipse.ui.texteditor.SourceViewerDecorationSupport)

Aggregations

SourceViewerDecorationSupport (org.eclipse.ui.texteditor.SourceViewerDecorationSupport)7 AnnotationPreference (org.eclipse.ui.texteditor.AnnotationPreference)5 DefaultMarkerAnnotationAccess (org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess)3 MarkerAnnotationPreferences (org.eclipse.ui.texteditor.MarkerAnnotationPreferences)3 Iterator (java.util.Iterator)2 IAnnotationAccess (org.eclipse.jface.text.source.IAnnotationAccess)2 ISourceViewer (org.eclipse.jface.text.source.ISourceViewer)2 SourceViewer (org.eclipse.jface.text.source.SourceViewer)2 DisposeEvent (org.eclipse.swt.events.DisposeEvent)2 DisposeListener (org.eclipse.swt.events.DisposeListener)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 JavaSourceViewer (org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer)1 SimpleJavaSourceViewerConfiguration (org.eclipse.jdt.internal.ui.text.SimpleJavaSourceViewerConfiguration)1 IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)1 DefaultInformationControl (org.eclipse.jface.text.DefaultInformationControl)1 Document (org.eclipse.jface.text.Document)1 IInformationControl (org.eclipse.jface.text.IInformationControl)1 IInformationControlCreator (org.eclipse.jface.text.IInformationControlCreator)1 ITextListener (org.eclipse.jface.text.ITextListener)1