congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CharOperation.substringMatch
Code IndexAdd Tabnine to your IDE (free)

How to use
substringMatch
method
in
org.eclipse.jdt.core.compiler.CharOperation

Best Java code snippets using org.eclipse.jdt.core.compiler.CharOperation.substringMatch (Showing top 15 results out of 315)

origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

if (templateName.startsWith(content, 1)) {
  valid= true;
} else if (isSubstringEnabled && CharOperation.substringMatch(content.indexOf('<') == 0 ? content.substring(1) : content, templateName.substring(1))) {
  valid= true;
  fIsSubstringMatch= true;
origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Checks whether name matches the token according to the current
 * code completion settings (substring match, camel case match etc.)
 * and sets whether the current match is a suffix proposal.
 * 
 * @param token the token that is tested
 * @param name the name to match
 * @return <code>true</code> if the token does not match,
 * <code>false</code> otherwise
 */
private boolean isFailedMatch(char[] token, char[] name) {
  if ((this.options.substringMatch && CharOperation.substringMatch(token, name))
      || (this.options.camelCaseMatch && CharOperation.camelCaseMatch(token, name))
      || CharOperation.prefixEquals(token, name, false)) {
    return false;
  }
  return true;
}
private boolean isForbidden(ReferenceBinding binding) {
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

/**
 * Checks whether name matches the token according to the current
 * code completion settings (substring match, camel case match etc.)
 * and sets whether the current match is a suffix proposal.
 * 
 * @param token the token that is tested
 * @param name the name to match
 * @return <code>true</code> if the token does not match,
 * <code>false</code> otherwise
 */
private boolean isFailedMatch(char[] token, char[] name) {
  if ((this.options.substringMatch && CharOperation.substringMatch(token, name))
      || (this.options.camelCaseMatch && CharOperation.camelCaseMatch(token, name))
      || CharOperation.prefixEquals(token, name, false)) {
    return false;
  }
  return true;
}
private boolean isForbidden(ReferenceBinding binding) {
origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * Checks whether name matches the token according to the current
 * code completion settings (substring match, camel case match etc.)
 * and sets whether the current match is a suffix proposal.
 * 
 * @param token the token that is tested
 * @param name the name to match
 * @return <code>true</code> if the token does not match,
 * <code>false</code> otherwise
 */
private boolean isFailedMatch(char[] token, char[] name) {
  if ((this.options.substringMatch && CharOperation.substringMatch(token, name))
      || (this.options.camelCaseMatch && CharOperation.camelCaseMatch(token, name))
      || CharOperation.prefixEquals(token, name, false)) {
    return false;
  }
  return true;
}
private boolean isForbidden(ReferenceBinding binding) {
origin: org.eclipse.jdt/org.eclipse.jdt.ui

if (templateName.startsWith(content, 1)) {
  valid= true;
} else if (isSubstringEnabled && CharOperation.substringMatch(content.indexOf('<') == 0 ? content.substring(1) : content, templateName.substring(1))) {
  valid= true;
  fIsSubstringMatch= true;
origin: org.eclipse.jdt/org.eclipse.jdt.ui

/**
 * Matches the given <code>pattern</code> in <code>string</code> and returns the match rule.
 * 
 * @param pattern the pattern to match
 * @param string the string to look for the pattern
 * @return the match rule used to match the given <code>pattern</code> in <code>string</code>,
 *         or -1 if the <code>pattern</code> doesn't match the <code>string</code> based on any
 *         rule
 * @since 3.12
 */
protected int getPatternMatchRule(String pattern, String string) {
  String start;
  try {
    start= string.substring(0, pattern.length());
  } catch (StringIndexOutOfBoundsException e) {
    String message= "Error retrieving proposal text.\nDisplay string:\n" + string + "\nPattern:\n" + pattern; //$NON-NLS-1$//$NON-NLS-2$
    JavaPlugin.log(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.OK, message, e));
    return -1;
  }
  if (start.equalsIgnoreCase(pattern)) {
    return SearchPattern.R_PREFIX_MATCH;
  } else if (isCamelCaseMatching() && CharOperation.camelCaseMatch(pattern.toCharArray(), string.toCharArray())) {
    return SearchPattern.R_CAMELCASE_MATCH;
  } else if (isSubstringMatching() && CharOperation.substringMatch(pattern.toCharArray(), string.toCharArray())) {
    return SearchPattern.R_SUBSTRING_MATCH;
  } else {
    return -1;
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

/**
 * Matches the given <code>pattern</code> in <code>string</code> and returns the match rule.
 * 
 * @param pattern the pattern to match
 * @param string the string to look for the pattern
 * @return the match rule used to match the given <code>pattern</code> in <code>string</code>,
 *         or -1 if the <code>pattern</code> doesn't match the <code>string</code> based on any
 *         rule
 * @since 3.12
 */
protected int getPatternMatchRule(String pattern, String string) {
  String start;
  try {
    start= string.substring(0, pattern.length());
  } catch (StringIndexOutOfBoundsException e) {
    String message= "Error retrieving proposal text.\nDisplay string:\n" + string + "\nPattern:\n" + pattern; //$NON-NLS-1$//$NON-NLS-2$
    JavaPlugin.log(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.OK, message, e));
    return -1;
  }
  if (start.equalsIgnoreCase(pattern)) {
    return SearchPattern.R_PREFIX_MATCH;
  } else if (isCamelCaseMatching() && CharOperation.camelCaseMatch(pattern.toCharArray(), string.toCharArray())) {
    return SearchPattern.R_CAMELCASE_MATCH;
  } else if (isSubstringMatching() && CharOperation.substringMatch(pattern.toCharArray(), string.toCharArray())) {
    return SearchPattern.R_SUBSTRING_MATCH;
  } else {
    return -1;
  }
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

int computeRelevanceForCaseMatching(char[] token, char[] proposalName){
  if(CharOperation.equals(token, proposalName, true)) {
    return R_EXACT_NAME + R_CASE;
  } else if(CharOperation.equals(token, proposalName, false)) {
    return R_EXACT_NAME;
  } else if (CharOperation.prefixEquals(token, proposalName, false)) {
    if (CharOperation.prefixEquals(token, proposalName, true))
      return R_CASE;
  } else if (this.options.camelCaseMatch && CharOperation.camelCaseMatch(token, proposalName)){
      return R_CAMEL_CASE;
  } else if (this.options.substringMatch && CharOperation.substringMatch(token, proposalName)) {
    return R_SUBSTRING;
  }
  return 0;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

int computeRelevanceForCaseMatching(char[] token, char[] proposalName){
  if(CharOperation.equals(token, proposalName, true)) {
    return R_EXACT_NAME + R_CASE;
  } else if(CharOperation.equals(token, proposalName, false)) {
    return R_EXACT_NAME;
  } else if (CharOperation.prefixEquals(token, proposalName, false)) {
    if (CharOperation.prefixEquals(token, proposalName, true))
      return R_CASE;
  } else if (this.options.camelCaseMatch && CharOperation.camelCaseMatch(token, proposalName)){
      return R_CAMEL_CASE;
  } else if (this.options.substringMatch && CharOperation.substringMatch(token, proposalName)) {
    return R_SUBSTRING;
  }
  return 0;
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

int computeRelevanceForCaseMatching(char[] token, char[] proposalName){
  if(CharOperation.equals(token, proposalName, true)) {
    return R_EXACT_NAME + R_CASE;
  } else if(CharOperation.equals(token, proposalName, false)) {
    return R_EXACT_NAME;
  } else if (CharOperation.prefixEquals(token, proposalName, false)) {
    if (CharOperation.prefixEquals(token, proposalName, true))
      return R_CASE;
  } else if (this.options.camelCaseMatch && CharOperation.camelCaseMatch(token, proposalName)){
      return R_CAMEL_CASE;
  } else if (this.options.substringMatch && CharOperation.substringMatch(token, proposalName)) {
    return R_SUBSTRING;
  }
  return 0;
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

if (JavaCore.ENABLED.equals(JavaCore.getOption(JavaCore.CODEASSIST_SUBSTRING_MATCH)) && CharOperation.substringMatch(pattern, displayString)) {
  matchRule= SearchPattern.R_SUBSTRING_MATCH;
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

if (JavaCore.ENABLED.equals(JavaCore.getOption(JavaCore.CODEASSIST_SUBSTRING_MATCH)) && CharOperation.substringMatch(pattern, displayString)) {
  matchRule= SearchPattern.R_SUBSTRING_MATCH;
origin: org.eclipse.tycho/org.eclipse.jdt.core

for (int i = 0; i < choices.length; i++)
  if (length <= choices[i].length && (CharOperation.prefixEquals(keyword, choices[i], false /* ignore case */)
      || (this.options.substringMatch && CharOperation.substringMatch(keyword, choices[i])))) {
    if (ignorePackageKeyword && CharOperation.equals(choices[i], Keywords.PACKAGE))
      continue;
origin: org.eclipse.jdt/org.eclipse.jdt.core

for (int i = 0; i < choices.length; i++)
  if (length <= choices[i].length && (CharOperation.prefixEquals(keyword, choices[i], false /* ignore case */)
      || (this.options.substringMatch && CharOperation.substringMatch(keyword, choices[i])))) {
    if (ignorePackageKeyword && CharOperation.equals(choices[i], Keywords.PACKAGE))
      continue;
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

for (int i = 0; i < choices.length; i++)
  if (length <= choices[i].length && (CharOperation.prefixEquals(keyword, choices[i], false /* ignore case */)
      || (this.options.substringMatch && CharOperation.substringMatch(keyword, choices[i])))) {
    if (ignorePackageKeyword && CharOperation.equals(choices[i], Keywords.PACKAGE))
      continue;
org.eclipse.jdt.core.compilerCharOperationsubstringMatch

Javadoc

Answers true if the characters of the pattern are contained in the name as a substring, in a case-insensitive way.

Popular methods of CharOperation

  • equals
    If isCaseSensite is true, answers true if the two arrays are identical character by character, other
  • lastIndexOf
    Answers the last index in the array for which the corresponding character is equal to toBeFound star
  • splitOn
    Return a new array which is the split of the given array using the given divider. The given end is e
  • subarray
    Answers a new array which is a copy of the given array starting at the given start and ending at the
  • toString
    Answers a string which is the concatenation of the given array using the '.' as a separator. For ex
  • arrayConcat
    Answers the concatenation of the two arrays. It answers null if the two arrays are null. If the firs
  • camelCaseMatch
    Answers true if the pattern matches the given name using CamelCase rules, or false otherwise. char[]
  • concatWith
    Answers the concatenation of the given array parts using the given separator between each part and a
  • pathMatch
    Answers true if the pattern matches the filepath using the pathSepatator, false otherwise. Path char
  • indexOf
    Answers the first index in the array for which the toBeFound array is a matching subarray following
  • replace
    Answers a new array of characters with substitutions. No side-effect is operated on the original arr
  • compareTo
    Compares the two char arrays lexicographically between the given start and end positions. Returns a
  • replace,
  • compareTo,
  • concat,
  • fragmentEquals,
  • isWhitespace,
  • match,
  • replaceOnCopy,
  • hashCode,
  • prefixEquals,
  • deepCopy

Popular in Java

  • Making http post requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Option (scala)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now