Skip to content

Commit

Permalink
Use SearchEngine in place of BasicSearchEngine
Browse files Browse the repository at this point in the history
  • Loading branch information
mickaelistria committed Sep 26, 2024
1 parent f9581e9 commit 8ae7a9a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.core.search.SearchPattern;
import org.eclipse.jdt.core.search.TypeNameMatchRequestor;
import org.eclipse.jdt.internal.core.AnnotatableInfo;
Expand Down Expand Up @@ -615,15 +616,15 @@ public void acceptTypeNameMatch(org.eclipse.jdt.core.search.TypeNameMatch match)
indexMatch.add(match.getType());
}
};
IJavaSearchScope scope = BasicSearchEngine.createJavaSearchScope(new IJavaProject[] { this.unit.getJavaProject() });
new BasicSearchEngine(this.owner).searchAllTypeNames(
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[] { this.unit.getJavaProject() });
new SearchEngine(this.owner).searchAllTypeNames(
packageName != null ? packageName.toCharArray() : null,
SearchPattern.R_EXACT_MATCH,
simpleName.toCharArray(),
SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE,
IJavaSearchConstants.TYPE,
scope,
new TypeNameMatchRequestorWrapper(requestor, scope),
requestor,
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
new NullProgressMonitor());
if (!indexMatch.isEmpty()) {
Expand Down

0 comments on commit 8ae7a9a

Please sign in to comment.