Bug 96459 Open Type blocked/frozen due to other threads holding a workspace lock
When the open type dialog is opened the first time the dialog executes a dummy search and restores the history to ensure that searches are answered quickly. To execute the dummy search the dialog has to create a workspace scope. However, creating a workspace scope can require the workspace lock, which in itself isn't a problem. But the UI freezes in this situation due to the fact that ModelEntry#updateClasspathContainer passes null as a progress monitor to JavaCore.setClasspathContainer. The job/runnable framework pops up a blocking dialog when null is pass as a progress monitor only if there isn't already a progress monitor opened. But there is already a progress monitor dialog open since the open type actions executes its runnable to do the dummy search via the PlatformUI.getWorkbench().getProgressService()#run(...). The freeze can only be fixed if creating a workspace scope will not take a look or if the progress monitor already available via the progress dialog will be passed down to setting the classpath container. Passing down the progress monitor will ensure that the progress dialog switches into blocking mode telling the user that the action can not be continued since it is blocked by another job. I will attach a VM dump showing this constellation. "VM Thread" prio=5 tid=0x009bdab0 nid=0x1150 runnable "VM Periodic Task Thread" prio=10 tid=0x009fef78 nid=0x130 waiting on condition "Suspend Checker Thread" prio=10 tid=0x00a02630 nid=0xe64 runnable Full thread dump Java HotSpot(TM) Client VM (1.4.2-b28 mixed mode): "Worker-8" prio=5 tid=0x047707d8 nid=0x1348 in Object.wait() [424f000..424fd94] at java.lang.Object.wait(Native Method) - waiting on <0x118439d8> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:167) - locked <0x118439d8> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:199) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60) "Worker-7" daemon prio=5 tid=0x031e8a28 nid=0x3a4 in Object.wait() [454f000..454fd94] at java.lang.Object.wait(Native Method) - waiting on <0x118439d8> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:167) - locked <0x118439d8> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:199) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60) "ModalContext" prio=7 tid=0x03221c08 nid=0xd2c in Object.wait() [450f000..450fd94] at java.lang.Object.wait(Native Method) - waiting on <0x13482720> (a org.eclipse.core.internal.jobs.ThreadJob) at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:170) - locked <0x13482720> (a org.eclipse.core.internal.jobs.ThreadJob) at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:88) at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:190) at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:96) at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:1674) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1714) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:782) at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:2822) at org.eclipse.jdt.core.JavaCore$5.run(JavaCore.java:3882) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:718) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1719) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3691) at org.eclipse.jdt.core.JavaCore.setClasspathContainer(JavaCore.java:3865) at org.eclipse.pde.internal.core.ModelEntry.updateClasspathContainer(ModelEntry.java:110) at org.eclipse.pde.internal.core.RequiredPluginsInitializer.initialize(RequiredPluginsInitializer.java:40) at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:1543) at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:1503) at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1016) at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:1317) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2048) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1956) at org.eclipse.jdt.internal.core.DeltaProcessingState.initializeRoots(DeltaProcessingState.java:265) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:715) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1719) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3691) at org.eclipse.jdt.core.JavaCore.setClasspathContainer(JavaCore.java:3865) at org.eclipse.pde.internal.core.ModelEntry.updateClasspathContainer(ModelEntry.java:110) at org.eclipse.pde.internal.core.RequiredPluginsInitializer.initialize(RequiredPluginsInitializer.java:40) at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:1543) at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1018) at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:1317) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2048) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1956) at org.eclipse.jdt.internal.core.search.JavaSearchScope.add(JavaSearchScope.java:108) at org.eclipse.jdt.internal.core.search.JavaWorkspaceScope.initialize(JavaWorkspaceScope.java:84) at org.eclipse.jdt.internal.core.search.JavaSearchScope.<init>(JavaSearchScope.java:62) at org.eclipse.jdt.internal.core.search.JavaSearchScope.<init>(JavaSearchScope.java:58) at org.eclipse.jdt.internal.core.search.JavaWorkspaceScope.<init>(JavaWorkspaceScope.java:29) at org.eclipse.jdt.internal.core.JavaModelManager.getWorkspaceScope(JavaModelManager.java:1384) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.createWorkspaceScope(BasicSearchEngine.java:157) at org.eclipse.jdt.core.search.SearchEngine.createWorkspaceScope(SearchEngine.java:392) at org.eclipse.jdt.internal.ui.dialogs.TypeSelectionDialog2$2.refreshSearchIndices(TypeSelectionDialog2.java:220) at org.eclipse.jdt.internal.ui.dialogs.TypeSelectionDialog2$2.run(TypeSelectionDialog2.java:204) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) "Worker-6" daemon prio=5 tid=0x0315bd58 nid=0xbe0 waiting for monitor entry [44cf000..44cfd94] at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:14 2) - waiting to lock <0x126e3ec8> (a java.lang.Object) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:67) "Worker-5" daemon prio=5 tid=0x02e4e3f8 nid=0x1d4 waiting for monitor entry [448f000..448fd94] at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:14 2) - waiting to lock <0x126e3ec8> (a java.lang.Object) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:67) "Worker-4" daemon prio=5 tid=0x03251008 nid=0xf68 in Object.wait() [444f000..444fd94] at java.lang.Object.wait(Native Method) - waiting on <0x13418918> (a org.eclipse.core.internal.jobs.ThreadJob) at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:170) - locked <0x13418918> (a org.eclipse.core.internal.jobs.ThreadJob) at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:88) at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:190) at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:96) at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:1674) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1714) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:782) at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:2822) at org.eclipse.jdt.core.JavaCore$5.run(JavaCore.java:3882) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:718) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1719) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3691) at org.eclipse.jdt.core.JavaCore.setClasspathContainer(JavaCore.java:3865) at org.eclipse.pde.internal.core.ModelEntry.updateClasspathContainer(ModelEntry.java:110) at org.eclipse.pde.internal.core.RequiredPluginsInitializer.initialize(RequiredPluginsInitializer.java:40) at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:1543) at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:1503) at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1016) at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:1317) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2048) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1956) at org.eclipse.jdt.internal.core.DeltaProcessingState.initializeRoots(DeltaProcessingState.java:265) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:715) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1719) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3691) at org.eclipse.jdt.core.JavaCore.setClasspathContainer(JavaCore.java:3865) at org.eclipse.pde.internal.core.ModelEntry.updateClasspathContainer(ModelEntry.java:110) at org.eclipse.pde.internal.core.RequiredPluginsInitializer.initialize(RequiredPluginsInitializer.java:40) at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:1543) at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1018) at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:1317) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2048) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1956) at org.eclipse.jdt.internal.core.search.JavaSearchScope.add(JavaSearchScope.java:108) at org.eclipse.jdt.internal.core.search.JavaWorkspaceScope.initialize(JavaWorkspaceScope.java:84) at org.eclipse.jdt.internal.core.search.JavaSearchScope.<init>(JavaSearchScope.java:62) at org.eclipse.jdt.internal.core.search.JavaSearchScope.<init>(JavaSearchScope.java:58) at org.eclipse.jdt.internal.core.search.JavaWorkspaceScope.<init>(JavaWorkspaceScope.java:29) at org.eclipse.jdt.internal.core.JavaModelManager.getWorkspaceScope(JavaModelManager.java:1384) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.createWorkspaceScope(BasicSearchEngine.java:157) at org.eclipse.jdt.core.search.SearchEngine.createWorkspaceScope(SearchEngine.java:392) at org.eclipse.jdt.core.JavaCore$1.run(JavaCore.java:2609) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:67) "Worker-3" daemon prio=5 tid=0x030a1878 nid=0x13a8 in Object.wait() [440f000..440fd94] at java.lang.Object.wait(Native Method) - waiting on <0x118439d8> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:167) - locked <0x118439d8> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:199) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60) "Worker-2" daemon prio=5 tid=0x03275a38 nid=0x17c8 in Object.wait() [43cf000..43cfd94] at java.lang.Object.wait(Native Method) - waiting on <0x118439d8> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:167) - locked <0x118439d8> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:199) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60) "Worker-1" daemon prio=5 tid=0x030a28c8 nid=0x15cc runnable [438f000..438fd94] at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(Util.java:49) at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.read(ClassFileReader.java:32) at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.read(ClassFileReader.java:64) at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.read(ClassFileReader.java:61) at org.eclipse.jdt.internal.core.builder.ClasspathDirectory.findClass(ClasspathDirectory.java:97) at org.eclipse.jdt.internal.core.builder.NameEnvironment.findClass(NameEnvironment.java:305) at org.eclipse.jdt.internal.core.builder.NameEnvironment.findType(NameEnvironment.java:313) at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:93) at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:43) at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:51) at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:167) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(CompilationUnitScope.java:403) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleImport(CompilationUnitScope.java:456) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInImports(CompilationUnitScope.java:321) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:390) at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:497) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:329) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:240) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:213) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:50) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:216) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:148) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:585) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1031) at org.eclipse.core.runtime.Platform.run(Platform.java:775) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:168) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:202) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:231) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1031) at org.eclipse.core.runtime.Platform.run(Platform.java:775) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:234) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:303) at org.eclipse.core.internal.resources.Project.build(Project.java:106) at org.eclipse.debug.core.model.LaunchConfigurationDelegate.buildProjects(LaunchConfigurationDelegate.java:335) at org.eclipse.debug.core.model.LaunchConfigurationDelegate.buildForLaunch(LaunchConfigurationDelegate.java:94) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:569) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:515) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:734) at org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlugin.java:932) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:67) "org.eclipse.jdt.internal.ui.text.JavaReconciler" daemon prio=2 tid=0x030d23b0 nid=0x1364 in Object.wait() [42ee000..42efd94] at java.lang.Object.wait(Native Method) - waiting on <0x128b76f0> (a org.eclipse.core.internal.jobs.ThreadJob) at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:170) - locked <0x128b76f0> (a org.eclipse.core.internal.jobs.ThreadJob) at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:88) at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:190) at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:96) at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:1674) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1714) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:782) at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:2822) at org.eclipse.jdt.core.JavaCore$5.run(JavaCore.java:3882) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:718) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1719) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3691) at org.eclipse.jdt.core.JavaCore.setClasspathContainer(JavaCore.java:3865) at org.eclipse.pde.internal.core.ModelEntry.updateClasspathContainer(ModelEntry.java:110) at org.eclipse.pde.internal.core.RequiredPluginsInitializer.initialize(RequiredPluginsInitializer.java:40) at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:1543) at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:1503) at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1016) at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:1317) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2048) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1956) at org.eclipse.jdt.internal.core.DeltaProcessingState.initializeRoots(DeltaProcessingState.java:265) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:715) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1719) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3691) at org.eclipse.jdt.core.JavaCore.setClasspathContainer(JavaCore.java:3865) at org.eclipse.pde.internal.core.ModelEntry.updateClasspathContainer(ModelEntry.java:110) at org.eclipse.pde.internal.core.RequiredPluginsInitializer.initialize(RequiredPluginsInitializer.java:40) at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:1543) at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1018) at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:1317) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2048) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1956) at org.eclipse.jdt.internal.core.JavaProject.buildStructure(JavaProject.java:341) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:233) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:488) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:232) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:218) at org.eclipse.jdt.internal.core.JavaProject.getJavaProjectElementInfo(JavaProject.java:1522) at org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2407) at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(SearchableEnvironment.java:60) at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(SearchableEnvironment.java:74) at org.eclipse.jdt.internal.core.CancelableNameEnvironment.<init>(CancelableNameEnvironment.java:26) at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:148) at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:214) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:79) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:718) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:777) at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1080) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy$1.run(JavaReconcilingStrategy.java:102) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1031) at org.eclipse.core.runtime.Platform.run(Platform.java:775) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:99) - locked <0x125ac500> (a org.eclipse.jdt.internal.core.CompilationUnit) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.initialReconcile(JavaReconcilingStrategy.java:181) at org.eclipse.jdt.internal.ui.text.CompositeReconcilingStrategy.initialReconcile(CompositeReconcilingStrategy.java:114) at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.initialReconcile(JavaCompositeReconcilingStrategy.j ava:120) at org.eclipse.jface.text.reconciler.MonoReconciler.initialProcess(MonoReconciler.java:103) at org.eclipse.jdt.internal.ui.text.JavaReconciler.initialProcess(JavaReconciler.java:307) - locked <0x1254e300> (a java.lang.Object) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:170) "Java indexing" daemon prio=4 tid=0x03073960 nid=0x5b8 in Object.wait() [428f000..428fd94] at java.lang.Object.wait(Native Method) - waiting on <0x12412100> (a org.eclipse.jdt.internal.core.search.indexing.IndexManager) at java.lang.Object.wait(Object.java:429) at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:349) - locked <0x12412100> (a org.eclipse.jdt.internal.core.search.indexing.IndexManager) at java.lang.Thread.run(Thread.java:534) "Worker-0" daemon prio=5 tid=0x02dbc460 nid=0x12e0 in Object.wait() [34df000..34dfd94] at java.lang.Object.wait(Native Method) - waiting on <0x1251de90> (a java.lang.Object) at java.lang.Object.wait(Object.java:429) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:469) - locked <0x1251de90> (a java.lang.Object) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(Selec tionListenerWithASTManager.java:165) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:14 2) - locked <0x126e3ec8> (a java.lang.Object) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:67) "Start Level Event Dispatcher" daemon prio=5 tid=0x02e8e008 nid=0x6ac in Object.wait() [304f000..304fd94] at java.lang.Object.wait(Native Method) - waiting on <0x1175cee8> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread) at java.lang.Object.wait(Object.java:429) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:348) - locked <0x1175cee8> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:286) "Framework Event Dispatcher" daemon prio=5 tid=0x02ea8008 nid=0x1224 in Object.wait() [300f000..300fd94] at java.lang.Object.wait(Native Method) - waiting on <0x1175cf38> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread) at java.lang.Object.wait(Object.java:429) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:348) - locked <0x1175cf38> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:286) "State Data Manager" daemon prio=5 tid=0x00a1a708 nid=0x770 waiting on condition [2fcf000..2fcfd94] at java.lang.Thread.sleep(Native Method) at org.eclipse.osgi.framework.adaptor.core.StateManager.run(StateManager.java:213) at java.lang.Thread.run(Thread.java:534) "Signal Dispatcher" daemon prio=10 tid=0x00a20620 nid=0x147c waiting on condition [0..0] "Finalizer" daemon prio=9 tid=0x0003d980 nid=0x670 in Object.wait() [2c7f000..2c7fd94] at java.lang.Object.wait(Native Method) - waiting on <0x11720138> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111) - locked <0x11720138> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159) "Reference Handler" daemon prio=10 tid=0x00a03668 nid=0x13dc in Object.wait() [2c3f000..2c3fd94] at java.lang.Object.wait(Native Method) - waiting on <0x117201a0> (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Object.java:429) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:115) - locked <0x117201a0> (a java.lang.ref.Reference$Lock) "main" prio=7 tid=0x000352b8 nid=0x9e4 runnable [7e000..7fc3c] at org.eclipse.swt.internal.win32.OS.WaitMessage(Native Method) at org.eclipse.swt.widgets.Display.sleep(Display.java:3228) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:154) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:303) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:447) at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:261) at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:861) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:895) at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:871) at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1070) at org.eclipse.jdt.internal.ui.dialogs.TypeSelectionDialog2.ensureConsistency(TypeSelectionDialog2.java:232) at org.eclipse.jdt.internal.ui.dialogs.TypeSelectionDialog2.open(TypeSelectionDialog2.java:145) at org.eclipse.jdt.internal.ui.actions.OpenTypeAction.run(OpenTypeAction.java:57) at org.eclipse.jdt.internal.ui.actions.OpenTypeAction.run(OpenTypeAction.java:78) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:246) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:223) at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:117) at org.eclipse.core.commands.Command.execute(Command.java:311) at org.eclipse.core.commands.ParameterizedCommand.execute(ParameterizedCommand.java:396) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:459) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:781) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:828) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:550) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:493) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:117) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:782) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:868) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:853) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:881) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:877) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1184) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3135) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3038) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3535) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1650) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2554) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1652) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1616) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:336) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:161) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:330) at org.eclipse.core.launcher.Main.basicRun(Main.java:274) at org.eclipse.core.launcher.Main.run(Main.java:969) at org.eclipse.core.launcher.Main.main(Main.java:944) "VM Thread" prio=5 tid=0x009bdab0 nid=0x1150 runnable "VM Periodic Task Thread" prio=10 tid=0x009fef78 nid=0x130 waiting on condition "Suspend Checker Thread" prio=10 tid=0x00a02630 nid=0xe64 runnable Interesting side note to the VM dump: the classpath container is initialized in parallel from three different threads: Model Context (triggered from open type), JavaCore#initializeAfterLoad and from a reconciler in the Java editor.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog2.java
} else {
				getShell().setText(Messages.format(
					JavaUIMessages.TypeSelectionDialog2_title_format,
					new String[] { fTitle, text}));
			}
		}
	}
	
	public TypeSelectionDialog2(Shell parent, boolean multi, IRunnableContext context, IJavaSearchScope scope, int elementKinds) {
		super(parent);
		setShellStyle(getShellStyle() | SWT.RESIZE);
		fMultipleSelection= multi;
		fRunnableContext= context;
		fScope= scope;
		fElementKind= elementKinds;
		fSelectionMode= NONE;
	}
	
	public void setFilter(String filter) {
		setFilter(filter, FULL_SELECTION);
	}
	
	public void setFilter(String filter, int selectionMode) {
		fInitialFilter= filter;
		fSelectionMode= selectionMode;
	}
	
	public void setValidator(ISelectionStatusValidator validator) {
		fValidator= validator;
	}