Bug 32301 2 Packages with similar names have a problem displaying in the Java browsing perspective.
Hello, Thanks for a wonderful IDE with all these rich features. I think we have a small bug in the Java Browsing Perspective. As an example: Please create a package called "test" in your project. Then create a parallel package called "test_a". After refreshing project, test_a will show up as a child of "test" and also as its parallel project. "test_a" is actually a parallel package, and should show up only alongside "test", not under it. Thanks, agam
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesViewHierarchicalContentProvider.java
if(parent instanceof IPackageFragment){
					IPackageFragment pkgFragment= (IPackageFragment) parent;
					LogicalPackage logicalPkg= findLogicalPackage(pkgFragment);
					if (logicalPkg != null)
						return logicalPkg;
					else {
						LogicalPackage lp= createLogicalPackage(pkgFragment);
						if(lp == null)
							return pkgFragment;
						else return lp;
					}
				} else
					return fragment.getJavaProject();
			} 
		} catch (JavaModelException e) {
			JavaPlugin.log(e);
		}
		return null;
	}
	
	/*
	 * Check if the given IPackageFragment should be the member of a
	 * LogicalPackage and if so creates the LogicalPackage and adds it to the
	 * map.
	 */
	private LogicalPackage createLogicalPackage(IPackageFragment pkgFragment) {
		if(!fInputIsProject)
			return null;
		
		List fragments= new ArrayList();