Bug 64897 packages view: not updated when project source folders change [browsing]
RC1 - browsing perspective - smoke test scenario... - import junit.zip into the previously not existing folder 'src' -> packages view shows a number of packages src.junit.framework... with errors - go to the project properties, source page - add 'src' as source folder, accept when asked to remove the project root as source folder - press OK -> the error marks in the packages view are removed -> the packages src... are still visible in the packages view -> they are only removed upon a selection change in the "projects" view
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/LogicalPackagesProvider.java
protected String getKey(IPackageFragment fragment) {
		return fragment.getElementName() + fragment.getJavaProject().getElementName();
	}
	/**
	 * Returns the logical package for the given package fragment
	 * or <code>null</code> if it is not grouped by logical package.
	 * 
	 * @param fragment the package fragment
	 * @return the logical package
	 */
	public LogicalPackage findLogicalPackage(IPackageFragment fragment) {
		Assert.isNotNull(fragment);
		if (isInCompoundState())
			return (LogicalPackage)fMapToLogicalPackage.get(getKey(fragment));
		else
			return null;
	}
	/**
	 * Combines packages with same names into a logical package which will
	 * be added to the resulting array. If a package is not yet in this content
	 * provider then the package fragment is added to the resulting array.
	 */
	protected Object[] combineSamePackagesIntoLogialPackages(IPackageFragment[] children) {
		if (!fCompoundState)
			return children;
		List newChildren= new ArrayList();
		for (int i= 0; i < children.length; i++) {
			IPackageFragment fragment=  children[i];
			
			if (fragment == null)