Bug 93613 [package explorer] Inner class org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.PackageExplorerProblemTreeViewer has links to its instance in parent
Class org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.PackageExplorerProblemTreeViewer is referencing fViewer field from PackageExplorerPart, which is actually instance of PackageExplorerProblemTreeViewer class. Should be methods getFilters() and getContentProvider() called directly and in method filter() "this" should be used instead of fViewer. Also, in order to make PackageExplorerProblemTreeViewer more reusable (e.g. to allow splits or multiple views) it would make sense to make this inner class static and keep states of isFlat and showWorkingSets flags in this class instead of the PackageExplorerPart class.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider;
import org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer;
import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater;
import org.eclipse.jdt.internal.ui.workingsets.ConfigureWorkingSetAction;
import org.eclipse.jdt.internal.ui.workingsets.HistoryWorkingSetUpdater;
import org.eclipse.jdt.internal.ui.workingsets.ViewActionGroup;
import org.eclipse.jdt.internal.ui.workingsets.WorkingSetFilterActionGroup;
import org.eclipse.jdt.internal.ui.workingsets.WorkingSetModel;
 
/**
 * The ViewPart for the ProjectExplorer. It listens to part activation events.
 * When selection linking with the editor is enabled the view selection tracks
 * the active editor page. Similarly when a resource is selected in the packages
 * view the corresponding editor is activated. 
 */
 
public class PackageExplorerPart extends ViewPart  
	implements ISetSelectionTarget, IMenuListener,
		IShowInTarget,
		IPackagesViewPart,  IPropertyChangeListener, 
		IViewPartInputProvider {
	
	private static final String PERF_CREATE_PART_CONTROL= "org.eclipse.jdt.ui/perf/explorer/createPartControl"; 
	private static final String PERF_MAKE_ACTIONS= "org.eclipse.jdt.ui/perf/explorer/makeActions"; 
	
	private boolean fIsCurrentLayoutFlat; 
	private static final int HIERARCHICAL_LAYOUT= 0x1;
	private static final int FLAT_LAYOUT= 0x2;
	
	public final static String VIEW_ID= JavaUI.ID_PACKAGES;