Bug 17402 Search should use the package compression... [search]
Enable package compression in the Java preferences and change the Search sort order to be 'Parent Name'... it would be nice if the package names were compressed using the same compression as the packages view.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultLabelProvider.java
public static final int SHOW_ELEMENT_CONTAINER= 1; 
	public static final int SHOW_CONTAINER_ELEMENT= 2;
	public static final int SHOW_PATH= 3;
	public static final String POTENTIAL_MATCH= SearchMessages.getString("JavaSearchResultLabelProvider.potentialMatch"); 
	private AppearanceAwareLabelProvider fLabelProvider;
	private ILabelDecorator fDecorator;
	
	
	private IMarker fLastMarker;
	private IJavaElement fLastJavaElement;
	public JavaSearchResultLabelProvider() {
		fDecorator= PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator();
		fLabelProvider= 
			new AppearanceAwareLabelProvider(
				AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS,
				AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS,
				null);
	}	
	public String getText(Object o) {
		fLastMarker= null;
		IJavaElement javaElement= getJavaElement(o); 
		boolean isPotentialMatch= fLastMarker != null && fLastMarker.getAttribute(SearchUI.POTENTIAL_MATCH, false);
		if (javaElement == null) {
			if (fLastMarker != null) {