Java 类org.eclipse.jface.text.source.DefaultCharacterPairMatcher 实例源码
项目:ncl30-eclipse
文件:NCLEditor.java
@Override
protected void configureSourceViewerDecorationSupport(
SourceViewerDecorationSupport support) {
super.configureSourceViewerDecorationSupport(support);
char[] matchChars = { '<', '>' }; // which brackets to match
ICharacterPairMatcher matcher = new DefaultCharacterPairMatcher(
matchChars, IDocumentExtension3.DEFAULT_PARTITIONING);
support.setCharacterPairMatcher(matcher);
support.setMatchingCharacterPainterPreferenceKeys(
EDITOR_MATCHING_BRACKETS, EDITOR_MATCHING_BRACKETS_COLOR);
// Enable bracket highlighting in the preference store
IPreferenceStore store = getPreferenceStore();
store.setDefault(EDITOR_MATCHING_BRACKETS, true);
store.setDefault(EDITOR_MATCHING_BRACKETS_COLOR, "128,128,128");
}
项目:brainfuck
文件:BfEditor.java
@Override
protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
super.configureSourceViewerDecorationSupport(support);
DefaultCharacterPairMatcher matcher =
new DefaultCharacterPairMatcher(
new char[]{'[', ']'},
EditorConstants.BF_PARTITIONING,
true);
support.setCharacterPairMatcher(matcher);
support.setMatchingCharacterPainterPreferenceKeys(
EditorConstants.PREF_EDITOR_MATCHING_BRACKETS,
EditorConstants.PREF_EDITOR_MATCHING_BRACKETS_COLOR,
EditorConstants.PREF_EDITOR_MATCHING_BRACKETS_SHOW_CARET,
EditorConstants.PREF_EDITOR_MATCHING_BRACKETS_SHOW_ENCLOSING);
}
项目:GradleEditor
文件:GradleEditor.java
@Override
protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
super.configureSourceViewerDecorationSupport(support);
char[] matchChars = { '(', ')', '[', ']', '{', '}' }; // which brackets
// to match
matcher = new DefaultCharacterPairMatcher(matchChars, IDocumentExtension3.DEFAULT_PARTITIONING);
support.setCharacterPairMatcher(matcher);
support.setMatchingCharacterPainterPreferenceKeys(EDITOR_MATCHING_BRACKETS, EDITOR_MATCHING_BRACKETS_COLOR);
// Enable bracket highlighting in the preference store
IPreferenceStore store = getPreferenceStore();
store.setDefault(EDITOR_MATCHING_BRACKETS, true);
store.setDefault(EDITOR_MATCHING_BRACKETS_COLOR, "128,128,128");
}
项目:rustyeclipse
文件:RustEditor.java
@Override
protected void configureSourceViewerDecorationSupport (@Nullable SourceViewerDecorationSupport support) {
super.configureSourceViewerDecorationSupport(support);
IPreferenceStore store = getPreferenceStore();
char[] matchChars = {'(', ')', '[', ']', '{', '}'}; //which brackets to match
ICharacterPairMatcher matcher = new DefaultCharacterPairMatcher(matchChars ,
IDocumentExtension3.DEFAULT_PARTITIONING);
support.setCharacterPairMatcher(matcher);
support.setMatchingCharacterPainterPreferenceKeys(RustConstants.EDITOR_MATCHING_BRACKETS,RustConstants. EDITOR_MATCHING_BRACKETS_COLOR);
//Enable bracket highlighting in the preference store
store.setDefault(RustConstants.EDITOR_MATCHING_BRACKETS, true);
store.setDefault(RustConstants.EDITOR_MATCHING_BRACKETS_COLOR, RustConstants.DEFAULT_MATCHING_BRACKETS_COLOR);
}
项目:bts
文件:DefaultUiModule.java
public ICharacterPairMatcher bindICharacterPairMatcher() {
return new DefaultCharacterPairMatcher(new char[] { '(', ')', '{', '}', '[', ']' });
}
项目:JuliaDT
文件:JuliaEditor.java
@Override
protected ICharacterPairMatcher createBracketMatcher() {
return new DefaultCharacterPairMatcher("{}[]()".toCharArray(),
JuliaPartition.JULIA_PARTITIONING);
}