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
IJavaElement parent= fragment.getParent();
		if ((parent instanceof IPackageFragmentRoot) && parent.exists()) {
			IPackageFragmentRoot root= (IPackageFragmentRoot) parent;
			if (root.isArchive() || !fragment.exists()) {
				return findNextLevelParentByElementName(fragment, root);
			} else {
				IResource resource= fragment.getUnderlyingResource();
				if ((resource != null) && (resource instanceof IFolder)) {
					IFolder folder= (IFolder) resource;
					IResource res= folder.getParent();
					IJavaElement el= JavaCore.create(res);
					return el;
				}
			}
		}
		return parent;
	}
	
	private Object findNextLevelParentByElementName(IJavaElement child, IJavaElement parent) {
		String name= child.getElementName();
		
		if(name.indexOf(".")==-1)   
			return parent;
		
		try {
			String realParentName= child.getElementName().substring(0,name.lastIndexOf("."));   
			IJavaElement[] children= new IJavaElement[0];
			
			if(parent instanceof IPackageFragmentRoot){
				IPackageFragmentRoot root= (IPackageFragmentRoot) parent;