Bug 26354 Errors Deleting packages in PackageExplorer
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageFragmentProvider.java
private Object getBottomPackage(IPackageFragment iPackageFragment) {
		try {
			if(isEmpty(iPackageFragment))
				return findChildrenToBeCompounded(iPackageFragment);
		} catch (JavaModelException e) {
			JavaPlugin.log(e);
		}
		return iPackageFragment;
	}
	
	private IPackageFragment findChildrenToBeCompounded(IPackageFragment fragment) throws JavaModelException {
		Object[] children = getChildren(fragment);
		if ((children.length == 1) && (children[0] instanceof IPackageFragment)) {
			if (isEmpty((IPackageFragment) children[0]))
				return findChildrenToBeCompounded((IPackageFragment) children[0]);
			else return (IPackageFragment)children[0];
		}
		return fragment;
	}
	
	private boolean isEmpty(IPackageFragment fragment) throws JavaModelException {
		return (!fragment.containsJavaResources()) && (fragment.getNonJavaResources().length==0);
	}
	
	private Object[] findNextLevelChildrenByElementName(IPackageFragmentRoot parent, IPackageFragment fragment) {
		List list= new ArrayList();
		try {
			IJavaElement[] children= parent.getChildren();
			String fragmentname= fragment.getElementName();
			for (int i= 0; i < children.length; i++) {