org.eclipse.ui.texteditor.SourceViewerDecorationSupport Java Examples
The following examples show how to use
org.eclipse.ui.texteditor.SourceViewerDecorationSupport.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XtextEditor.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) { super.configureSourceViewerDecorationSupport(support); if (characterPairMatcher != null) { support.setCharacterPairMatcher(characterPairMatcher); support.setMatchingCharacterPainterPreferenceKeys(BracketMatchingPreferencesInitializer.IS_ACTIVE_KEY, BracketMatchingPreferencesInitializer.COLOR_KEY); } }
Example #2
Source File: BibEditor.java From texlipse with Eclipse Public License 1.0 | 5 votes |
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); }
Example #3
Source File: TexEditor.java From texlipse with Eclipse Public License 1.0 | 5 votes |
/** * @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); }
Example #4
Source File: TLACoverageEditor.java From tlaplus with MIT License | 5 votes |
@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); }
Example #5
Source File: JavaScriptLightWeightEditor.java From typescript.java with MIT License | 5 votes |
@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); }
Example #6
Source File: StyledTextXtextAdapter.java From statecharts with Eclipse Public License 1.0 | 5 votes |
/** * 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()); }
Example #7
Source File: AbstractThemeableEditor.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
@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); }
Example #8
Source File: JavaEditor.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@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); }
Example #9
Source File: PyEditProjection.java From Pydev with Eclipse Public License 1.0 | 5 votes |
@Override protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) { super.configureSourceViewerDecorationSupport(support); support.setCharacterPairMatcher(fBracketMatcher); support.setMatchingCharacterPainterPreferenceKeys(PyDevEditorPreferences.USE_MATCHING_BRACKETS, PyDevEditorPreferences.MATCHING_BRACKETS_COLOR); }
Example #10
Source File: AbstractLangEditor.java From goclipse with Eclipse Public License 1.0 | 5 votes |
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); }
Example #11
Source File: StyledTextXtextAdapter.java From statecharts with Eclipse Public License 1.0 | 4 votes |
protected void unconfigureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) { support.uninstall(); }
Example #12
Source File: StyledTextXtextAdapter.java From statecharts with Eclipse Public License 1.0 | 4 votes |
protected SourceViewerDecorationSupport createSourceViewerDecorationSupport() { return new SourceViewerDecorationSupport(getXtextSourceviewer(), null, new DefaultMarkerAnnotationAccess(), getSharedColors()); }
Example #13
Source File: StyledTextXtextAdapter.java From statecharts with Eclipse Public License 1.0 | 4 votes |
protected SourceViewerDecorationSupport getDecorationSupport() { return this.decorationSupport; }
Example #14
Source File: AbstractLangEditor.java From goclipse with Eclipse Public License 1.0 | 4 votes |
@Override protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) { configureBracketMatcher(support); super.configureSourceViewerDecorationSupport(support); }