Bug 27764 IResource.findMarkers is called too often
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
if (cf != null && element.equals(cf))
						return;
				}
			}
			ISelection newSelection= new StructuredSelection(element);
			if (!fViewer.getSelection().equals(newSelection)) {
				try {
					fViewer.removeSelectionChangedListener(fSelectionListener);						
					fViewer.setSelection(newSelection);
					while (element != null && fViewer.getSelection().isEmpty()) {
						
						element= getParent(element);
						if (element != null) {
							newSelection= new StructuredSelection(element);
							fViewer.setSelection(newSelection);
						}
					}
				} finally {
					fViewer.addSelectionChangedListener(fSelectionListener);
				}
			}
		}
	}
	/**
	 * Returns the element's parent.
	 * 
	 * @return the parent or <code>null</code> if there's no parent
	 */
	private Object getParent(Object element) {
		if (element instanceof IJavaElement)