Bug 26354 Errors Deleting packages in PackageExplorer
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageFragmentProvider.java
processDelta(affectedChildren[i]);
			}
		}
	}
	
	private void postRunnable(final Runnable r) {
		Control ctrl= fViewer.getControl();
		if (ctrl != null && !ctrl.isDisposed()) {
			Display currentDisplay= Display.getCurrent();
			if (currentDisplay != null && currentDisplay.equals(ctrl.getDisplay()))
				ctrl.getDisplay().syncExec(r);
			else
				ctrl.getDisplay().asyncExec(r);
		}
	}
	/*
	 * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
	 */
	public void propertyChange(PropertyChangeEvent event) {
		if(AppearancePreferencePage.arePackagesFoldedInHierarchicalLayout()!=fFoldPackages){
			fFoldPackages= AppearancePreferencePage.arePackagesFoldedInHierarchicalLayout();
			fViewer.getControl().setRedraw(false);
			Object[] expandedObjects= fViewer.getExpandedElements();
			fViewer.refresh();	
			fViewer.setExpandedElements(expandedObjects);
			fViewer.getControl().setRedraw(true);
		}
	}
}