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
/**
	 * Filter param to change manner of searching. When its filter param is
	 * true, ResourceSearcher show all derived resources. It's set by
	 * <code> setFilterParam(int param, Object value) <code> method.
	 */
	public static final int DERIVED = 2;
	private List lastCompletedResult;
	private static Collator collator = Collator.getInstance();
	private String patternString = ""; 
	private IContainer container;
	private int typeMask;
	private StringMatcher stringMatcher;
	private StringMatcher lastComplitedMacher;
	private boolean showDerived = false;
	/**
	 * Creates a ResourceSearcher
	 * 
	 * @param container
	 *            which contains other resources