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/ResourceSearcher.java
return new Status(IStatus.OK, WorkbenchPlugin.PI_WORKBENCH, 0, "", null); 
	}
	/**
	 * Use this method to further filter resources. As resources are gathered,
	 * if a resource matches the current pattern string, this method will be
	 * called. If this method answers false, the resource will not be included
	 * in the list of matches and the resource's children will NOT be considered
	 * for matching.
	 */
	protected boolean validateSearchedResource(IResource resource) {
		return true;
	}
	private void setSearchPattern(String text) {
		stop(false, false);
		patternString = adjustPattern(text);
		if (patternString.length() == 0) {
			model.reset();
		} else {
			stringMatcher = new StringMatcher(patternString, true, false);
			scheduleSearchJob();
		}
	}
	/**
	 * Adjust the pattern string for matching.
	 */
	protected String adjustPattern(String textPattern) {
		String text = textPattern.trim();
		if (text.endsWith("<")) { 
			
			return text.substring(0, text.length() - 1);