Bug 124338 [Dialogs] ResourceSelectionDialog should allow to implement custom acceptance criteria
I suggest to refactor ResourceSelectionDialog so there will be methods to access checked items and enable OK button respectively. This should allow to implement custom strategy to accept selected elements.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/ResourceSearchDialog.java
private static final String DIALOG_SETTINGS = "org.eclipse.ui.dialogs.ResourceSearchDialog"; 
	private static final String SHOW_DERIVED = "ShowDerived"; 
	private ResourceSearcher resourceSearcher;
	private ShowDerivedResourcesAction showDerivedResourcesAction;
	/**
	 * Creates a new instance of the class
	 * 
	 * @param shell
	 *            the parent shell
	 * @param multi
	 *            the multi selection flag
	 * @param container
	 *            the container
	 * @param typesMask
	 *            the types mask
	 */
	public ResourceSearchDialog(Shell shell, boolean multi,
			IContainer container, int typesMask) {
		super(shell, multi);
		setTitle(IDEWorkbenchMessages.OpenResourceDialog_title);
		PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
				IIDEHelpContextIds.OPEN_RESOURCE_DIALOG);
		resourceSearcher = new ResourceSearcher(container, typesMask);
		setSearcher(resourceSearcher);
	}
	/**
	 * Creates a new instance of the class
	 * 
	 * @param shell