Bug 145594 Typo in javadoc: ResourceSelectionDialog.java
In the Javadoc for org.eclipse.ui.dialogs.ResourceSelectionDialog, the example says: dialog.setInitialSelections(selectedResources)); note the extra ')'. I noticed when trying to paste this example into my own code.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/ResourceSelectionDialog.java
*/
    private void initializeDialog() {
        selectionGroup.addCheckStateListener(new ICheckStateListener() {
            public void checkStateChanged(CheckStateChangedEvent event) {
                getOkButton().setEnabled(
                        selectionGroup.getCheckedElementCount() > 0);
            }
        });
        if (getInitialElementSelections().isEmpty()) {
			getOkButton().setEnabled(false);
		} else {
			checkInitialSelections();
		}
    }
    /**
     * The <code>ResourceSelectionDialog</code> implementation of this 
     * <code>Dialog</code> method builds a list of the selected resources for later 
     * retrieval by the client and closes this dialog.
     */
    protected void okPressed() {
        Iterator resultEnum = selectionGroup.getAllCheckedListItems();
        ArrayList list = new ArrayList();
        while (resultEnum.hasNext()) {
			list.add(resultEnum.next());
		}
        setResult(list);
        super.okPressed();
    }
}