Bug 28443 organize imports sometimes added to logical packages, sometimes not
20021216 select a logical package - 'organize imports' is not in the context menu select the logical package and another package - organize imports is in the menu
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
result.add(elem);
							break;
						case IJavaElement.IMPORT_CONTAINER:
							result.add(elem.getParent());
							break;
						case IJavaElement.PACKAGE_FRAGMENT:
							collectCompilationUnits((IPackageFragment) elem, result);
							break;
						case IJavaElement.PACKAGE_FRAGMENT_ROOT:
							collectCompilationUnits((IPackageFragmentRoot) elem, result);
							break;
						case IJavaElement.JAVA_PROJECT:
							IPackageFragmentRoot[] roots= ((IJavaProject) elem).getPackageFragmentRoots();
							for (int k= 0; k < roots.length; k++) {
								collectCompilationUnits(roots[i], result);
							}
							break;			
					}
				}
			} catch (JavaModelException e) {
				JavaPlugin.log(e);
			}
		}
		return (ICompilationUnit[]) result.toArray(new ICompilationUnit[result.size()]);
	}
	
	private void collectCompilationUnits(IPackageFragment pack, Collection result) throws JavaModelException {
		result.addAll(Arrays.asList(pack.getCompilationUnits()));
	}
	private void collectCompilationUnits(IPackageFragmentRoot root, Collection result) throws JavaModelException {