Bug 72923 Delete from Package Explorer removes file but not empty package [package explorer]
This process is a little inconsistant. Sometimes it will work, but most of the time it will not remove the empty package structure. 1. Delete a java file in a package from the Package Explorer 2. Both java file and the empty package disappear from the Package Explorer 3. Add another file to the project 4. Click Refresh from the Package Explorer Expected Results: The empty package should not show up Actual Results: The empty package shows up Delete this package again Add a file Click Refresh The empty package shows up with one directory removed from it
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
return findAddedElement(affectedChildren[i]);
			
		return null;
	}
	/**
	 * Updates the package icon
	 */
	 private void postUpdateIcon(final IJavaElement element) {
	 	postRunnable(new Runnable() {
			public void run() {
				
				Control ctrl= fViewer.getControl();
				if (ctrl != null && !ctrl.isDisposed()) 
					fViewer.update(element, new String[]{IBasicPropertyConstants.P_IMAGE});
			}
		});
	 }
		/**
	1	 * Process a resource delta.
		 * 
		 * @return true if the parent got refreshed
		 */
		private boolean processResourceDelta(IResourceDelta delta, Object parent) {
			int status= delta.getKind();
			int flags= delta.getFlags();
			
			IResource resource= delta.getResource();
			
			if (resource == null)
				return false;