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
* (non-Javadoc)
	 * 
	 * @see org.eclipse.ui.dialogs.AbstractSearchDialog#storeDialog(org.eclipse.jface.dialogs.IDialogSettings)
	 */
	protected void storeDialog(IDialogSettings settings) {
		super.storeDialog(settings);
		settings.put(SHOW_DERIVED, showDerivedResourcesAction.isChecked());
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.ui.dialogs.AbstractSearchDialog#restoreDialog(org.eclipse.jface.dialogs.IDialogSettings)
	 */
	protected void restoreDialog(IDialogSettings settings) {
		super.restoreDialog(settings);
		boolean showDerived = settings.getBoolean(SHOW_DERIVED);
		showDerivedResourcesAction.setChecked(showDerived);
		resourceSearcher.setFilterParam(ResourceSearcher.DERIVED, new Boolean(
				showDerived));
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.ui.dialogs.AbstractSearchDialog#fillViewMenu(org.eclipse.jface.action.IMenuManager)
	 */
	protected void fillViewMenu(IMenuManager menuManager) {
		super.fillViewMenu(menuManager);
		showDerivedResourcesAction = new ShowDerivedResourcesAction();
		menuManager.add(showDerivedResourcesAction);
	}