List of usage examples for org.eclipse.jdt.core.search SearchPattern validateMatchRule
public static int validateMatchRule(String stringPattern, int matchRule)
From source file:bndtools.internal.pkgselection.SearchUtils.java
License:Open Source License
/** * Returns whether the given pattern is a camel case pattern or not. <em>Note: this method does not consider the * {@link SearchPattern#R_CAMELCASE_SAME_PART_COUNT_MATCH} variant.<em> * /*from w w w . j ava2s .c o m*/ * @param pattern the pattern to inspect * @return whether it is a camel case pattern or not */ public static boolean isCamelCasePattern(String pattern) { return SearchPattern.validateMatchRule(pattern, SearchPattern.R_CAMELCASE_MATCH) == SearchPattern.R_CAMELCASE_MATCH; }
From source file:ca.ecliptical.pde.ds.search.DescriptorQueryParticipant.java
License:Open Source License
private int getMatchMode(String pattern) { if (pattern.indexOf('*') != -1 || pattern.indexOf('?') != -1) return SearchPattern.R_PATTERN_MATCH; if (SearchPattern.validateMatchRule(pattern, SearchPattern.R_CAMELCASE_MATCH) == SearchPattern.R_CAMELCASE_MATCH) return SearchPattern.R_CAMELCASE_MATCH; return SearchPattern.R_EXACT_MATCH; }