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


Java SearchPattern.RULE_PATTERN_MATCH属性代码示例

本文整理汇总了Java中org.eclipse.ui.dialogs.SearchPattern.RULE_PATTERN_MATCH属性的典型用法代码示例。如果您正苦于以下问题:Java SearchPattern.RULE_PATTERN_MATCH属性的具体用法?Java SearchPattern.RULE_PATTERN_MATCH怎么用?Java SearchPattern.RULE_PATTERN_MATCH使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.ui.dialogs.SearchPattern的用法示例。


在下文中一共展示了SearchPattern.RULE_PATTERN_MATCH属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isTextMatchingSearchPattern

protected boolean isTextMatchingSearchPattern(String text, String searchPattern) {
    SearchPattern matcher = new SearchPattern(SearchPattern.RULE_PATTERN_MATCH
            | SearchPattern.RULE_EXACT_MATCH | SearchPattern.RULE_PREFIX_MATCH
            | SearchPattern.RULE_BLANK_MATCH);
    matcher.setPattern("*" + searchPattern);
    return matcher.matches(text);
}
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:7,代码来源:SearchNodeContext.java

示例2: isTextMatchingSearchPattern

protected boolean isTextMatchingSearchPattern(String text) {
    SearchPattern matcher = new SearchPattern(SearchPattern.RULE_PATTERN_MATCH
            | SearchPattern.RULE_EXACT_MATCH | SearchPattern.RULE_PREFIX_MATCH
            | SearchPattern.RULE_BLANK_MATCH);
    matcher.setPattern("*" + searchPattern);
    return matcher.matches(text);
}
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:7,代码来源:SchemaRegistryView.java

示例3: getMatchingRegions

private final int[] getMatchingRegions(String pattern, String name, int matchRule) {
	if (name == null)
		return null;
	final int nameLength = name.length();
	if (pattern == null) {
		return new int[] { 0, nameLength };
	}
	final int patternLength = pattern.length();
	switch (matchRule) {
	case SearchPattern.RULE_EXACT_MATCH:
		if (patternLength == nameLength && pattern.equalsIgnoreCase(name)) {
			return new int[] { 0, patternLength };
		}
		break;
	case SearchPattern.RULE_EXACT_MATCH | SearchPattern.RULE_CASE_SENSITIVE:
		if (patternLength == nameLength && pattern.equals(name)) {
			return new int[] { 0, patternLength };
		}
		break;
	case SearchPattern.RULE_PREFIX_MATCH:
		if (patternLength <= nameLength && name.substring(0, patternLength).equalsIgnoreCase(pattern)) {
			return new int[] { 0, patternLength };
		}
		break;
	case SearchPattern.RULE_PREFIX_MATCH | SearchPattern.RULE_CASE_SENSITIVE:
		if (name.startsWith(pattern)) {
			return new int[] { 0, patternLength };
		}
		break;
	case SearchPattern.RULE_PATTERN_MATCH:
		return StringUtils.getPatternMatchingRegions(pattern, 0, patternLength, name, 0, nameLength, false);
	case SearchPattern.RULE_PATTERN_MATCH | SearchPattern.RULE_CASE_SENSITIVE:
		return StringUtils.getPatternMatchingRegions(pattern, 0, patternLength, name, 0, nameLength, true);
	}
	return null;
}
 
开发者ID:angelozerr,项目名称:angularjs-eclipse,代码行数:36,代码来源:FilteredAngularElementsSelectionDialog.java

示例4: PipelineOptionsSelectionFilter

public PipelineOptionsSelectionFilter() {
  super(
      new SearchPattern(SearchPattern.RULE_CAMELCASE_MATCH | SearchPattern.RULE_PATTERN_MATCH));
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:4,代码来源:PipelineOptionsSelectionDialog.java

示例5: ResourceFilter

public ResourceFilter() {
	super(new SearchPattern(SearchPattern.RULE_PATTERN_MATCH));
	String pattern = "*" + patternMatcher.getPattern() + "*";
	patternMatcher.setPattern(pattern);
}
 
开发者ID:turnus,项目名称:turnus,代码行数:5,代码来源:WidgetSelectResource.java


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