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
/**
		 * Creates a new instance of the action.
		 * 
		 * @param searchEngine
		 *            the search engine
		 */
		public ShowDerivedResourcesAction() {
			super(
					IDEWorkbenchMessages.ResourceSearchDialog_showDerivedResourcesAction,
					IAction.AS_CHECK_BOX);
		}
		public void run() {
			resourceSearcher.setFilterParam(ResourceSearcher.DERIVED,
					new Boolean(isChecked()));
		}
	}
	/**
	 * A label provider for ResourceDecorator objects. It creates labels with a
	 * resource full path for duplicates. It uses the Platform UI label
	 * decorator for providing extra resource info.
	 * 
	 * @since 3.3
	 */
	private class ResourceDecoratorLabelDecorator extends LabelProvider