List of usage examples for org.eclipse.jdt.internal.core.search.matching PossibleMatchSet getPossibleMatches
public PossibleMatch[] getPossibleMatches(IPackageFragmentRoot[] roots)
From source file:org.eclipse.jdt.internal.core.search.matching.MatchLocator.java
License:Open Source License
/** * Locate the matches amongst the possible matches. *///from w w w .j a va 2 s . c o m protected void locateMatches(JavaProject javaProject, PossibleMatchSet matchSet, int expected) throws CoreException { PossibleMatch[] possibleMatches = matchSet.getPossibleMatches(javaProject.getPackageFragmentRoots()); int length = possibleMatches.length; // increase progress from duplicate matches not stored in matchSet while adding... if (this.progressMonitor != null && expected > length) { this.progressWorked += expected - length; this.progressMonitor.worked(expected - length); } // locate matches (processed matches are limited to avoid problem while using VM default memory heap size) for (int index = 0; index < length;) { int max = Math.min(MAX_AT_ONCE, length - index); locateMatches(javaProject, possibleMatches, index, max); index += max; } this.patternLocator.clear(); }