Bug 26354 Errors Deleting packages in PackageExplorer
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageFragmentProvider.java
}
				}
			} catch (JavaModelException e) {
				JavaPlugin.log(e);
			}
		}
		return parent;
	}
	private boolean hasSingleChild(IPackageFragment fragment) {
		return getChildren(fragment).length==1;
	}
	private Object findNextLevelChildrenByElementName(IJavaElement child, IPackageFragmentRoot parent) {
		String name= child.getElementName();
		
		if(name.indexOf(".")==-1) 
			return parent;
		
		try {
			String realParentName= child.getElementName().substring(0,name.lastIndexOf(".")); 
			
			IJavaElement[] children= parent.getChildren();
			
			for (int i= 0; i < children.length; i++) {
				IJavaElement element= children[i];
				if(element.getElementName().equals(realParentName))
					return element;
			}
		} catch (JavaModelException e) {
			JavaPlugin.log(e);
		}