类org.eclipse.ui.texteditor.SourceViewerDecorationSupport源码实例Demo

下面列出了怎么用org.eclipse.ui.texteditor.SourceViewerDecorationSupport的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: xtext-eclipse   文件: 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);
	}
}
 
源代码2 项目: texlipse   文件: BibEditor.java
protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
    // copy the necessary values from plugin preferences instead of overwriting editor preferences
	getPreferenceStore().setValue(TexlipseProperties.MATCHING_BRACKETS,
			TexlipsePlugin.getPreference(TexlipseProperties.MATCHING_BRACKETS));
	
	getPreferenceStore().setValue(TexlipseProperties.MATCHING_BRACKETS_COLOR,
			TexlipsePlugin.getPreference(TexlipseProperties.MATCHING_BRACKETS_COLOR));
	
	support.setCharacterPairMatcher(fBracketMatcher);
	support.setMatchingCharacterPainterPreferenceKeys(TexlipseProperties.MATCHING_BRACKETS,
			TexlipseProperties.MATCHING_BRACKETS_COLOR);
	
	super.configureSourceViewerDecorationSupport(support);
}
 
源代码3 项目: texlipse   文件: TexEditor.java
/** 
 * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#configureSourceViewerDecorationSupport(org.eclipse.ui.texteditor.SourceViewerDecorationSupport)
 */
protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
    // copy the necessary values from plugin preferences instead of overwriting editor preferences
    getPreferenceStore().setValue(TexlipseProperties.MATCHING_BRACKETS, TexlipsePlugin.getPreference(TexlipseProperties.MATCHING_BRACKETS));
    getPreferenceStore().setValue(TexlipseProperties.MATCHING_BRACKETS_COLOR, TexlipsePlugin.getPreference(TexlipseProperties.MATCHING_BRACKETS_COLOR));
    
    support.setCharacterPairMatcher(fBracketMatcher);
    support.setMatchingCharacterPainterPreferenceKeys(TexlipseProperties.MATCHING_BRACKETS, TexlipseProperties.MATCHING_BRACKETS_COLOR);

    super.configureSourceViewerDecorationSupport(support);
}
 
源代码4 项目: tlaplus   文件: TLACoverageEditor.java
@Override
protected SourceViewerDecorationSupport getSourceViewerDecorationSupport(ISourceViewer viewer) {
	//TODO Initialize painter after editor input has been set.
	painter = new TLACoveragePainter(this);
	((TextViewer) viewer).addTextPresentationListener(painter);
	
	return super.getSourceViewerDecorationSupport(viewer);
}
 
@Override
protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
	fBracketMatcher.setSourceVersion(getPreferenceStore().getString(JavaScriptCore.COMPILER_SOURCE));
	support.setCharacterPairMatcher(fBracketMatcher);
	support.setMatchingCharacterPainterPreferenceKeys(MATCHING_BRACKETS, MATCHING_BRACKETS_COLOR);
	super.configureSourceViewerDecorationSupport(support);
}
 
源代码6 项目: 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());
}
 
源代码7 项目: APICloud-Studio   文件: AbstractThemeableEditor.java
@Override
protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support)
{
	super.configureSourceViewerDecorationSupport(support);

	support.setCharacterPairMatcher(new CharacterPairMatcher(getPairMatchingCharacters()));
	support.setMatchingCharacterPainterPreferenceKeys(IPreferenceConstants.ENABLE_CHARACTER_PAIR_COLORING,
			IPreferenceConstants.CHARACTER_PAIR_COLOR);
}
 
@Override
protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {

	fBracketMatcher.setSourceVersion(getPreferenceStore().getString(JavaCore.COMPILER_SOURCE));
	support.setCharacterPairMatcher(fBracketMatcher);
	support.setMatchingCharacterPainterPreferenceKeys(MATCHING_BRACKETS, MATCHING_BRACKETS_COLOR, HIGHLIGHT_BRACKET_AT_CARET_LOCATION, ENCLOSING_BRACKETS);

	super.configureSourceViewerDecorationSupport(support);
}
 
源代码9 项目: Pydev   文件: PyEditProjection.java
@Override
protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
    super.configureSourceViewerDecorationSupport(support);
    support.setCharacterPairMatcher(fBracketMatcher);
    support.setMatchingCharacterPainterPreferenceKeys(PyDevEditorPreferences.USE_MATCHING_BRACKETS,
            PyDevEditorPreferences.MATCHING_BRACKETS_COLOR);
}
 
源代码10 项目: goclipse   文件: AbstractLangEditor.java
protected void configureBracketMatcher(SourceViewerDecorationSupport support) {
	support.setCharacterPairMatcher(fBracketMatcher);
	support.setMatchingCharacterPainterPreferenceKeys(
		EditorPrefConstants.MATCHING_BRACKETS_.key, 
		EditorPrefConstants.MATCHING_BRACKETS_COLOR2.getActiveKey(), 
		EditorPrefConstants.HIGHLIGHT_BRACKET_AT_CARET_LOCATION, 
		EditorPrefConstants.ENCLOSING_BRACKETS);
}
 
源代码11 项目: statecharts   文件: StyledTextXtextAdapter.java
protected void unconfigureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
	support.uninstall();
}
 
源代码12 项目: statecharts   文件: StyledTextXtextAdapter.java
protected SourceViewerDecorationSupport createSourceViewerDecorationSupport() {
	return new SourceViewerDecorationSupport(getXtextSourceviewer(), null, new DefaultMarkerAnnotationAccess(),
			getSharedColors());
}
 
源代码13 项目: statecharts   文件: StyledTextXtextAdapter.java
protected SourceViewerDecorationSupport getDecorationSupport() {
	return this.decorationSupport;
}
 
源代码14 项目: goclipse   文件: AbstractLangEditor.java
@Override
protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
	configureBracketMatcher(support);
	super.configureSourceViewerDecorationSupport(support);
}
 
 类所在包
 同包方法