Community
Participate
Working Groups
We have the following code: import org.eclipse.jdt.core.search.*; new SearchEngine().searchAllTypeNames( aPackage, SearchPattern.R_EXACT_MATCH, aTypePrefix, SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CASE_SENSITIVE, IJavaSearchConstants.TYPE, aScope, aRequestor, IJavaSearchConstants.FORCE_IMMEDIATE_SEARCH, // IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null ); When we pass FORCE_IMMEDIATE_SEARCH, JobManager.performConcurrentJob() will call disable() to pause indexing. SearchPattern.acceptMatch() however asks the HierarchyScope, which spawns a CreateTypeHierarchyOperation, and IndexBasedHierarchyBuilder.determinePossibleSubTypes() starts another Job, using the hardcoded flag WAIT_UNTIL_READY_TO_SEARCH. Since the JobManager is disabled, it will wait forever to get scheduled. So maybe the initial waitingPolicy needs to be forwarded to the hierarchy creation job. Thread.sleep(long) line: not available [native method] IndexManager(JobManager).performConcurrentJob(IJob, int, IProgressMonitor) line: 248 IndexBasedHierarchyBuilder.legacySearchAllPossibleSubTypes(IType, IJavaSearchScope, Map, IPathRequestor, int, IProgressMonitor) line: 664 IndexBasedHierarchyBuilder.searchAllPossibleSubTypes(IType, IJavaSearchScope, Map, IPathRequestor, int, IProgressMonitor) line: 501 IndexBasedHierarchyBuilder.determinePossibleSubTypes(HashSet, IProgressMonitor) line: 453 IndexBasedHierarchyBuilder.build(boolean) line: 154 TypeHierarchy.compute() line: 320 TypeHierarchy.refresh(IProgressMonitor) line: 1316 CreateTypeHierarchyOperation.executeOperation() line: 91 CreateTypeHierarchyOperation(JavaModelOperation).run(IProgressMonitor) line: 733 CreateTypeHierarchyOperation(JavaModelOperation).runOperation(IProgressMonitor) line: 799 BinaryType.newTypeHierarchy(IJavaProject, WorkingCopyOwner, IProgressMonitor) line: 838 HierarchyScope.initialize(IProgressMonitor) line: 436 HierarchyScope.encloses(String, IProgressMonitor) line: 272 TypeDeclarationPattern(SearchPattern).acceptMatch(String, String, char, SearchPattern, IndexQueryRequestor, SearchParticipant, IJavaSearchScope, IProgressMonitor) line: 330 TypeDeclarationPattern(SearchPattern).findIndexMatches(Index, IndexQueryRequestor, SearchParticipant, IJavaSearchScope, IProgressMonitor) line: 2404 MatchLocator.findIndexMatches(SearchPattern, Index, IndexQueryRequestor, SearchParticipant, IJavaSearchScope, IProgressMonitor) line: 293 PatternSearchJob.search(Index, IProgressMonitor) line: 114 PatternSearchJob.execute(IProgressMonitor) line: 69 IndexManager(JobManager).performConcurrentJob(IJob, int, IProgressMonitor) line: 187 BasicSearchEngine.searchAllTypeNames(char[], int, char[], int, int, IJavaSearchScope, IRestrictedAccessTypeRequestor, int, IProgressMonitor) line: 1848 SearchEngine.searchAllTypeNames(char[], int, char[], int, int, IJavaSearchScope, TypeNameMatchRequestor, int, IProgressMonitor) line: 1199 JavaSearchUtil.findTypesByPrefix(String, String, IJavaSearchScope, boolean) line: 93
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.