use of org.eclipse.ui.texteditor.AnnotationPreference 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());
}
use of org.eclipse.ui.texteditor.AnnotationPreference in project erlide_eclipse by erlang.
the class AnnotationSupport method isNavigationTarget.
/**
* Returns whether the given annotation is configured as a target for the "Go to
* Next/Previous Annotation" actions
*
* @param annotation
* the annotation
* @return <code>true</code> if this is a target, <code>false</code> otherwise
* @since 3.0
*/
public boolean isNavigationTarget(final Annotation annotation) {
final IPreferenceStore preferences = EditorsUI.getPreferenceStore();
final AnnotationPreference preference = annotationPreferenceLookup.getAnnotationPreference(annotation);
final String key = preference == null ? null : preference.getIsGoToNextNavigationTargetKey();
return key != null && preferences.getBoolean(key);
}
Aggregations