本文整理汇总了Java中org.eclipse.jface.text.source.DefaultCharacterPairMatcher类的典型用法代码示例。如果您正苦于以下问题:Java DefaultCharacterPairMatcher类的具体用法?Java DefaultCharacterPairMatcher怎么用?Java DefaultCharacterPairMatcher使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DefaultCharacterPairMatcher类属于org.eclipse.jface.text.source包,在下文中一共展示了DefaultCharacterPairMatcher类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configureSourceViewerDecorationSupport
import org.eclipse.jface.text.source.DefaultCharacterPairMatcher; //导入依赖的package包/类
@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");
}
示例2: configureSourceViewerDecorationSupport
import org.eclipse.jface.text.source.DefaultCharacterPairMatcher; //导入依赖的package包/类
@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);
}
示例3: configureSourceViewerDecorationSupport
import org.eclipse.jface.text.source.DefaultCharacterPairMatcher; //导入依赖的package包/类
@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");
}
示例4: configureSourceViewerDecorationSupport
import org.eclipse.jface.text.source.DefaultCharacterPairMatcher; //导入依赖的package包/类
@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);
}
示例5: bindICharacterPairMatcher
import org.eclipse.jface.text.source.DefaultCharacterPairMatcher; //导入依赖的package包/类
public ICharacterPairMatcher bindICharacterPairMatcher() {
return new DefaultCharacterPairMatcher(new char[] { '(', ')', '{', '}', '[', ']' });
}
示例6: createBracketMatcher
import org.eclipse.jface.text.source.DefaultCharacterPairMatcher; //导入依赖的package包/类
@Override
protected ICharacterPairMatcher createBracketMatcher() {
return new DefaultCharacterPairMatcher("{}[]()".toCharArray(),
JuliaPartition.JULIA_PARTITIONING);
}