Java 类org.eclipse.xtext.ui.editor.bracketmatching.BracketMatchingPreferencesInitializer 实例源码

项目:PDFReporter-Studio    文件:StyledTextXtextAdapter.java   
/**
 * 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());

}
项目:bts    文件:XtextEditor.java   
@Override
protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
    super.configureSourceViewerDecorationSupport(support);
    if (characterPairMatcher != null) {
        support.setCharacterPairMatcher(characterPairMatcher);
        support.setMatchingCharacterPainterPreferenceKeys(BracketMatchingPreferencesInitializer.IS_ACTIVE_KEY,
                BracketMatchingPreferencesInitializer.COLOR_KEY);
    }
}
项目:statecharts    文件:StyledTextXtextAdapter.java   
/**
 * 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());
}