Bug 26354 Errors Deleting packages in PackageExplorer
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageFragmentProvider.java
IJavaElement element= children[i];
				if (element instanceof IPackageFragment) {
					IPackageFragment frag= (IPackageFragment) element;
					String name= element.getElementName();
					if (!"".equals(fragmentname) && name.startsWith(fragmentname) && !name.equals(fragmentname)) { 
						String tail= name.substring(fragmentname.length() + 1);
						if (!"".equals(tail) && (tail.indexOf(".") == -1)) {
							list.add(frag);
						}
					}
				}
			}
		} catch (JavaModelException e) {
			JavaPlugin.log(e);
		}
		return list.toArray();
	}
	
	private List getTopLevelChildrenByElementName(IJavaElement[] elements){
		List topLevelElements= new ArrayList();
		for (int i= 0; i < elements.length; i++) {
			IJavaElement iJavaElement= elements[i];
			
			if((iJavaElement.getElementName().indexOf(".")==-1) && (iJavaElement instanceof IPackageFragment)){ 
				topLevelElements.add(iJavaElement);
			}
		}	
		return topLevelElements;
	}
	private List getFolders(IResource[] resources) throws JavaModelException {