Bug 46669 [WorkingSets] "Select/Deselect All" button for working set creation wizard.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceWorkingSetPage.java
/**
     * Collects all checked resources in the specified container.
     * 
     * @param checkedResources the output, list of checked resources
     * @param container the container to collect checked resources in
     */
    private void findCheckedResources(List checkedResources,
            IContainer container) {
        IResource[] resources = null;
        try {
            resources = container.members();
        } catch (CoreException ex) {
            handleCoreException(
                    ex,
                    getShell(),
                    IDEWorkbenchMessages.ResourceWorkingSetPage_error,
                    IDEWorkbenchMessages.ResourceWorkingSetPage_error_updateCheckedState);
        }
        for (int i = 0; i < resources.length; i++) {
            if (tree.getGrayed(resources[i])) {
                if (resources[i].isAccessible())
                    findCheckedResources(checkedResources,
                            (IContainer) resources[i]);
                else
                    addWorkingSetElements(checkedResources,
                            (IContainer) resources[i]);
            } else if (tree.getChecked(resources[i])) {
                checkedResources.add(resources[i]);
            }
        }