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
public Object getObjectToReturn(Object item) {
		ResourceHistory history = ResourceHistory.getInstance();
		ResourceSearchItem resourceDecorator = (ResourceSearchItem) item;
		history.accessed(resourceDecorator.getResource());
		return resourceDecorator.getResource();
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.ui.dialogs.AbstractSearcher#setFilterParam(int,
	 *      java.lang.Object)
	 */
	public void setFilterParam(int param, Object value) {
		if (param == PATTERN) {
			setSearchPattern((String) value);
		}
		if (param == DERIVED) {
			boolean isDerived = ((Boolean) value).booleanValue();
			showDerived = isDerived;
			if (isDerived)
				lastComplitedMacher = null;
			setSearchPattern(patternString);
		}
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.ui.dialogs.AbstractSearcher#validateElement(java.lang.Object)
	 */
	public IStatus validateElement(Object item) {