Bug 126507 [CommonNavigator] [Java] Proposed Java extension for Common Navigator
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerLabelProvider.java
Object parent= fContentProvider.getParent(folder);
		int folderNameLenght= folder.getName().length() + 1;
		if(parent instanceof IPackageFragment) {
			String fragmentName= ((IPackageFragment)parent).getElementName();
			return fragmentName.length() + 1 + folderNameLenght;
		} else if (parent instanceof IFolder) {
			return getPrefixLength((IFolder)parent) + folderNameLenght;
		} else {
			return folderNameLenght;
		}
	}
	
	private String getNameDelta(IPackageFragment topFragment, IPackageFragment bottomFragment) {
		
		String topName= topFragment.getElementName();
		String bottomName= bottomFragment.getElementName();
		
		if(topName.equals(bottomName))
			return topName;
		
		String deltaname= bottomName.substring(topName.length()+1);	
		return deltaname;
	}
	
	public void setIsFlatLayout(boolean state) {
		fIsFlatLayout= state;
		fProblemDecorator.setIsFlatLayout(state);
	}
}