for (int i = 0; i < children.length; i++) { if (children[i] instanceof IPackageFragment) { IPackageFragment fragment = (IPackageFragment) children[i]; if(!fragment.isDefaultPackage()) children[i] = getBottomPackage(fragment);
int size= children.size(); for (int i = 0; i < size; i++) { Object curr= children.get(i); if (curr instanceof IPackageFragment) { IPackageFragment fragment = (IPackageFragment) curr; if (!fragment.isDefaultPackage() && isEmpty(fragment)) { IPackageFragment collapsed= getCollapsed(fragment); if (collapsed != null) { children.set(i, collapsed); } }
	private Object[] filter(Object[] children) {		if (fFoldPackages) {			for (int i = 0; i < children.length; i++) {				if (children[i] instanceof IPackageFragment) {					IPackageFragment fragment = (IPackageFragment) children[i];					if(!fragment.isDefaultPackage())						children[i] = getBottomPackage(fragment);				}			}		}		return children;	}