Bug 26354 Errors Deleting packages in PackageExplorer
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageFragmentProvider.java
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(Viewer, Object, Object)
	 */
	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
		fViewer= (TreeViewer)viewer;
	}
	
	/*
	 * @see org.eclipse.jdt.core.IElementChangedListener#elementChanged(org.eclipse.jdt.core.ElementChangedEvent)
	 */
	public void elementChanged(ElementChangedEvent event) {
		processDelta(event.getDelta());
	}
	
	public void processDelta(IJavaElementDelta delta) {
		int kind = delta.getKind();
		final IJavaElement element = delta.getElement();
		if (element instanceof IPackageFragment) {
			if (kind == IJavaElementDelta.REMOVED) {
				postRunnable(new Runnable() {
					public void run() {
						Control ctrl = fViewer.getControl();
						if (ctrl != null && !ctrl.isDisposed()) {
							ctrl.setRedraw(false);
							if (!fFoldPackages)
								 ((TreeViewer) fViewer).remove(element);
							else
								refreshGrandParent(element);
							ctrl.setRedraw(true);
						}
					}