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.model.WorkbenchLabelProvider#decorateText(java.lang.String,
		 *      java.lang.Object)
		 */
		protected String decorateText(String input, Object element) {
			IResource resource = ((IResource) element);
			if (resource.getType() == IResource.ROOT) {
				
				
				return null;
			}
			return resource.getFullPath().makeRelative().toString();
		}
	}
}