Bug 25768 Package Explorer flashes too much on refresh and delete
build I20021105 - extracted a zip containing 22 non-Java files (.mxsd files from Dejan) into org.eclipse.ui - in Package Explorer, refreshed org.eclipse.ui - it flashed alot while refreshing - selected the 22 files and deleted them - it flashed even more
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
* Method declared on IElementChangedListener.
	 */
	public void elementChanged(final ElementChangedEvent event) {
		try {
			processDelta(event.getDelta());
		} catch(JavaModelException e) {
			JavaPlugin.log(e);
		}
	}
	/* (non-Javadoc)
	 * Method declared on IContentProvider.
	 */
	public void dispose() {
		super.dispose();
		JavaCore.removeElementChangedListener(this);
		fPackageFragmentProvider.dispose();
	}
	
	private boolean needsToDelegate(Object element) {
		int type= -1;
		if (element instanceof IJavaElement)
			type= ((IJavaElement)element).getElementType();
		return (!fIsFlatLayout && (type == IJavaElement.PACKAGE_FRAGMENT || type == IJavaElement.PACKAGE_FRAGMENT_ROOT || type == IJavaElement.JAVA_PROJECT));
	}		
	public Object[] getChildren(Object parentElement) {
		if (needsToDelegate(parentElement)) {
			Object[] packageFragments= fPackageFragmentProvider.getChildren(parentElement);
			return getWithParentsResources(packageFragments, parentElement);
		} else
			return super.getChildren(parentElement);