Shell shell = new Shell(Display.getDefault());
FilteredResourcesSelectionDialog dialog =
new FilteredResourcesSelectionDialog(
shell, false, ResourcesPlugin.getWorkspace().getRoot(), IResource.FILE);
dialog.setInitialPattern("*.dpans");
if (dialog.open() == ResourceSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
System.out.println(result[0].getClass());
if (result[0] instanceof File) {
File resource = (File) result[0];