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 static final Object[] NO_CHILDREN= new Object[0];
	protected Map fMapToLogicalPackage;
	protected Map fMapToPackageFragments;
	protected boolean fCompoundState;
	protected StructuredViewer fViewer;
	protected boolean fInputIsProject;
	public LogicalPackagesProvider(StructuredViewer viewer){
		fViewer= viewer;
		fCompoundState= isInCompoundState();
		fInputIsProject= true;
		fMapToLogicalPackage= new HashMap();
		fMapToPackageFragments= new HashMap();
		JavaPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);	
	}
	
	/**
	 * Adds the given fragments to the internal map.
	 * Existing fragments will be replaced by the new ones. 
	 */
	protected void addFragmentsToMap(IPackageFragment[] children) {
		for (int i= 0; i < children.length; i++) {
			IPackageFragment fragment= children[i];
			String key= getKey(fragment);
			fMapToPackageFragments.put(key, fragment);
		}	
	}