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/browsing/PackagesViewDeltaTests.java
for (int i= 0; i < expectedChildren.length; i++) {
			Object object= expectedChildren[i];
			if (object instanceof IJavaElement) {
				IJavaElement expfrag= (IJavaElement) object;
				if (expfrag.equals(fragment))
					return true;
			}
		}
		return false;
	}
	
	private boolean contains(LogicalPackage lp, Object[] expectedChildren) {
		for (int i= 0; i < expectedChildren.length; i++) {
			Object object= expectedChildren[i];
			if (object instanceof LogicalPackage) {
				LogicalPackage explp= (LogicalPackage) object;
				if (explp.equals(lp))
					return true;
			}
		}
		return false;
	}
	
	private void pushDisplay() {
		Control ctrl= fMyPart.getTreeViewer().getControl();
		while (ctrl != null && !ctrl.isDisposed() && fMyPart.getTreeViewer().getControl().getDisplay().readAndDispatch())
			ctrl= fMyPart.getTreeViewer().getControl();
	}
}