final Object parent = getParent(element);
final Object parent = getHierarchicalPackageParent((IPackageFragment) element);
	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()) {							if (!fFoldPackages)								 fViewer.remove(element);							else								refreshGrandParent(element);						}					}				});				return;			} else if (kind == IJavaElementDelta.ADDED) {				final Object parent = getParent(element);				if (parent != null) {					postRunnable(new Runnable() {						public void run() {							Control ctrl = fViewer.getControl();							if (ctrl != null && !ctrl.isDisposed()) {								if (!fFoldPackages)									 fViewer.add(parent, element);								else									refreshGrandParent(element);							}						}					});				}				return;			} 		}	}