ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(
SpringUIUtils.getStandardDisplay().getActiveShell(),
new WorkbenchLabelProvider(), new WorkbenchContentProvider());
dialog.setTitle(Activator.getResourceString(DIALOG_TITLE));
dialog.setMessage(Activator.getResourceString(DIALOG_MESSAGE));
dialog.addFilter(new ConfigFileFilter(new String[] { "xml" }));
dialog.setValidator(new FileSelectionValidator(true));
dialog.setInput(element);
dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));
if (dialog.open() == ElementTreeSelectionDialog.OK) {
Object[] selection = dialog.getResult();