Bug 105034 [WorkbenchParts] IWorkbenchPage#hideView(IViewPart) does not always dispose of the view any more
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests1.java
while(fMyPart.getTreeViewer().getControl().getDisplay().readAndDispatch()) {}
		assertEquals("No refresh happened", 0, fMyPart.getRefreshedObject().size());
	}
		
	public void testRemoveCUsFromPackageFragment() throws Exception{
		
		
		IElementChangedListener listener= (IElementChangedListener) fProvider;
		IJavaElementDelta delta= TestDelta.createCUDelta(new ICompilationUnit[] { fCU2, fCU3 }, fPack6, IJavaElementDelta.REMOVED);
		listener.elementChanged(new ElementChangedEvent(delta, ElementChangedEvent.POST_CHANGE));
		
		
		while(fMyPart.getTreeViewer().getControl().getDisplay().readAndDispatch()) {}
		
		assertEquals("One refresh", 1, fMyPart.getRefreshedObject().size()); 
	}
	
	public void testRemoveCUFromPackageFragment() throws Exception {
		
		
		IElementChangedListener listener= (IElementChangedListener) fProvider;
		IJavaElementDelta delta= TestDelta.createCUDelta(new ICompilationUnit[]{fCU2}, fPack6, IJavaElementDelta.REMOVED);
		listener.elementChanged(new ElementChangedEvent(delta, ElementChangedEvent.POST_CHANGE));
					
		while(fMyPart.getTreeViewer().getControl().getDisplay().readAndDispatch()) {}
		assertTrue("Remove happened", fMyPart.hasRemoveHappened()); 
		assertTrue("Correct refresh", fMyPart.getRemovedObject().contains(fCU2)); 
		assertEquals("No refreshes", 0, fMyPart.getRefreshedObject().size()); 
	}