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
private List lastResult;
		/**
		 * @param ticket
		 * @param lastResult
		 * @param model
		 * @param history
		 * @param mode
		 */
		public ResourceCachedResultJob(int ticket, List lastResult,
				SearcherModel model, ResourceHistory history) {
			super(ticket, model, history);
			this.lastResult = lastResult;
		}
		protected void searchResults(Set filteredHistory,
				SearcherProgressMonitor monitor) throws CoreException {
			model.reset();
			for (Iterator iter = lastResult.iterator(); iter.hasNext();) {
				ResourceSearchItem resource = (ResourceSearchItem) iter.next();
				if (!getShowDerived() && resource.getResource().isDerived())
					continue;
				if (filteredHistory.contains(resource.getResource()))
					continue;
				if (match(resource.getResource().getName()))