getShell(), provider, treeContentProvider);
// dialog.setComparator(new JavaElementComparator());
dialog.setAllowMultiple(false);
dialog.setValidator(new ISelectionStatusValidator() {
public IStatus validate(Object[] selection) {
StatusInfo res = new StatusInfo();
// only single selection
if (selection.length == 1
&& (selection[0] instanceof IFile || selection[0] instanceof ISourceModule))
res.setOK();
// else
// res.setError("");
return res;
}
});