/** * 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(); @SuppressWarnings("unchecked") List<AnnotationPreference> prefs = annotationPreferences.getAnnotationPreferences(); for (AnnotationPreference annotationPreference : prefs) { support.setAnnotationPreference(annotationPreference); } support.setCharacterPairMatcher(characterPairMatcher); support.setMatchingCharacterPainterPreferenceKeys(BracketMatchingPreferencesInitializer.IS_ACTIVE_KEY, BracketMatchingPreferencesInitializer.COLOR_KEY); support.install(preferenceStoreAccess.getPreferenceStore()); }
@Override protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) { super.configureSourceViewerDecorationSupport(support); if (characterPairMatcher != null) { support.setCharacterPairMatcher(characterPairMatcher); support.setMatchingCharacterPainterPreferenceKeys(BracketMatchingPreferencesInitializer.IS_ACTIVE_KEY, BracketMatchingPreferencesInitializer.COLOR_KEY); } }
/** * 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()); }