Bug 7127 'refactor' menu missing from the type hierarchy perspective
the 'refactor' menu is missing from the type hierarchy perspective
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ContainerCheckedTreeViewer.java
*/
	public Object[] getCheckedElements() {
		Object[] checked= super.getCheckedElements();
		
		ArrayList result= new ArrayList();
		for (int i= 0; i < checked.length; i++) {
			Object curr= checked[i];
			result.add(curr);
			Widget item= findItem(curr);
			if (item != null) {
				Item[] children= getChildren(item);
				
				if (children.length == 1 && children[0].getData() == null) {
					
					collectChildren(curr, result);
				}
			}
		}
		return result.toArray();
	}
	
	private void collectChildren(Object element, ArrayList result) {
		Object[] filteredChildren= getFilteredChildren(element);
		for (int i= 0; i < filteredChildren.length; i++) {
			Object curr= filteredChildren[i];
			result.add(curr);
			collectChildren(curr, result);
		}
	}
}