当前位置: 首页>>代码示例>>Java>>正文


Java DefaultCharacterPairMatcher类代码示例

本文整理汇总了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");

}
 
开发者ID:ncleclipse,项目名称:ncl30-eclipse,代码行数:21,代码来源:NCLEditor.java

示例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);
}
 
开发者ID:RichardBirenheide,项目名称:brainfuck,代码行数:17,代码来源:BfEditor.java

示例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");
}
 
开发者ID:Nodeclipse,项目名称:GradleEditor,代码行数:16,代码来源:GradleEditor.java

示例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);
}
 
开发者ID:peq,项目名称:rustyeclipse,代码行数:14,代码来源:RustEditor.java

示例5: bindICharacterPairMatcher

import org.eclipse.jface.text.source.DefaultCharacterPairMatcher; //导入依赖的package包/类
public ICharacterPairMatcher bindICharacterPairMatcher() {
	return new DefaultCharacterPairMatcher(new char[] { '(', ')', '{', '}', '[', ']' });
}
 
开发者ID:cplutte,项目名称:bts,代码行数:4,代码来源:DefaultUiModule.java

示例6: createBracketMatcher

import org.eclipse.jface.text.source.DefaultCharacterPairMatcher; //导入依赖的package包/类
@Override
protected ICharacterPairMatcher createBracketMatcher() {
  return new DefaultCharacterPairMatcher("{}[]()".toCharArray(),
      JuliaPartition.JULIA_PARTITIONING);
}
 
开发者ID:JuliaComputing,项目名称:JuliaDT,代码行数:6,代码来源:JuliaEditor.java


注:本文中的org.eclipse.jface.text.source.DefaultCharacterPairMatcher类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。