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.jface.viewers.LabelProvider#getImage(java.lang.Object)
		 */
		public Image getImage(Object element) {
			if (!(element instanceof ResourceSearchItem)) {
				return super.getImage(element);
			}
			IResource res = ((ResourceSearchItem) element).getResource();
			map.put(res, element);
			Image img = provider.getImage(res);
			return decorator.decorateImage(img, res);
		}
		/*
		 * (non-Javadoc)
		 * 
		 * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
		 */
		public String getText(Object element) {
			if (!(element instanceof ResourceSearchItem)) {
				return super.getText(element);
			}
			IResource res = ((ResourceSearchItem) element).getResource();
			map.put(res, element);
			String str = res.getName();
			
			if ((((ResourceSearchItem) element)).isDuplicate())
				str = str