Search in sources :

Example 6 with MarkerAnnotationPreferences

use of org.eclipse.ui.texteditor.MarkerAnnotationPreferences in project statecharts by Yakindu.

the class StyledTextXtextAdapter method configureSourceViewerDecorationSupport.

/**
 * Creates decoration support for the sourceViewer. code is entirely copied from
 * {@link XtextEditor} and its super class {@link AbstractDecoratedTextEditor}.
 */
protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
    MarkerAnnotationPreferences annotationPreferences = new MarkerAnnotationPreferences();
    List<AnnotationPreference> prefs = annotationPreferences.getAnnotationPreferences();
    for (AnnotationPreference annotationPreference : prefs) {
        support.setAnnotationPreference(annotationPreference);
    }
    support.setCharacterPairMatcher(getCharacterPairMatcher());
    support.setMatchingCharacterPainterPreferenceKeys(BracketMatchingPreferencesInitializer.IS_ACTIVE_KEY, BracketMatchingPreferencesInitializer.COLOR_KEY);
    support.install(getPreferenceStoreAccess().getPreferenceStore());
}
Also used : MarkerAnnotationPreferences(org.eclipse.ui.texteditor.MarkerAnnotationPreferences) AnnotationPreference(org.eclipse.ui.texteditor.AnnotationPreference)

Example 7 with MarkerAnnotationPreferences

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

the class XMLSourceViewerHelper method getAnnotationPreferences.

private MarkerAnnotationPreferences getAnnotationPreferences() {
    if (fAnnotationPreferences == null) {
        fAnnotationPreferences = new MarkerAnnotationPreferences();
        // force init
        fAnnotationPreferences.getAnnotationPreferences();
    }
    return fAnnotationPreferences;
}
Also used : MarkerAnnotationPreferences(org.eclipse.ui.texteditor.MarkerAnnotationPreferences)

Example 8 with MarkerAnnotationPreferences

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

the class ElementFKInfoFormatViewer method getAnnotationPreferences.

private MarkerAnnotationPreferences getAnnotationPreferences() {
    if (fAnnotationPreferences == null) {
        fAnnotationPreferences = new MarkerAnnotationPreferences();
        // force init
        fAnnotationPreferences.getAnnotationPreferences();
    }
    return fAnnotationPreferences;
}
Also used : MarkerAnnotationPreferences(org.eclipse.ui.texteditor.MarkerAnnotationPreferences)

Example 9 with MarkerAnnotationPreferences

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

the class ElementFKInfoFormatHelper method getAnnotationPreferences.

private static MarkerAnnotationPreferences getAnnotationPreferences() {
    if (fAnnotationPreferences == null) {
        fAnnotationPreferences = new MarkerAnnotationPreferences();
        // force init
        fAnnotationPreferences.getAnnotationPreferences();
    }
    return fAnnotationPreferences;
}
Also used : MarkerAnnotationPreferences(org.eclipse.ui.texteditor.MarkerAnnotationPreferences)

Aggregations

MarkerAnnotationPreferences (org.eclipse.ui.texteditor.MarkerAnnotationPreferences)9 AnnotationPreference (org.eclipse.ui.texteditor.AnnotationPreference)4 DefaultMarkerAnnotationAccess (org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess)3 SourceViewerDecorationSupport (org.eclipse.ui.texteditor.SourceViewerDecorationSupport)3 Iterator (java.util.Iterator)2 IAnnotationAccess (org.eclipse.jface.text.source.IAnnotationAccess)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 TreeSet (java.util.TreeSet)1 Document (org.eclipse.jface.text.Document)1 ITextListener (org.eclipse.jface.text.ITextListener)1 TextEvent (org.eclipse.jface.text.TextEvent)1 AnnotationModel (org.eclipse.jface.text.source.AnnotationModel)1 ISharedTextColors (org.eclipse.jface.text.source.ISharedTextColors)1 ISourceViewer (org.eclipse.jface.text.source.ISourceViewer)1 IntList (org.eclipse.jgit.util.IntList)1 AbstractMarkupLanguage (org.eclipse.mylyn.wikitext.parser.markup.AbstractMarkupLanguage)1