Bug 72388 No types available after opening a closed project
hi, I am using: Version: 3.1.0 Build id: 200408170800 I had a few java projects that were closed before the last shutdown of hte eclipse platform. When I restarted the platform, i used the context menu to open one of the projects. I waited till i saw that the progress monitor showing that it had started building the classes. At this point, I hit Ctrl+Shift+T to get the "open type" dialog - but instead, I got an error dialog whote title was "Type Selection" saying that "No types available". At this stage, keeping the project open, if I shutdown and restart the eclipse platform, Ctrl+Shift+T works as expected. But I should not need to restart eclipse. Could this be rectified?
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/AllTypesCacheTest.java
JavaProjectHelper.setAutoBuilding(fWasAutobuild);
	}
	public void testDifferentScopes() throws Exception {
		IJavaSearchScope workspaceScope= SearchEngine.createWorkspaceScope();
		IJavaSearchScope proj1Scope= SearchEngine.createJavaSearchScope(new IJavaElement[] { fJProject1 });
		IJavaSearchScope proj2Scope= SearchEngine.createJavaSearchScope(new IJavaElement[] { fJProject2 });
		
		ArrayList res1= new ArrayList();
		
		AllTypesCache.getTypes(workspaceScope, IJavaSearchConstants.TYPE, null, res1);
		assertTrue("542 types in workspace expected, is " + res1.size(), res1.size() == 542);
		
		int nFlushes= AllTypesCache.getNumberOfCacheFlushes();
		
		res1.clear();		
		AllTypesCache.getTypes(workspaceScope, IJavaSearchConstants.INTERFACE, null, res1);
		assertTrue("73 interfaces in workspace expected, is " + res1.size(), res1.size() == 73);
		
		assertTrue("unnecessary flush of cache", AllTypesCache.getNumberOfCacheFlushes() == nFlushes);	
		
		res1.clear();
		AllTypesCache.getTypes(workspaceScope, IJavaSearchConstants.CLASS, null, res1);
		assertTrue("469 classes in workspace expected, is " + res1.size(), res1.size() == 469);
		
		assertTrue("unnecessary flush of cache", AllTypesCache.getNumberOfCacheFlushes() == nFlushes);
		
		res1.clear();
		AllTypesCache.getTypes(proj1Scope, IJavaSearchConstants.TYPE, null, res1);
		assertTrue("471 types in proj1 expected, is " + res1.size(), res1.size() == 471);