Bug 3992 DCR: Need a "merged package" filter on Packages view (1GFKR0A)
This is for future, but would be really really nice. (it has probably been reported before by someone from the SWT team because our setup makes the need for this feature so obvious). Please add a filter to the Packages view that reorganizes the view so that PACKAGES are at the top level instead of FOLDERS. The current organization of the packages view spreads our SWT packages out over all of the folders that they are in, and it makes it hard to see all of the SWT packages. A much more useful view would be to have everything grouped into their containing package. For example, we have had to split the SWT packages across platform lines, and we therefore have folders for 'common', 'win32', 'motif', etc. When the .classpath is specified for Windows, only 'common' and 'win32' folders are displayed (with the cute little folder icon with a package peeking out of them). So we end up with 2 'folders' for each package. This looks like: Eclipse SWT/common Eclipse SWT/win32 Eclipse SWT Printing/common Eclipse SWT Printing/win32 Eclipse SWT Program/common Eclipse SWT Program/win32 Eclipse SWT Drag and Drop/common Eclipse SWT Drag and Drop/win32 So in order to find, say, the widgets package, you have to expand BOTH Eclipse SWT/common and Eclipse SWT/win32 folders, and you are constantly having to switch back and forth between the folders to see all of the classes in the package. This is sub-optimal. The optimal packages view would merge the folders by package, so we would only have to go to the package and expand one thing. Of course, it needs to be optional, because there are (rare) times when you do care what folder something is in (such as when you are organizing the folders in the first place). NOTES: VI (6/19/2001 4:43:32 PM) For an example of what it should look like, see the "bin" folder. CM (6/19/2001 4:43:53 PM) But make sure that the .class files from "bin" are not also showing in the packages. SN (6/19/2001 4:44:40 PM) If this filter is on, then search, open type, etc., etc., should only find what is on your classpath. (i.e. currently when we say "Open Type" we have to select the type for win32, motif, gtk, photon, ...) A whole new view that showed only packages and their classes (in their hierarchies!) would make me very happy.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java
try {
				new BusyIndicatorRunnableContext().run(false, false, op);
			} catch (InvocationTargetException e) {
				Throwable th= e.getTargetException();
				if (th instanceof JavaModelException) {
					throw (JavaModelException)th;
				} else {
					throw new JavaModelException(th, IStatus.ERROR);
				}
			} catch (InterruptedException e) {
				
			}
			
			fHierarchyRefreshNeeded= false;
		}
	}
	
	private void doHierarchyRefresh(IJavaElement element, IProgressMonitor pm) throws JavaModelException {
		boolean hierachyCreationNeeded= (fHierarchy == null || !element.equals(fInputElement));
		
		
		if (fHierarchy != null) {
			fHierarchy.removeTypeHierarchyChangedListener(this);
			JavaCore.removeElementChangedListener(this);
		}
		if (hierachyCreationNeeded) {
			fInputElement= element;
			if (element.getElementType() == IJavaElement.TYPE) {
				IType type= (IType) element;